aboutsummaryrefslogtreecommitdiffstats
path: root/layouts/shortcodes
diff options
context:
space:
mode:
authorVerdant <i@glowisle.me>2026-03-28 15:47:16 +0800
committerVerdant <i@glowisle.me>2026-03-28 15:47:16 +0800
commit48b656c949000ec88d6e46afbdb8d2d6adf10d70 (patch)
tree47e06c05f022b54572a7a395d8f254dbfd8d8066 /layouts/shortcodes
parent1995f80a01040a3194c1d8d62aaf7b4c81e9e62d (diff)
downloadblog-48b656c949000ec88d6e46afbdb8d2d6adf10d70.tar.gz
blog-48b656c949000ec88d6e46afbdb8d2d6adf10d70.zip
style: refactor CSS style
Diffstat (limited to 'layouts/shortcodes')
-rw-r--r--layouts/shortcodes/recent-posts.html17
1 files changed, 11 insertions, 6 deletions
diff --git a/layouts/shortcodes/recent-posts.html b/layouts/shortcodes/recent-posts.html
index ce5fba0..5c209f1 100644
--- a/layouts/shortcodes/recent-posts.html
+++ b/layouts/shortcodes/recent-posts.html
@@ -8,12 +8,11 @@
padding: 0;
}
.recent-list li {
- margin-bottom: 0.5em;
- line-height: 1.4;
+ margin-bottom: 8px;
}
.recent-date {
font-family: monospace;
- margin-right: 1.5em;
+ margin-right: 10px;
white-space: nowrap;
}
.recent-title {
@@ -46,14 +45,20 @@
</style>
<div class="recent-posts">
- <h2>最近更新</h2>
{{ if $recent }}
<ul class="recent-list">
{{ range $recent }}
- <li>
+ <div class="recent-item">
+ <li>
<span class="recent-date">{{ .Date.Format "2006-01-02" }}</span>
<a href="{{ .RelPermalink }}" class="recent-title">{{ .Title }}</a>
- </li>
+ </li>
+
+ <summary>
+ {{ .Summary }}
+ </summary>
+
+ </div>
{{ end }}
</ul>
{{ else }}