diff options
author | Michał Sapka <michal@sapka.me> | 2023-01-10 23:23:24 +0100 |
---|---|---|
committer | Michał Sapka <michal@sapka.me> | 2023-01-10 23:23:24 +0100 |
commit | e2349485c4177eba3a996143c836a2a8849c2bf8 (patch) | |
tree | 1a4cf9a497314a63db6f298583cd91bf9b2bea84 /layouts | |
parent | f0694eab4d1b7dd65ffc24c116736c86258bb942 (diff) |
feat: about contents
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/single.html | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index cf59eeb..7ef1f8d 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,27 +1,30 @@ {{ define "main" }} <article>{{ .Page.Content }}</article> -<BR> -added on {{ .PublishDate.Format "January 2, 2006" }} -{{- if isset .Params "tags" -}} - {{- $tagsLen := len .Params.tags -}} - {{- if gt $tagsLen 0 -}} - with tags: - {{- range $k, $v := .Params.tags -}} - {{- $url := printf "tags/%s" (. | urlize | lower) -}} - <a href="{{ $url | absURL }}"> {{ . | title }}</a> - {{- if lt $k (sub $tagsLen 1) }} · {{ end -}} + +{{- if not (in .Params.category "pages") }} + <BR> + added on {{ .PublishDate.Format "January 2, 2006" }} + {{- if isset .Params "tags" -}} + {{- $tagsLen := len .Params.tags -}} + {{- if gt $tagsLen 0 -}} + with tags: + {{- range $k, $v := .Params.tags -}} + {{- $url := printf "tags/%s" (. | urlize | lower) -}} + <a href="{{ $url | absURL }}"> {{ . | title }}</a> + {{- if lt $k (sub $tagsLen 1) }} · {{ end -}} + {{- end -}} + </div> {{- end -}} - </div> - {{- end -}} -{{- end }} -<hr/> + {{- end }} + <hr/> -{{ if or .Next .Prev -}} -<div> - {{- with .Prev }} <a class="prev-link" href="{{ .RelPermalink}}"> ← Previous</a> {{ end -}} - {{- with .Next -}}<a class="next-link" href="{{ .RelPermalink}}">Next →</a> {{ end -}} -</div> -{{ end -}} + {{ if or .Next .Prev -}} + <div> + {{- with .Prev }} <a class="prev-link" href="{{ .RelPermalink}}"> ← Previous</a> {{ end -}} + {{- with .Next -}}<a class="next-link" href="{{ .RelPermalink}}">Next →</a> {{ end -}} + </div> + {{ end -}} + {{ end }} {{ end }} |