summaryrefslogtreecommitdiff
path: root/layouts/library
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-06-06 09:00:36 +0800
committerEltrac <hi@guhub.cn>2025-06-06 09:00:36 +0800
commit8397b55040d23c19c7e6aae30badc55e54319bf2 (patch)
treea57dffcfc208ff85e2af1422f61f67f3d045dfb2 /layouts/library
parent87761df9fde0885d64a4eb853c18245ca0779ce3 (diff)
parent227fb4cb419a44132340963f78147e8df604a0ee (diff)
Merge branch 'master' of https://github.com/BigCoke233/geek-death-project
Former-commit-id: 430926459e4846549b1571c460e2596874663c1b
Diffstat (limited to 'layouts/library')
-rw-r--r--layouts/library/section.html2
-rw-r--r--layouts/library/single.html7
2 files changed, 6 insertions, 3 deletions
diff --git a/layouts/library/section.html b/layouts/library/section.html
index 3b4e0199..221cc005 100644
--- a/layouts/library/section.html
+++ b/layouts/library/section.html
@@ -10,7 +10,7 @@
<div class="book{{ if eq .Params.rating 1 }} badbook{{ end }}{{ if eq .Params.rating 5 }} goodbook{{ end }}">
<a href="{{ .Permalink }}" class="book-cover" style="view-transition-name: book-{{ .Title }}">
<img
- class="lazy" src="{{ .Params.cover }}"
+ class="lazy" src="{{ .Params.cover }}!small"
style="view-transition-name: book-{{ .File.UniqueID }}" />
</a>
</div>
diff --git a/layouts/library/single.html b/layouts/library/single.html
index 3bd00ca3..fa53149b 100644
--- a/layouts/library/single.html
+++ b/layouts/library/single.html
@@ -8,7 +8,7 @@
src="{{ .Params.cover }}"
/>
</div>
- <h1 class="book-title">{{ .Title }}</h1>
+ <h1 class="book-title" data-pagefind-meta="title">{{ .Title }}</h1>
{{- $rating := .Params.rating -}}
{{- $fullStars := math.Floor $rating -}}
<p class="book-author">
@@ -35,7 +35,10 @@
{{ .Content }}
</div>
<div class="book-footer">
- <p>于 {{ .Date.Format "2006-01-02" }} 读完</p>
+ <p>于 <time
+ data-pagefind-sort="date[data-date], weight[data-weight]"
+ data-date="{{ .Date.Format "2006-01-02" }}"
+ data-weight="10">{{ .Date.Format "2006-01-02" }}</time> 读完</p>
</div>
</div>
{{ partial "components/comment.html" . }}