diff options
| author | eltrac <hi@eltr.ac> | 2026-05-13 15:15:07 +0800 |
|---|---|---|
| committer | eltrac <hi@eltr.ac> | 2026-05-13 15:15:07 +0800 |
| commit | 651b4e502d59041e6f5d5fca10a4cc9bd7f00309 (patch) | |
| tree | 1f96018d9c5ef8d4afb72a9f7ac09b23c2d19e7a /layouts | |
| parent | a1afd3f041bbdfa61820311216ca9418ef5b1fa3 (diff) | |
refactor(section/weekly): view_item.html
Diffstat (limited to 'layouts')
| -rw-r--r-- | layouts/weekly/section.html | 7 | ||||
| -rw-r--r-- | layouts/weekly/view_item.html | 6 |
2 files changed, 7 insertions, 6 deletions
diff --git a/layouts/weekly/section.html b/layouts/weekly/section.html index c1bc53b..5c9ded0 100644 --- a/layouts/weekly/section.html +++ b/layouts/weekly/section.html @@ -23,12 +23,7 @@ </h2> <ul class="ps-0 flex flex-col gap-2 list-none leading-relaxed"> {{ range .Pages }} - <li class="text-size-lg"> - <a href="{{ .RelPermalink }}"> - {{ .Title }}{{ with .Params.subtitle }}:<span class="text-secondary">{{. }}</span> - {{ end }} - </a> - </li> + {{ .Render "view_item" }} {{ end }} </ul> </div> diff --git a/layouts/weekly/view_item.html b/layouts/weekly/view_item.html new file mode 100644 index 0000000..650b9ae --- /dev/null +++ b/layouts/weekly/view_item.html @@ -0,0 +1,6 @@ +<li class="text-size-lg"> + <a href="{{ .RelPermalink }}"> + {{ .Title }}{{ with .Params.subtitle }}:<span class="text-secondary">{{. }}</span> + {{ end }} + </a> +</li> |
