Skip to content

Commit

Permalink
Try to fix some errors
Browse files Browse the repository at this point in the history
  • Loading branch information
yo80106 committed Dec 26, 2024
1 parent 6e74abe commit c0401a8
Show file tree
Hide file tree
Showing 6 changed files with 397 additions and 397 deletions.
92 changes: 46 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
# Hugo Theme: Console

A minimal, responsive and light theme for Hugo inspired by Linux console.

![Console](https://github.com/mrmierzejewski/hugo-theme-console/blob/master/images/preview.png?raw=true)

## Live demo

* https://themes.gohugo.io/themes/hugo-theme-console/

## Installation

```sh
$ mkdir themes
$ cd themes
$ git submodule add https://github.com/mrmierzejewski/hugo-theme-console.git hugo-theme-console
```

See the [Hugo documentation](https://gohugo.io/themes/installing/) for more information.

## Configuration

Set theme parameter in your config file:

```
theme = "hugo-theme-console"
```

## Example Site

To run the example site, please type the following command:

```
make hugo-server
```

### Start page

The default start page template is located at ```themes/hugo-theme-console/layouts/index.html```. To change the page content, you to need to copy this file to
your website top-level ```layouts``` folder (```layouts/index.html```).

## License

Copyright © 2021 [Marcin Mierzejewski](https://mrmierzejewski.com/)

The theme is released under the MIT License. Check the [original theme license](https://github.com/panr/hugo-theme-terminal/blob/master/LICENSE.md) for additional licensing information.
# Hugo Theme: Console

A minimal, responsive and light theme for Hugo inspired by Linux console.

![Console](https://github.com/mrmierzejewski/hugo-theme-console/blob/master/images/preview.png?raw=true)

## Live demo

* https://themes.gohugo.io/themes/hugo-theme-console/

## Installation

```sh
$ mkdir themes
$ cd themes
$ git submodule add https://github.com/mrmierzejewski/hugo-theme-console.git hugo-theme-console
```

See the [Hugo documentation](https://gohugo.io/themes/installing/) for more information.

## Configuration

Set theme parameter in your config file:

```
theme = "hugo-theme-console"
```

## Example Site

To run the example site, please type the following command:

```
make hugo-server
```

### Start page

The default start page template is located at ```themes/hugo-theme-console/layouts/index.html```. To change the page content, you to need to copy this file to
your website top-level ```layouts``` folder (```layouts/index.html```).

## License

Copyright © 2021 [Marcin Mierzejewski](https://mrmierzejewski.com/)

The theme is released under the MIT License. Check the [original theme license](https://github.com/panr/hugo-theme-terminal/blob/master/LICENSE.md) for additional licensing information.
34 changes: 17 additions & 17 deletions layouts/gallery/list.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{{ define "main" }}
<h1>{{ .Page.Title }}</h1>
{{ .Content }}
<div class="image-grid">
{{ range sort .Data.Pages "Date" "desc" }}
{{ if and (isset .Params "image") .Params.image }}
<a href="{{ .Permalink }}" title="{{ .Title }}">
{{ $image := .Page.Resources.GetMatch .Params.image }}
{{ with $image }}
{{ $thumb := .Resize "400x" }}
<img src="{{ $image.RelPermalink }}" alt="% s" class="img-responsive gallery-image" width="{{ $image.Width }}">

{{end}}
</a>
{{ end }}
{{ end }}
</div>
{{ define "main" }}
<h1>{{ .Page.Title }}</h1>
{{ .Content }}
<div class="image-grid">
{{ range sort .Data.Pages "Date" "desc" }}
{{ if and (isset .Params "image") .Params.image }}
<a href="{{ .Permalink }}" title="{{ .Title }}">
{{ $image := .Page.Resources.GetMatch .Params.image }}
{{ with $image }}
{{ $thumb := .Resize "400x" }}
<img src="{{ $image.RelPermalink }}" alt="% s" class="img-responsive gallery-image" width="{{ $image.Width }}">

{{end}}
</a>
{{ end }}
{{ end }}
</div>
{{ end }}
26 changes: 13 additions & 13 deletions layouts/gallery/single.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{{ define "main" }}
<h1>{{ .Page.Title }}</h1>

{{ if and (isset .Params "image") .Params.image }}
{{ $image := .Page.Resources.GetMatch .Params.image }}
{{ $thumb := $image.Resize "1000x" }}
<img src="{{ $image.RelPermalink }}" alt="% s" class="img-responsive gallery-image" width="{{ $image.Width }}">

{{ end }}

{{ .Content }}
{{ template "_internal/disqus.html" . }}

{{ define "main" }}
<h1>{{ .Page.Title }}</h1>

{{ if and (isset .Params "image") .Params.image }}
{{ $image := .Page.Resources.GetMatch .Params.image }}
{{ $thumb := $image.Resize "1000x" }}
<img src="{{ $image.RelPermalink }}" alt="% s" class="img-responsive gallery-image" width="{{ $image.Width }}">

{{ end }}

{{ .Content }}
{{ template "_internal/disqus.html" . }}

{{ end }}
84 changes: 42 additions & 42 deletions layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
{{ define "main" }}

<h1>About</h1>

<p>
yo80106在這裡記錄學習、分享經驗,佐以一些有的沒的東西。內容如果剛好幫助到任何人,那真是太好了呢! <a href="about/">(more)</a>
</p>
<br/>

<h1>Latest posts</h1>

<div class="posts-list">
{{ with .Site.GetPage "/posts" }}
{{ range first 3 (sort .Data.Pages "Date" "desc" (where .Pages ".Params.private" "!=" true))}}
<div class="post">
<p>
<div class="date">{{ .PublishDate.Format "Jan. 2, 2006" }}</div>
<h1><a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a></h1>
{{ .Summary }}
</p>
</div>
{{ end }}
{{ end }}
</div>

<h1>Latest collections</h1>

<div class="image-grid">
{{ with .Site.GetPage "/collections" }}
{{ range first 3 (sort .Data.Pages "Date" "desc")}}
<a href="{{ .Permalink }}" title="{{ .Title }}">
{{ $image := .Page.Resources.GetMatch .Params.image }}
{{ with $image }}
{{ $thumb := .Resize "400x" }}
<img src="{{ $image.RelPermalink }}" alt="% s" class="img-responsive gallery-image" width="{{ $image.Width }}">

{{end}}
</a>
{{ end }}
{{ end }}
</div>

{{ define "main" }}

<h1>About</h1>

<p>
yo80106在這裡記錄學習、分享經驗,佐以一些有的沒的東西。內容如果剛好幫助到任何人,那真是太好了呢! <a href="about/">(more)</a>
</p>
<br/>

<h1>Latest posts</h1>

<div class="posts-list">
{{ with .Site.GetPage "/posts" }}
{{ range first 3 (sort .Data.Pages "Date" "desc" (where .Pages ".Params.private" "!=" true))}}
<div class="post">
<p>
<div class="date">{{ .PublishDate.Format "Jan. 2, 2006" }}</div>
<h1><a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a></h1>
{{ .Summary }}
</p>
</div>
{{ end }}
{{ end }}
</div>

<h1>Latest collections</h1>

<div class="image-grid">
{{ with .Site.GetPage "/collections" }}
{{ range first 3 (sort .Data.Pages "Date" "desc")}}
<a href="{{ .Permalink }}" title="{{ .Title }}">
{{ $image := .Page.Resources.GetMatch .Params.image }}
{{ with $image }}
{{ $thumb := .Resize "400x" }}
<img src="{{ $image.RelPermalink }}" alt="% s" class="img-responsive gallery-image" width="{{ $image.Width }}">

{{end}}
</a>
{{ end }}
{{ end }}
</div>

{{ end }}
2 changes: 1 addition & 1 deletion layouts/partials/twitter_cards.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<meta name="twitter:title" content="{{ .Title }}"/>
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}"/>
{{ with .Site.Social.twitter -}}
{{ with with .Site.Params.Social.twitter -}}
<meta name="twitter:site" content="@{{ . }}"/>
{{ end -}}
{{ range .Site.Authors }}
Expand Down
Loading

0 comments on commit c0401a8

Please sign in to comment.