Give article and list titles one shared style

This commit is contained in:
2026-11-15 20:27:40 +08:00
parent c3a25718ef
commit f127486b99
3 changed files with 9 additions and 2 deletions
+7
View File
@@ -85,6 +85,13 @@ kbd {
margin-top: 0.125rem;
}
/* 文章标题与列表标题同一套字:24px、常规字重,不要标题那么大那么重 */
.post-title {
font-size: 1.5rem;
line-height: 2rem;
font-weight: 400;
}
/* 正文小标题:比主题默认小一号,h2 30px→24px,h3 24px→20px,保持层级差 */
.content h2 {
font-size: 1.5rem;
+1 -1
View File
@@ -27,7 +27,7 @@
data-index="{{ $i }}"
>
<a href="{{ $p.RelPermalink }}" class="post-card">
<h3 class="hx:text-2xl">{{ $p.Title }}</h3>
<h3 class="post-title">{{ $p.Title }}</h3>
<p class="hx:opacity-50 hx:text-sm hx:mt-1 hx:leading-7">
{{ partial "utils/format-date" $p.Date }}
</p>
+1 -1
View File
@@ -15,7 +15,7 @@
class="hx:flex hx:flex-col hx:sm:flex-row hx:items-start hx:sm:items-center hx:sm:justify-between hx:gap-4 hx:mt-2"
>
<h1
class="hx:mb-0 hx:text-4xl hx:font-bold hx:tracking-tight hx:text-slate-900 hx:dark:text-slate-100"
class="post-title hx:mb-0"
>
{{ .Title }}
</h1>