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,38 +61,6 @@
flex-wrap: wrap; flex-wrap: wrap;
justify-content: center; justify-content: center;
} }
.meta-tag {
padding: 0 12px;
margin: 3px;
border: 1px solid #eaeaea;
border-radius: 1px;
background-color: #ededed;
color: #333;
i {
font-size: 0.9em;
}
&--link {
font-size: 0.8em;
text-decoration: underline;
&:hover {
opacity: 1;
color: #999;
}
i {
font-size: 1em;
}
}
.icon {
color: inherit;
}
}
} }
img { img {
display: block; display: block;
@ -116,6 +84,38 @@
} }
} }
.meta-tag {
padding: 0 12px;
margin: 3px;
border: 1px solid #eaeaea;
border-radius: 1px;
background-color: #ededed;
color: #333;
i {
font-size: 0.9em;
}
&--link {
font-size: 0.8em;
text-decoration: underline;
&:hover {
opacity: 1;
color: #999;
}
i {
font-size: 1em;
}
.icon {
color: inherit;
}
}
}
.avatar img { .avatar img {
width: 20rem; width: 20rem;
height: auto; height: auto;
@ -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 { .centered {

View File

@ -1,12 +1,19 @@
<section class="container list"> <section class="container list">
<h1 class="title"> <h1 class="title">
{{- if eq .Kind "taxonomy" -}}
{{- i18n .Data.Singular | title -}}
{{- print ": " -}}
{{- end -}}
{{- .Title -}} {{- .Title -}}
</h1> </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> <ul>
{{ range .Paginator.Pages }} {{ range .Paginator.Pages }}
<li> <li>