From c08add089657efbed69165acdfa55a635df3c0aa Mon Sep 17 00:00:00 2001 From: yingyu5658 Date: Sat, 24 Jan 2026 21:33:58 +0800 Subject: style: tweak some CSS style about recent-posts --- layouts/shortcodes/recent-posts.html | 112 +++-------------------------------- 1 file changed, 8 insertions(+), 104 deletions(-) diff --git a/layouts/shortcodes/recent-posts.html b/layouts/shortcodes/recent-posts.html index 297a760..b1e891e 100644 --- a/layouts/shortcodes/recent-posts.html +++ b/layouts/shortcodes/recent-posts.html @@ -1,120 +1,24 @@ {{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} {{ -$recent := first 8 $pages.ByDate.Reverse }} +$recent := first 5 $pages.ByDate.Reverse }}
{{ if $recent }} {{ range $index, $page := $recent }} -

{{ .Title }}

+
{{ .Summary }}
+ + {{ partial "post_meta.html" . }} -
{{ .Summary }}
-
-
- {{ end }} {{ else }} + {{ if not (eq (add $index 1) (len $recent)) }} {{ end }} {{ end }} {{ else }}
暂无文章
{{ end }}
-- cgit v1.2.3