diff options
| author | Eltrac <hi@guhub.cn> | 2025-03-27 13:10:06 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-03-27 13:10:06 +0800 |
| commit | 83f509dd79c381a8bb1254a5de14568c61bb92e2 (patch) | |
| tree | edf57e3b77b0ae2933de06dabf0167c0621f78b8 /layouts/library/single.html | |
| parent | 6576dc46469cdf1fb25cedf2699fe4ba7002a5ef (diff) | |
feat: add library section
Diffstat (limited to 'layouts/library/single.html')
| -rw-r--r-- | layouts/library/single.html | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/layouts/library/single.html b/layouts/library/single.html new file mode 100644 index 00000000..f633c5f4 --- /dev/null +++ b/layouts/library/single.html @@ -0,0 +1,25 @@ +{{ define "main" }} + <article id="book-page"> + {{ partial "components/breadcrumbs.html" . }} + <div class="markdown-body book-body"> + <div class="book-cover"> + <img src="{{ .Params.cover }}" /> + </div> + <h3 class="book-title">{{ .Title }}</h3> + + {{- $rating := .Params.rating -}} + {{- $fullStars := math.Floor $rating -}} + <div class="rating"> + <span>评分:</span> + {{- range seq $fullStars }} + <span class="star">★</span> + {{- end -}} + </div> + + <div class="book-content"> + {{ .Content }} + </div> + </div> + {{ partial "components/comment.html" . }} + </article> +{{ end }} |
