diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2026-04-24 11:15:04 -0400 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2026-04-24 11:15:04 -0400 |
| commit | 544ced362819ae9bd2abd9c12480f76945b368aa (patch) | |
| tree | 84695604c33c6266a65d63759e3474c9bd87892e /layouts/_partials | |
| parent | 8dfec6a37d8adb55d500df1866901e3ee0d3c067 (diff) | |
| download | samanthony.xyz-master.zip | |
Diffstat (limited to 'layouts/_partials')
| -rw-r--r-- | layouts/_partials/asset-table.html | 36 | ||||
| -rw-r--r-- | layouts/_partials/copyright.html | 6 | ||||
| -rw-r--r-- | layouts/_partials/footer.html | 24 | ||||
| -rw-r--r-- | layouts/_partials/pages.html | 32 | ||||
| -rw-r--r-- | layouts/_partials/terms.html | 8 |
5 files changed, 53 insertions, 53 deletions
diff --git a/layouts/_partials/asset-table.html b/layouts/_partials/asset-table.html index df47501..2e236de 100644 --- a/layouts/_partials/asset-table.html +++ b/layouts/_partials/asset-table.html @@ -12,22 +12,22 @@ the modification times of files when the repository is cloned. */}} <table> - <thead> - <tr> - <th>Mod. date</th> - <th>File</th> - </tr> - </thead> - <tbody> - {{- range . }} - <tr> - <td> - {{- with resources.Get (printf "%s.moddate" .Name) -}} - {{- chomp .Content | time | dateFormat "2006-01-02" -}} - {{- end -}} - </td> - <td><a href="{{ .RelPermalink }}">{{ path.Base .Name }}</a></td> - </tr> - {{- end }} - </tbody> + <thead> + <tr> + <th>Mod. date</th> + <th>File</th> + </tr> + </thead> + <tbody> + {{- range . }} + <tr> + <td> + {{- with resources.Get (printf "%s.moddate" .Name) -}} + {{- chomp .Content | time | dateFormat "2006-01-02" -}} + {{- end -}} + </td> + <td><a href="{{ .RelPermalink }}">{{ path.Base .Name }}</a></td> + </tr> + {{- end }} + </tbody> </table> diff --git a/layouts/_partials/copyright.html b/layouts/_partials/copyright.html index 0fed830..5a26d6d 100644 --- a/layouts/_partials/copyright.html +++ b/layouts/_partials/copyright.html @@ -1,11 +1,11 @@ {{- $oldest := (index .Site.RegularPages.ByDate 0).Date.Year }} {{- $newest := (index .Site.Pages.ByLastmod.Reverse 0).Lastmod.Year }} {{- if gt $newest $oldest }} - Copyright {{ $oldest }}–{{ $newest }} + Copyright {{ $oldest }}–{{ $newest }} {{- else }} - Copyright {{ $newest }} + Copyright {{ $newest }} {{- end }} {{- with .Site.Params.author.name -}} - , {{ . }} + , {{ . }} {{- end -}} . diff --git a/layouts/_partials/footer.html b/layouts/_partials/footer.html index 882c3f8..cd01a54 100644 --- a/layouts/_partials/footer.html +++ b/layouts/_partials/footer.html @@ -1,18 +1,18 @@ <hr> <p>{{ partial "copyright.html" . }}</p> <p> - Powered by - <a href="https://gohugo.io/">Hugo</a>, - <a href="https://www.openbsd.org/">OpenBSD</a>, and - <a href="https://freedns.afraid.org/">Free DNS</a>. + Powered by + <a href="https://gohugo.io/">Hugo</a>, + <a href="https://www.openbsd.org/">OpenBSD</a>, and + <a href="https://freedns.afraid.org/">Free DNS</a>. </p> <p> - {{- $repoUrl := .Site.Params.Repo.Url }} - {{- with .GitInfo }} - {{- $baseUrl := urls.JoinPath $repoUrl "/commit/" }} - {{- $commitUrl := printf "%s?id=%s" $baseUrl .Hash }} - Last modified {{ .CommitDate.Format "2006-01-02" }}: - <a href="{{ $commitUrl }}">{{ .AbbreviatedHash }}</a>. - {{- end }} - <a href="{{ $repoUrl }}">Source code →</a> + {{- $repoUrl := .Site.Params.Repo.Url }} + {{- with .GitInfo }} + {{- $baseUrl := urls.JoinPath $repoUrl "/commit/" }} + {{- $commitUrl := printf "%s?id=%s" $baseUrl .Hash }} + Last modified {{ .CommitDate.Format "2006-01-02" }}: + <a href="{{ $commitUrl }}">{{ .AbbreviatedHash }}</a>. + {{- end }} + <a href="{{ $repoUrl }}">Source code →</a> </p> diff --git a/layouts/_partials/pages.html b/layouts/_partials/pages.html index 6a7dc16..8ebdb58 100644 --- a/layouts/_partials/pages.html +++ b/layouts/_partials/pages.html @@ -7,20 +7,20 @@ Renders a table of pages. */}} <table> - <thead> - <tr> - <th>Date</th> - <th>Title</th> - <th><a href="{{ partial "taxonomy-url.html" (dict "taxonomy" "tags" "site" .Site) }}">Tags</a></th> - </tr> - </thead> - <tbody> - {{- range .Pages }} - <tr> - <td>{{ partial "date.html" .Date -}}</td> - <td><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></td> - <td>{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}</td> - </tr> - {{- end }} - </tbody> + <thead> + <tr> + <th>Date</th> + <th>Title</th> + <th><a href="{{ partial "taxonomy-url.html" (dict "taxonomy" "tags" "site" .Site) }}">Tags</a></th> + </tr> + </thead> + <tbody> + {{- range .Pages }} + <tr> + <td>{{ partial "date.html" .Date -}}</td> + <td><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></td> + <td>{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}</td> + </tr> + {{- end }} + </tbody> </table> diff --git a/layouts/_partials/terms.html b/layouts/_partials/terms.html index afe3a14..e693236 100644 --- a/layouts/_partials/terms.html +++ b/layouts/_partials/terms.html @@ -11,8 +11,8 @@ For a given taxonomy, renders a comma-separated list of terms assigned to the pa {{- $page := .page }} {{- with $page.GetTerms $taxonomy -}} - {{- range $index, $term := . -}} - {{- if $index }}, {{ end -}} - <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a> - {{- end -}} + {{- range $index, $term := . -}} + {{- if $index }}, {{ end -}} + <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a> + {{- end -}} {{- end -}} |