summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-04-02 13:46:07 +0800
committerEltrac <hi@guhub.cn>2025-04-02 13:46:07 +0800
commita8b8b4e3f894ba1a8df883db492c53e925f06bc4 (patch)
tree33dc82211f136d7ae127830841ec9f406ab6aaa3
parenta2532f3a44df4e5a02326e0f851084130d1abf22 (diff)
fix: gap between title and summary is too long
Former-commit-id: 8a1bde960bf31c52327a17fbd9df0bdfa23b61c4
-rw-r--r--layouts/index.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/layouts/index.html b/layouts/index.html
index 1d1c9347..99323bee 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -12,17 +12,17 @@
<time>
{{ .Date.Format "Jan 2" }}
</time>
- <h3>
+ <h3{{ if $firstPost }} style="margin-bottom: 0"{{ end }}>
<a href="{{ .Permalink }}">{{ .Title }}</a>
</h3>
</div>
+ {{ with .Params.categories }}
<div class="posts-item-category">
- {{ with .Params.categories }}
<a href="/categories/{{ . }}" style="padding: 0.1rem 0.3rem;">
{{ . }}
</a>
- {{ end }}
</div>
+ {{ end }}
</header>
<!-- 如果是第一篇文章,则显示摘要 -->
{{ if $firstPost }}