summaryrefslogtreecommitdiff
path: root/layouts/featured.html
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-07-14 19:05:44 +0800
committerEltrac <hi@guhub.cn>2025-07-14 19:05:44 +0800
commit3cb68b6d5231ac9932b521dee767aae19ae1ca60 (patch)
treed19a8819ab59b68498c049b270582c5a30371e9d /layouts/featured.html
parent54b306460dd67be4c0f41dee3d8ec5d6014178a7 (diff)
refactor: keep layouts folder structure up to standards
Former-commit-id: 44c7def3f6958550ccf965971f1819c1d6c514f1
Diffstat (limited to 'layouts/featured.html')
-rw-r--r--layouts/featured.html43
1 files changed, 43 insertions, 0 deletions
diff --git a/layouts/featured.html b/layouts/featured.html
new file mode 100644
index 00000000..86d5f53a
--- /dev/null
+++ b/layouts/featured.html
@@ -0,0 +1,43 @@
+{{ define "main" }}
+ <article class="index">
+ {{ partial "header.html" . }}
+ {{ partial "components/postnav.html" . }}
+
+ <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 }}
+ </div>
+ </section>
+ </article>
+{{ partial "footer.html" . }}
+{{ end }}