From 03757128df8774136f68acddcd346ffa3ee275fe Mon Sep 17 00:00:00 2001 From: Verdant Date: Sun, 22 Mar 2026 20:54:46 +0800 Subject: refactor: refactor index - add introduction - modify recent posts pieces - modify background color --- layouts/shortcodes/recent-posts.html | 160 ++++++++++------------------------- 1 file changed, 43 insertions(+), 117 deletions(-) (limited to 'layouts/shortcodes') diff --git a/layouts/shortcodes/recent-posts.html b/layouts/shortcodes/recent-posts.html index a666a4c..55f7cd4 100644 --- a/layouts/shortcodes/recent-posts.html +++ b/layouts/shortcodes/recent-posts.html @@ -1,136 +1,62 @@ -{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} {{ -$recent := first 6 $pages.ByDate.Reverse }} +{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} +{{ $recent := first 12 $pages.ByDate.Reverse }}
- +

最近更新

{{ if $recent }} - {{ range $index, $page := $recent }} -
-

- {{ .Title }} -

- -{{ if ne (.Params.showMeta | default true) false }} - -{{ end }} - - - - - - - - - - - - - - - - - - - - - - - - -
- {{ end }} + {{ else }}
暂无文章
- - + {{ end }}
- -{{ end }} - - - - - - - - - - - - - - - - - - - - -- cgit v1.2.3