diff options
| author | Eltrac <hi@guhub.cn> | 2025-04-25 23:06:54 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-04-25 23:06:54 +0800 |
| commit | cb960d90e234a4b76d471d352ffed8a1982b36cc (patch) | |
| tree | 747fcef95736dd1fbbabe4038174bc667fe082ab /layouts/_default | |
| parent | d91cdae6f0efad23c15d6f1a6dfffce54399682c (diff) | |
chore: rename 分类 to 专栏 and style uncategorized list
Former-commit-id: 9ff8c08731833841b81671df0d7ceae008a4b5ef
Diffstat (limited to 'layouts/_default')
| -rw-r--r-- | layouts/_default/taxonomy.html | 7 | ||||
| -rw-r--r-- | layouts/_default/uncategorized.html | 33 |
2 files changed, 25 insertions, 15 deletions
diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html index ad1179e2..14be0c9a 100644 --- a/layouts/_default/taxonomy.html +++ b/layouts/_default/taxonomy.html @@ -71,10 +71,11 @@ {{ end }} {{ end }} </section> + + <p class="uncategorized-link-container"> + <a class="uncategorized-link" href="/categories/uncategorized/">查看随笔</a> + </p> {{ end }} - <p class="uncategorized-link-container"> - <a class="uncategorized-link" href="/categories/uncategorized/">查看未分类文章</a> - </p> </article> {{ partial "footer.html" . }} {{ end }} diff --git a/layouts/_default/uncategorized.html b/layouts/_default/uncategorized.html index 1f777025..afec928a 100644 --- a/layouts/_default/uncategorized.html +++ b/layouts/_default/uncategorized.html @@ -2,19 +2,28 @@ <article class="posts termlist-page"> {{ partial "components/post-page-header.html" . }} {{ partial "components/breadcrumbs.html" . }} - <div class="post-content"> - <!-- Uncategorized --> - {{ $uncategorized := where (where .Site.RegularPages "Section" "posts") "Params.categories" "==" nil }} - {{ if $uncategorized }} - <section class="uncategorized-posts"> - <ol> - {{ range $uncategorized }} - <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li> - {{ end }} - </ol> - </section> - {{ end }} + <div class="post-content markdown-body"> + <p>{{ .Content }}</p> </div> + <!-- Uncategorized --> + {{ $uncategorized := where (where .Site.RegularPages "Section" "posts") "Params.categories" "==" nil }} + {{ if $uncategorized }} + <section class="uncategorized-posts term-list"> + <ol class="term-list-posts"> + {{ range $uncategorized }} + <li> + <a href="{{ .RelPermalink }}" data-umami-event="Click Post Link from Uncategorized"> + {{ .Title }}{{ with .Params.subtitle }}:<span class="posts-subtitle">{{. }}</span> + {{ end }} + </a> + <time> + {{ .Date.Format "2006-1-2" }} + </time> + </li> + {{ end }} + </ol> + </section> + {{ end }} </article> {{ partial "footer.html" . }} {{ end }} |
