aboutsummaryrefslogtreecommitdiffstats
path: root/layouts/shortcodes/recent-posts.html
diff options
context:
space:
mode:
authoryingyu5658 <i@yingyu5658.me>2025-12-24 19:13:12 +0800
committeryingyu5658 <i@yingyu5658.me>2025-12-24 19:13:12 +0800
commit9ac5c71d93e6b9a3af498e888c07dd046c4962cc (patch)
treef3d0371ce54a5da7ef5717e847bc7b299365c68e /layouts/shortcodes/recent-posts.html
parent66543c0b3449b5dfc48c3b6a62b0387788b69d3f (diff)
downloadblog-9ac5c71d93e6b9a3af498e888c07dd046c4962cc.tar.gz
blog-9ac5c71d93e6b9a3af498e888c07dd046c4962cc.zip
Merry Christmas
Diffstat (limited to 'layouts/shortcodes/recent-posts.html')
-rw-r--r--layouts/shortcodes/recent-posts.html24
1 files changed, 24 insertions, 0 deletions
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 }}