summaryrefslogtreecommitdiff
path: root/layouts/featured.html
diff options
context:
space:
mode:
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 }}