aboutsummaryrefslogtreecommitdiffstats
path: root/layouts/shortcodes/recent-posts.html
diff options
context:
space:
mode:
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 }}