From 26df3baeb1afcb4c41ec99f940b237b9589caa42 Mon Sep 17 00:00:00 2001 From: Arne Rief Date: Thu, 4 Sep 2025 20:05:27 +0200 Subject: Ready for deployment --- layouts/_default/all-posts.html | 36 +++++++++++++++++++++++++++++++++ layouts/_default/list.html | 4 ++-- layouts/_default/single.html | 4 +++- layouts/index.html | 2 +- layouts/partials/list/pagination.html | 4 ++-- layouts/partials/list/post-card.html | 16 ++++++++++----- layouts/partials/list/recent-posts.html | 19 ++++++++--------- layouts/partials/navmenu.html | 3 +-- layouts/partials/select-theme.html | 12 +++++------ layouts/partials/single/next-prev.html | 2 +- layouts/tags/term.html | 6 +++--- 11 files changed, 74 insertions(+), 34 deletions(-) create mode 100644 layouts/_default/all-posts.html (limited to 'layouts') diff --git a/layouts/_default/all-posts.html b/layouts/_default/all-posts.html new file mode 100644 index 0000000..319a8d5 --- /dev/null +++ b/layouts/_default/all-posts.html @@ -0,0 +1,36 @@ +{{ define "main" }} +
+
+

+ {{ .Title }} +

+ {{- with .Content }} +
+ {{ . }} +
+ {{- else }} + {{- $description := or .Description (lang.Translate "posts.all_description" | default "All posts on this website, from newest to oldest.") }} +

+ {{ $description }} +

+ {{- end }} +
+ + {{ $allPosts := where site.RegularPages "Params.excludeFromLists" "!=" true }} + {{- if $allPosts }} +
+
    + {{- range $allPosts.ByDate.Reverse }} +
  • + {{ partial "list/post-card.html" . }} +
  • + {{- end }} +
+
+ {{ else }} +

+ {{ lang.Translate "posts.empty" | default "This site does not have any posts yet." }} +

+ {{- end }} +
+{{ end }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index d3d2d99..a8cb92a 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -17,8 +17,8 @@
- {{- /* 20 posts per site */ -}} - {{- $paginator := .Paginate .Pages 20 }} + {{- /* 15 posts per site */ -}} + {{- $paginator := .Paginate .Pages 15 }} {{- with $paginator.Pages }}
diff --git a/layouts/partials/navmenu.html b/layouts/partials/navmenu.html index 91e53b3..e833168 100644 --- a/layouts/partials/navmenu.html +++ b/layouts/partials/navmenu.html @@ -1,6 +1,5 @@ {{- /* -Simplified version of the `hugo new template` menu.html default -Renders a menu for the given menu ID. +Simplified version of the `hugo new template` menu.html default. Renders a menu for the given menu ID. @context {page} page: The current page. @context {string} menuID: The menu ID. diff --git a/layouts/partials/select-theme.html b/layouts/partials/select-theme.html index 443e056..3d82bd6 100644 --- a/layouts/partials/select-theme.html +++ b/layouts/partials/select-theme.html @@ -6,10 +6,10 @@ data-label-dark="{{ lang.Translate "theme.toggle_dark" }}" data-label-light="{{ lang.Translate "theme.toggle_light" }}" > - - + + diff --git a/layouts/partials/single/next-prev.html b/layouts/partials/single/next-prev.html index 1c0b462..b80e39a 100644 --- a/layouts/partials/single/next-prev.html +++ b/layouts/partials/single/next-prev.html @@ -21,7 +21,7 @@ {{ lang.Translate "post.next" | default "Next post:" }} - → {{ .Title }} + {{ .Title }} → diff --git a/layouts/tags/term.html b/layouts/tags/term.html index d3d8b6a..bbdc0bf 100644 --- a/layouts/tags/term.html +++ b/layouts/tags/term.html @@ -17,7 +17,7 @@
{{- with .Pages }} -