From 172adfb014596423d7cc3043f2a288ac01884cba Mon Sep 17 00:00:00 2001 From: verdant Date: Sun, 31 May 2026 16:33:36 +0800 Subject: Add minify configuration, modify favicon url --- layouts/shortcodes/recent-posts.html | 128 ++++++----------------------------- 1 file changed, 20 insertions(+), 108 deletions(-) (limited to 'layouts/shortcodes/recent-posts.html') diff --git a/layouts/shortcodes/recent-posts.html b/layouts/shortcodes/recent-posts.html index e720d33..45e1958 100644 --- a/layouts/shortcodes/recent-posts.html +++ b/layouts/shortcodes/recent-posts.html @@ -1,113 +1,25 @@ - {{ $mode := 2 }} - {{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} -{{ $recent := first 20 $pages.ByDate.Reverse }} - -{{ if eq $mode 1 }} - - +{{ $recent := first 10 $pages.ByDate.Reverse }}
- {{ if $recent }} - - {{ else }} -
暂无文章
- {{ end }} + {{ if $recent }} + + {{ else }} +

暂无随笔 / No posts found.

+ {{ end }}
-{{ end }} - - - -{{ if eq $mode 2 }} - - - -
- {{ range $recent }} -
- {{ .Date.Format "2006-01-02" }} - {{ .Title }} -
-
- {{ end }} -
- - - -{{ end }} -- cgit v1.2.3