From d2c4f09f9052d7a6b8d973d481fb6fdab28994dd Mon Sep 17 00:00:00 2001 From: Eltrac Date: Sat, 23 Aug 2025 22:28:20 +0800 Subject: feat: show book names as tooltips --- layouts/library/section.html | 5 +++-- layouts/library/yearlist.html | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/layouts/library/section.html b/layouts/library/section.html index 9526c985..7ac5ef6c 100644 --- a/layouts/library/section.html +++ b/layouts/library/section.html @@ -7,7 +7,8 @@ {{ $books := first 18 (where .Site.RegularPages "Section" "library") }} {{ range $i, $book := $books }} {{ if eq .Date.Year now.Year }} -
+
{{ partial "items/book" $book }}
{{ end }} @@ -39,7 +40,7 @@

推荐好书

{{ range where (where .Site.RegularPages "Section" "library") ".Params.rating" "==" 5 }} - {{ partial "items/book" . }} +
{{ partial "items/book" . }}
{{ end }}
diff --git a/layouts/library/yearlist.html b/layouts/library/yearlist.html index ed62f014..8250046d 100644 --- a/layouts/library/yearlist.html +++ b/layouts/library/yearlist.html @@ -7,7 +7,7 @@ {{ $year := .Title }} {{ range where .Site.RegularPages "Section" "library" }} {{ if eq (printf "%d" .Date.Year) $year }} - {{ partial "items/book" . }} +
{{ partial "items/book" . }}
{{ end }} {{ end }} -- cgit v1.2.3