diff options
| author | Eltrac <hi@guhub.cn> | 2025-04-01 10:43:00 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-04-01 10:43:00 +0800 |
| commit | dd2386f954cc214d7484fa1aa8063007c53bcecd (patch) | |
| tree | f8c0b077205d01f541820a5a1da1cbeaca2f1db0 | |
| parent | 8295e378cf168143ab2286bb679776d6476eb7f1 (diff) | |
feat: term list style
| -rw-r--r-- | assets/css/components/_postlist.scss | 19 | ||||
| -rw-r--r-- | layouts/_default/term.html | 25 |
2 files changed, 28 insertions, 16 deletions
diff --git a/assets/css/components/_postlist.scss b/assets/css/components/_postlist.scss index 27016245..f9d526ce 100644 --- a/assets/css/components/_postlist.scss +++ b/assets/css/components/_postlist.scss @@ -87,3 +87,22 @@ } } } + +.term-list { + ul { + list-style: none; + padding-inline-start: 0; + display: flex; + flex-direction: column; + gap: 0.5rem; + li { + display: flex; + justify-content: space-between; + font-size: 1.1rem; + time { + font-size: 0.9rem; + font-family: var(--mono-font-family); + } + } + } +} diff --git a/layouts/_default/term.html b/layouts/_default/term.html index 8e935334..7aac0646 100644 --- a/layouts/_default/term.html +++ b/layouts/_default/term.html @@ -1,5 +1,6 @@ {{ define "main" }} <article class="posts termlist-page"> + {{ partial "components/post-page-header.html" . }} {{ partial "components/breadcrumbs.html" . }} {{ with .Params.description }} @@ -9,25 +10,17 @@ </div> {{ end }} - <div id="term-list" class="posts-list"> + <div class="term-list"> <ul> {{ range .Pages }} <li> - <div class="row posts-line"> - <div class="posts-date col-xs-2"> - <time datetime="{{ .Date.Format "2006-01-02 15:04:05 MST" }}">{{ .Date.Format "06/01/02"}}</time> - </div> - <div class="posts-title col-xs-10"> - <div class="row"> - <div class="col-xs-12"> - <a href="{{ .RelPermalink }}" data-umami-event="Click Post Link from Category Page"> - {{ .Title }}{{ with .Params.subtitle }}:<span class="posts-subtitle">{{. }}</span> - {{ end }} - </a> - </div> - </div> - </div> - </div> + <a href="{{ .RelPermalink }}" data-umami-event="Click Post Link from Category Page"> + {{ .Title }}{{ with .Params.subtitle }}:<span class="posts-subtitle">{{. }}</span> + {{ end }} + </a> + <time> + {{ .Date.Format "2006-1-2" }} + </time> </li> {{ end }} </ul> |
