diff options
| author | yingyu5658 <i@yingyu5658.me> | 2025-12-24 19:13:12 +0800 |
|---|---|---|
| committer | yingyu5658 <i@yingyu5658.me> | 2025-12-24 19:13:12 +0800 |
| commit | 9ac5c71d93e6b9a3af498e888c07dd046c4962cc (patch) | |
| tree | f3d0371ce54a5da7ef5717e847bc7b299365c68e /layouts | |
| parent | 66543c0b3449b5dfc48c3b6a62b0387788b69d3f (diff) | |
| download | blog-9ac5c71d93e6b9a3af498e888c07dd046c4962cc.tar.gz blog-9ac5c71d93e6b9a3af498e888c07dd046c4962cc.zip | |
Merry Christmas
Diffstat (limited to 'layouts')
| -rw-r--r-- | layouts/_default/single.html | 2 | ||||
| -rw-r--r-- | layouts/shortcodes/recent-posts.html | 24 |
2 files changed, 25 insertions, 1 deletions
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; /* 取消省略号 */ + } + } </style> <div class="recent-posts"> {{ if $recent }} {{ range $index, $page := $recent }} |
