From f0506acd6f70da636b8fdb23439c85bbf2392b40 Mon Sep 17 00:00:00 2001 From: Arne Rief Date: Sat, 16 Aug 2025 22:42:03 +0200 Subject: HTML templates done --- layouts/_default/baseof.html | 18 +++++++++--------- layouts/_default/list.html | 33 +++++++++++++++++++++++++++++++++ layouts/_default/single.html | 19 +++++++++++++++++++ 3 files changed, 61 insertions(+), 9 deletions(-) (limited to 'layouts/_default') diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 3ca9201..3c4865b 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,5 +1,5 @@ - + @@ -9,7 +9,7 @@ {{- else }} {{- if or .IsPage .IsSection}} - + {{- else }} {{- end }} @@ -19,20 +19,20 @@ {{- if .IsTranslated }} - {{ range .Translations }} + {{- range .Translations }} - {{ end }} + {{- end }} {{- end }} - {{ partial "head/meta.html" . }} - {{ partial "head/seo.html" . }} - {{ partialCached "head/css.html" . }} + {{- partial "head/meta.html" . }} + {{- partial "head/seo.html" . }} + {{- partialCached "head/css.html" . }} - + {{ partial "header.html" . }} -
+
{{ block "main" . }}{{ end }}
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index e69de29..8ff9b18 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -0,0 +1,33 @@ +{{- define "main" }} +
+
+

+ {{ .Title }} +

+ {{- $description := or .Description .Summary (lang.Translate "list.default_description" .Title | default (printf "All posts in %s" .Title)) }} +

+ {{ $description }} +

+
+ +
+ {{- /* 20 posts per site */ -}} + {{- $paginator := .Paginate .Pages 20 }} + {{- with $paginator.Pages }} +
    + {{- range . }} +
  • + {{- partial "list/post-card.html" . }} +
  • + {{- end }} +
+ {{- else }} +

+ {{ lang.Translate "list.empty" | default "No posts found in this section." }} +

+ {{- end }} +
+ + {{- partial "list/pagination.html" $paginator }} +
+{{- end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index e69de29..24bc5c9 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -0,0 +1,19 @@ +{{- define "main" }} +
+
+

{{ .Title }}

+ +
+ +
+ {{ .Content }} +
+ + +
+{{- end }} -- cgit v1.2.3