From 4c40685be4a919f4483febc6fc9249fa59651fae Mon Sep 17 00:00:00 2001 From: yingyu5658 Date: Tue, 13 Jan 2026 22:33:08 +0800 Subject: style: show the summary of every post on recent-posts --- layouts/shortcodes/mastodon.html | 16 ----------- layouts/shortcodes/recent-posts.html | 55 +++++++++++++++++++++--------------- 2 files changed, 32 insertions(+), 39 deletions(-) (limited to 'layouts/shortcodes') diff --git a/layouts/shortcodes/mastodon.html b/layouts/shortcodes/mastodon.html index cfb15ca..e69de29 100644 --- a/layouts/shortcodes/mastodon.html +++ b/layouts/shortcodes/mastodon.html @@ -1,16 +0,0 @@ - - - - - - diff --git a/layouts/shortcodes/recent-posts.html b/layouts/shortcodes/recent-posts.html index 7b3d855..297a760 100644 --- a/layouts/shortcodes/recent-posts.html +++ b/layouts/shortcodes/recent-posts.html @@ -1,7 +1,17 @@ -{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} -{{ $recent := first 8 $pages.ByDate.Reverse }} +{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} {{ +$recent := first 8 $pages.ByDate.Reverse }}
- {{ if $recent }} - {{ range $index, $page := $recent }} -
-

- {{ .Title }} -

- + {{ if $recent }} {{ range $index, $page := $recent }} -
- {{ end }} - {{ else }} -
暂无文章
+
+

+ {{ .Title }} +

+ +
{{ .Summary }}
+
+
+ {{ end }} {{ else }} +
暂无文章
{{ end }}
-- cgit v1.2.3