Super cool tag taxonomy list and term pages

Fixes #48
This commit is contained in:
BBaoVanC 2021-11-22 15:20:20 -06:00
parent 2fdc78050a
commit 15d58effcf
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A
3 changed files with 62 additions and 0 deletions

View File

@ -66,6 +66,28 @@
/* Tags list format */
.tag-list ul {
display: flex;
list-style: none;
gap: 10px;
flex-flow: row wrap;
padding: 0;
}
.tag-list a {
background-color: #222;
padding: 8px 12px;
border-radius: 12px;
}
.tag-list a:hover {
text-decoration: none;
background-color: #333;
}
/* Series list format */
.series-pages ul {
display: flex;
@ -510,6 +532,7 @@ li.disabled > .page-link:hover {
.topbar,
.section,
.tag-list a,
.page-list li,
.series-taxonomy li,
.series-box,
@ -523,6 +546,7 @@ li.disabled > .page-link:hover {
}
.section:hover,
.tag-list a:hover,
.navbar-item:hover,
.langpicker summary:hover,
.langpicker[open] summary,

16
layouts/tags/list.html Normal file
View File

@ -0,0 +1,16 @@
{{ define "main" }}
<h1>
{{ partial "icon.html" "tag" }}
{{ .Title | markdownify }}
</h1>
<div class="tag-list">
<ul>
{{ range .Data.Terms.Alphabetical }}
<a href="{{ .Page.Permalink }}">
<li>{{ .Page.Title | markdownify }}</li>
</a>
{{ end }}
</ul>
</div>
{{ end }}

22
layouts/tags/term.html Normal file
View File

@ -0,0 +1,22 @@
{{ define "main" }}
<h1>
{{ partial "icon.html" "tag" }}
{{ .Title | markdownify }}
{{ partial "rss-link.html" . }}
</h1>
{{ partial "description-or-summary.html" . }}
<div class="page-list">
<ul>
{{ range .Paginator.Pages }}
<li>{{ .Render "summary/post" }}</li>
{{ else }}
<div>
{{ i18n "no_posts" }}
</div>
{{ end }}
</ul>
</div>
{{ partial "pagination.html" . }}
{{ end }}