blob: ee8d0fc636895de25c7568c080bc4f7ddcb6d374 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
{{ define "main" }}
<article class="h-entry">
<header class="flex flex-col items-center gap-2">
<div class="relative border-3 border-solid border-white shadow-lg w-[10rem] md:w-[15rem]"
style="view-transition-name: book-{{ .File.UniqueID }}">
<img
class="lazy block w-full h-auto" loading="lazy"
data-pagefind-meta="image[src]"
src="{{ .Params.cover }}"
/>
{{ partial "components/logo"
(dict
"link" "library"
"ctx" .
"class" "round-sticker absolute w-8 h-8 md:w-20 md:h-20 top-8 -right-8 md:-right-12"
"imageClass" "w-full") }}
</div>
<h1 class="xerox p-name" data-pagefind-meta="title">{{ .Title }}</h1>
<p class="m-0">
{{ with .Params.authors }}{{ delimit . ", " }}{{ end }}
</p>
{{ partial "components/rating" .Params.rating }}
</header>
{{ partial "content" . }}
<div class="text-size-base text-secondary md:flex md:justify-between">
<p>于 {{ partial "components/date" . }} 读完</p>
<p>{{ partial "components/tags" . }}</p>
</div>
{{ partial "components/backlinks" (dict "filename" .File.BaseFileName "type" "library" "context" .) }}
{{ partial "posts/interaction" . }}
{{ partial "components/back-to-top.html" . }}
{{ partial "components/microformats" . }}
{{ with .Params.authors }}
{{ $author := index . 0 }}
{{ $term := index $.Site.Taxonomies.authors (lower $author) }}
{{ if and $term (gt (len $term.Pages) 1) }}
<h2>我读过的 {{ $author }} 的其它书籍</h2>
<div class="grid grid-cols-4 md:grid-cols-6 items-center gap-4 my-4">
{{ range $term.Pages }}
{{ if ne .File.UniqueID $.File.UniqueID }}
<div data-tooltip="{{ .Title }}">
{{ partial "components/book" (dict "ctx" .) }}
</div>
{{ end }}
{{ end }}
</div>
{{ end }}
{{ end }}
</article>
{{ end }}
|