From 9b5f3fad7068298265dbbc8a65077f7917a090a5 Mon Sep 17 00:00:00 2001 From: aethrvmn Date: Sun, 21 Sep 2025 00:27:35 +0200 Subject: updated hugo-book theme --- themes/hugo-book/layouts/posts/list.html | 35 ++++++++++++++++++++++-------- themes/hugo-book/layouts/posts/single.html | 8 +++++-- 2 files changed, 32 insertions(+), 11 deletions(-) (limited to 'themes/hugo-book/layouts/posts') diff --git a/themes/hugo-book/layouts/posts/list.html b/themes/hugo-book/layouts/posts/list.html index aff32f5..0d7df53 100644 --- a/themes/hugo-book/layouts/posts/list.html +++ b/themes/hugo-book/layouts/posts/list.html @@ -1,22 +1,39 @@ {{ define "main" }} {{ range sort .Paginator.Pages }} -
+

- {{ partial "docs/title.html" . }} + {{ partial "docs/title" . }}

- {{ partial "docs/post-meta" . }} -
- {{- .Summary -}} - {{ if .Truncated }} - ... - {{ end }} +
+
+ {{ partial "docs/post-meta" . }} +
+ {{- .Summary | truncate 256 -}} +
+
+ {{- $thumbnail := default "thumbnail.*" .Params.BookPostThumbnail -}} + {{- with or (.Resources.GetMatch $thumbnail) (resources.GetMatch $thumbnail) -}} +
+ +
+ {{- end -}}
{{ end }} +{{ end }} - {{ template "_internal/pagination.html" . }} +{{ define "toc-container" }} + {{ end }} {{ define "toc" }} {{ partial "docs/taxonomy" . }} {{ end }} + +{{ define "footer" }} + {{ partial "docs/pagination.html" . }} +{{ end }} \ No newline at end of file diff --git a/themes/hugo-book/layouts/posts/single.html b/themes/hugo-book/layouts/posts/single.html index cebdd11..232e14e 100644 --- a/themes/hugo-book/layouts/posts/single.html +++ b/themes/hugo-book/layouts/posts/single.html @@ -1,10 +1,10 @@ {{ define "main" }}

- {{ partial "docs/title.html" . }} + {{ partial "docs/title" . }}

{{ partial "docs/post-meta" . }} -
+
{{- .Content -}}
@@ -13,3 +13,7 @@ {{ define "toc" }} {{ partial "docs/toc" . }} {{ end }} + +{{ define "footer" }} + {{ partial "docs/post-prev-next" . }} +{{ end }} \ No newline at end of file -- cgit v1.2.3