From 9ac5c71d93e6b9a3af498e888c07dd046c4962cc Mon Sep 17 00:00:00 2001 From: yingyu5658 Date: Wed, 24 Dec 2025 19:13:12 +0800 Subject: Merry Christmas --- layouts/_default/single.html | 2 +- layouts/shortcodes/recent-posts.html | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) (limited to 'layouts') diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 78814e5..8c26440 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -225,7 +225,7 @@ giscusScript.setAttribute('data-category', 'Announcements'); giscusScript.setAttribute('data-category-id', 'DIC_kwDOOBetsM4CoF_Z'); giscusScript.setAttribute('data-mapping', 'title'); giscusScript.setAttribute('data-strict', '0'); -giscusScript.setAttribute('data-reactions-enabled', '1'); +giscusScript.setAttribute('data-reactions-enabled', '0'); giscusScript.setAttribute('data-emit-metadata', '0'); giscusScript.setAttribute('data-input-position', 'bottom'); giscusScript.setAttribute('data-theme', giscusTheme); diff --git a/layouts/shortcodes/recent-posts.html b/layouts/shortcodes/recent-posts.html index 0d1d955..14ce25e 100644 --- a/layouts/shortcodes/recent-posts.html +++ b/layouts/shortcodes/recent-posts.html @@ -41,6 +41,30 @@ $recent := first 8 $pages.ByDate.Reverse }} .recent-post-title { margin-top: 2px; } + + @media (max-width: 720px) { + .recent-post-item { + flex-direction: column; /* 改为上下排列 */ + gap: 4px; /* 缩短日期和标题的间距 */ + margin-bottom: 1.5em; + } + + .post-date { + min-width: auto; + font-size: 0.85em; + } + + .recent-post-title { + font-size: 1.05em; + } + + .item-link { + white-space: normal; /* 允许换行 */ + word-wrap: break-word; /* 强制长单词/链接换行 */ + overflow: visible; /* 取消隐藏 */ + text-overflow: clip; /* 取消省略号 */ + } + }
{{ if $recent }} {{ range $index, $page := $recent }} -- cgit v1.2.3