diff options
| author | Eltrac <hi@guhub.cn> | 2025-07-14 19:05:44 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-07-14 19:05:44 +0800 |
| commit | 3cb68b6d5231ac9932b521dee767aae19ae1ca60 (patch) | |
| tree | d19a8819ab59b68498c049b270582c5a30371e9d /layouts/uncategorized.html | |
| parent | 54b306460dd67be4c0f41dee3d8ec5d6014178a7 (diff) | |
refactor: keep layouts folder structure up to standards
Former-commit-id: 44c7def3f6958550ccf965971f1819c1d6c514f1
Diffstat (limited to 'layouts/uncategorized.html')
| -rw-r--r-- | layouts/uncategorized.html | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/layouts/uncategorized.html b/layouts/uncategorized.html new file mode 100644 index 00000000..d29fa2e8 --- /dev/null +++ b/layouts/uncategorized.html @@ -0,0 +1,29 @@ +{{ define "main" }} + <article class="posts termlist-page"> + {{ partial "components/post-page-header.html" . }} + {{ partial "components/breadcrumbs.html" . }} + <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 }} |
