summaryrefslogtreecommitdiff
path: root/layouts/featured.html
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-07-15 23:21:44 +0800
committerEltrac <hi@guhub.cn>2025-07-15 23:21:44 +0800
commitf22d6fad8f7158b8cbe3e2d89c283977edfdd49a (patch)
tree036dd590589040cab6efead584fcf9d9e6c9156b /layouts/featured.html
parent0d97407ab88288de8219dbcae5ff4afde892cb39 (diff)
refactor: global search UnoCSS-ify, rename postnav to home-nav
Former-commit-id: 43ac3a5b42166e77373ae2495678ab5ac888ae37
Diffstat (limited to 'layouts/featured.html')
-rw-r--r--layouts/featured.html34
1 files changed, 5 insertions, 29 deletions
diff --git a/layouts/featured.html b/layouts/featured.html
index 86d5f53a..d01e217c 100644
--- a/layouts/featured.html
+++ b/layouts/featured.html
@@ -1,41 +1,17 @@
{{ define "main" }}
<article class="index">
- {{ partial "header.html" . }}
- {{ partial "components/postnav.html" . }}
+ {{ partial "header" . }}
+ {{ partial "home/home-nav" . }}
<div class="markdown-content" style="line-height: 2">
{{ .Content }}
</div>
- <!-- Latest Posts -->
<section id="featured-posts">
<div class="posts-list">
- {{ range where site.RegularPages "Params.featured" true }}
- <div class="posts-item"
- style="view-transition-name: post-{{ .File.UniqueID }}">
- <header>
- <div class="posts-item-meta">
- <p>
- <time>{{ .Date.Format "Jan 2, 2006" }}</time>
- <span>·</span>
- {{ partial "components/tags" . }}
- </p>
- <h2 class="posts-item-title">
- <a
- href="{{ .Permalink }}"
- data-umami-event="🪶 Click post link from featured"
- >
- {{ if eq .Section "library" }}
- 读《{{ .Title }}》
- {{ else }}
- {{ .Title }}
- {{ end }}
- </a>
- </h2>
- </div>
- </header>
- </div>
- {{ end }}
+ {{ range where site.RegularPages "Params.featured" true }}
+ {{ partial "items/post" (dict "ctx" . ) }}
+ {{ end }}
</div>
</section>
</article>