diff options
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 }} |
