Revise about page, hello world post, and The Compound review. Add book cover support to review template, favicon, typographer config, and cover image enrichment script. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
38 lines
1015 B
HTML
38 lines
1015 B
HTML
{{ define "main" }}
|
|
{{ $rating := .Params.rating | default 0 }}
|
|
<article>
|
|
<h1>{{ .Title }}</h1>
|
|
|
|
<div class="book-meta">
|
|
{{ with .Params.book_author }}
|
|
<span class="meta-key">author</span>
|
|
<span class="meta-val author">{{ . }}</span>
|
|
{{ end }}
|
|
|
|
<span class="meta-key">read</span>
|
|
<span class="meta-val">{{ .Params.date_read | default (.Date.Format "January 2006") }}</span>
|
|
|
|
<span class="meta-key">rating</span>
|
|
<span class="meta-val">
|
|
<span class="rating-blocks">{{- strings.Repeat $rating "▓" -}}{{- strings.Repeat (sub 5 $rating) "░" -}}</span>
|
|
<span class="rating-num">{{ $rating }}/5</span>
|
|
</span>
|
|
|
|
</div>
|
|
|
|
{{ with .Params.cover }}
|
|
<img class="book-cover" src="{{ . }}" alt="Cover of {{ $.Title }}">
|
|
{{ end }}
|
|
|
|
{{ .Content }}
|
|
|
|
{{ with .Params.tags }}
|
|
<div class="post-footer">
|
|
<div class="tags">
|
|
{{ range . }}<a class="tag" href="/tags/{{ . | urlize }}/">{{ . }}</a>{{ end }}
|
|
</div>
|
|
</div>
|
|
{{ end }}
|
|
</article>
|
|
{{ end }}
|