From e2349485c4177eba3a996143c836a2a8849c2bf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sapka?= Date: Tue, 10 Jan 2023 23:23:24 +0100 Subject: feat: about contents --- layouts/_default/single.html | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) (limited to 'layouts') 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" }}
{{ .Page.Content }}
-
-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) -}} - {{ . | title }} - {{- if lt $k (sub $tagsLen 1) }} · {{ end -}} + +{{- if not (in .Params.category "pages") }} +
+ 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) -}} + {{ . | title }} + {{- if lt $k (sub $tagsLen 1) }} · {{ end -}} + {{- end -}} + {{- end -}} - - {{- end -}} -{{- end }} -
+ {{- end }} +
-{{ if or .Next .Prev -}} -
- {{- with .Prev }} ← Previous {{ end -}} - {{- with .Next -}}Next → {{ end -}} -
-{{ end -}} + {{ if or .Next .Prev -}} +
+ {{- with .Prev }} ← Previous {{ end -}} + {{- with .Next -}}Next → {{ end -}} +
+ {{ end -}} + {{ end }} {{ end }} -- cgit v1.2.3