diff options
| author | Eltrac <hi@guhub.cn> | 2024-12-12 22:58:25 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2024-12-12 22:58:25 +0800 |
| commit | 22b68a6d79f322015f8b614cebc4d39f5ab41f25 (patch) | |
| tree | 30e02632d8f2383c216e5c0709a9dd186a88bc7e | |
| parent | 5f6594dc13b05991237023d08901322a04b2da9c (diff) | |
fix(theme): css scope creep in posts list items
| -rw-r--r-- | themes/yinyang/assets/css/index.css | 2 | ||||
| -rw-r--r-- | themes/yinyang/layouts/index.html | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/themes/yinyang/assets/css/index.css b/themes/yinyang/assets/css/index.css index 34687048..fb9bdca9 100644 --- a/themes/yinyang/assets/css/index.css +++ b/themes/yinyang/assets/css/index.css @@ -200,7 +200,7 @@ a:hover { padding-inline-start: 1em; } -.featured-post .posts-title a { +.featured-post a.posts-title-link { font-weight: 800; display: block; } diff --git a/themes/yinyang/layouts/index.html b/themes/yinyang/layouts/index.html index c59f3abd..c8bd5617 100644 --- a/themes/yinyang/layouts/index.html +++ b/themes/yinyang/layouts/index.html @@ -3,9 +3,9 @@ {{ partial "header.html" . }} <div id="posts-list"> {{ $currentYear := now.Format "2006" }} <!-- 获取当前年份 --> - + {{ $isFirstPost := true }} <!-- 用于标记首页的第一篇文章 --> - + {{ range (where site.RegularPages "Type" "in" site.Params.mainSections).GroupByDate "2006" -}} <section class="posts-year-section"> <h1 class="site-date-catalog posts-year-title">{{ .Key }}</h1> @@ -23,7 +23,7 @@ <div class="posts-title col-xs-9 col-sm-10"> <div class="row"> <div class="col-xs-11 col-sm-10"> - <a href="{{ .RelPermalink }}">{{ .Title }}</a> + <a class="posts-title-link" href="{{ .RelPermalink }}">{{ .Title }}</a> <div class="posts-excerpt"> {{ if $isFirstPost }} {{ if .Params.description }} |
