{{ define "main" }}
{{ partial "components/logo" (dict "link" "library" "class" "round-sticker absolute w-8 h-8 md:w-20 md:h-20 top-8 -right-8 md:-right-12" "imageClass" "w-full") }}

{{ .Title }}

{{- $rating := .Params.rating -}} {{- $fullStars := math.Floor $rating -}}

{{ .Params.author }}

{{- range seq $fullStars }} ⭐ {{- end -}}

{{ partial "posts/toc" . }}
{{ .Content }}
{{ partial "posts/endnotes" . }}

于 {{ partial "components/date" . }} 读完

{{ partial "components/tags" . }}

{{ partial "components/backlinks" (dict "filename" .File.BaseFileName "type" "library" "context" .) }} {{ partial "posts/action-menu.html" . }} {{ partial "components/back-to-top.html" . }} {{ $books := where (where .Site.RegularPages "Section" "library") ".Params.author" "==" .Params.author }} {{ $thisBookID := .File.UniqueID }} {{ if gt (len $books) 1 }}

我读过的{{ .Params.author }}的其它书籍

{{ range $books }} {{ if ne .File.UniqueID $thisBookID }}
{{ partial "items/book" . }}
{{ end }} {{ end }}
{{ end }}
{{ end }}