diff options
| author | Eltrac <hi@guhub.cn> | 2025-05-16 16:06:33 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-05-16 16:06:33 +0800 |
| commit | 0c427dd05a4db9ebd9435b61511f5e3f41b56c53 (patch) | |
| tree | 808a63a1a041dce7318966f78e20e9b99ca940e7 | |
| parent | b04fad6631ec6812a8525c009b36bef5d0c8424a (diff) | |
feat: better index page
1. add section link in post list item
2. remove icons indicating section
3. styles
| -rw-r--r-- | assets/css/components/_postlist.scss | 6 | ||||
| -rw-r--r-- | layouts/index.html | 17 |
2 files changed, 10 insertions, 13 deletions
diff --git a/assets/css/components/_postlist.scss b/assets/css/components/_postlist.scss index ece25b80..f66b7b7a 100644 --- a/assets/css/components/_postlist.scss +++ b/assets/css/components/_postlist.scss @@ -25,13 +25,15 @@ } .posts-item-meta { - time { + p, time { color: var(--secondary-text-color); + } + time { font-family: var(--mono-font-family); } a.post-tag { - color: var(--secondary-text-color); font-size: 0.8rem; + color: var(--secondary-text-color); } .posts-item-title { filter: url(#xs); diff --git a/layouts/index.html b/layouts/index.html index 6649f9ac..abd5a9f7 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -12,9 +12,12 @@ style="view-transition-name: post-{{ .File.UniqueID }}"> <header> <div class="posts-item-meta"> - <time> - {{ .Date.Format "Jan 2" }} - </time> + <p class="font-mono"> + <time> + {{ .Date.Format "Jan 2" }}, + </time> + <span>in <a href="/{{ .Section }}/">{{ .Section }}</a></span> + </p> <h2 class="posts-item-title" {{ if $firstPost }} style="margin-bottom: 0"{{ end }}> <a @@ -48,14 +51,6 @@ </div> {{ $firstPost = false }} <!-- 更新为非第一篇 --> {{ end }} - <!-- 如果是小说,则显示图标 --> - {{ if or (eq .Section "fictions") (eq .Section "library") }} - <div class="posts-item-icon invert-if-dark"> - <img src="{{ if eq .Section "fictions" }} - {{ .Site.BaseURL }}img/skull-slices.svg{{ else }} - {{ .Site.BaseURL }}img/book-storm.svg{{ end }}" /> - </div> - {{ end }} </div> {{ end }} </div> |
