add categorytag labels to taxonomy pages

This commit is contained in:
Ray Elliott 2020-02-19 12:10:13 +00:00
parent d14d1d7215
commit 8ae8a63267
2 changed files with 65 additions and 37 deletions

View File

@ -61,6 +61,28 @@
flex-wrap: wrap;
justify-content: center;
}
}
img {
display: block;
margin-left: auto;
margin-right: auto;
}
figure {
margin: 0;
padding: 0;
}
figcaption p {
text-align: center;
font-style: italic;
font-size: 1.6rem;
margin: 0;
}
.featured-image {
display: block;
margin-left: auto;
margin-right: auto;
}
}
.meta-tag {
padding: 0 12px;
@ -87,34 +109,12 @@
i {
font-size: 1em;
}
}
.icon {
color: inherit;
}
}
}
img {
display: block;
margin-left: auto;
margin-right: auto;
}
figure {
margin: 0;
padding: 0;
}
figcaption p {
text-align: center;
font-style: italic;
font-size: 1.6rem;
margin: 0;
}
.featured-image {
display: block;
margin-left: auto;
margin-right: auto;
}
}
.avatar img {
width: 20rem;
@ -178,6 +178,27 @@
}
}
}
h1 {
margin-bottom: 0.8rem;
}
.list-meta {
text-align: center;
.meta-tag {
font-size: 0.7em;
padding-top: 6px;
padding-bottom: 6px;
margin-bottom: 1.6rem;
i {
font-size: 1em;
text-align: center;
width: 1.6rem;
margin-left: 0;
margin-right: 0.5rem;
}
}
}
}
.centered {

View File

@ -1,12 +1,19 @@
<section class="container list">
<h1 class="title">
{{- if eq .Kind "taxonomy" -}}
{{- i18n .Data.Singular | title -}}
{{- print ": " -}}
{{- end -}}
{{- .Title -}}
</h1>
{{- if eq .Kind "taxonomy" -}}
<div class="list-meta">
<span class="meta-tag">
{{- if eq .Data.Singular "category" -}}
<i class="icon fas fa-folder"></i>
{{- else if eq .Data.Singular "tag" -}}
<i class="icon fas fa-tag"></i>
{{- end -}}
{{- .Data.Term -}}
</span>
</div>
{{- end -}}
<ul>
{{ range .Paginator.Pages }}
<li>