Change terms page
This commit is contained in:
parent
d85cdb04b3
commit
03d4390fa9
4 changed files with 50 additions and 15 deletions
|
@ -1,16 +1,16 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
|
|
||||||
<div class="archive">
|
<div class="terms">
|
||||||
<h1>{{ .Title }}</h1>
|
<h1>{{ .Title }}</h1>
|
||||||
<ul>
|
<ul class="terms__list">
|
||||||
{{ $type := .Type }}
|
{{ $type := .Type }}
|
||||||
{{ range $key, $value := .Data.Terms.Alphabetical }}
|
{{ range $key, $value := .Data.Terms.Alphabetical }}
|
||||||
{{ $name := .Name }}
|
{{ $name := .Name }}
|
||||||
{{ $count := .Count }}
|
{{ $count := .Count }}
|
||||||
{{ with $.Site.GetPage (printf "/%s/%s" $type $name) }}
|
{{ with $.Site.GetPage (printf "/%s/%s" $type $name) }}
|
||||||
<h3 class="archive__post-title">
|
<li class="terms__term">
|
||||||
<a href="{{ .Permalink }}">{{ .Name }} ({{ $count }})</a>
|
<a href="{{ .Permalink }}">#{{ .Name }} <span class="terms__term-count">{{ $count }}</span></a>
|
||||||
</h3>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
@import 'pagination';
|
@import 'pagination';
|
||||||
@import 'footer';
|
@import 'footer';
|
||||||
|
|
||||||
|
@import 'terms';
|
||||||
@import 'archive';
|
@import 'archive';
|
||||||
|
|
||||||
@import 'prism';
|
@import 'prism';
|
||||||
|
|
34
source/css/terms.css
Normal file
34
source/css/terms.css
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
.terms {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 800px;
|
||||||
|
text-align: left;
|
||||||
|
padding: 20px;
|
||||||
|
margin: 0 auto;
|
||||||
|
|
||||||
|
&__list {
|
||||||
|
padding: 0;
|
||||||
|
padding-left: 20px;
|
||||||
|
margin: 0;
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&__term {
|
||||||
|
margin-bottom: 15px;
|
||||||
|
|
||||||
|
&-count {
|
||||||
|
background: var(--light-background-secondary);
|
||||||
|
font-size: 12px;
|
||||||
|
margin-left: 5px;
|
||||||
|
padding: 2px 10px;
|
||||||
|
border-radius: 5px;
|
||||||
|
text-decoration: none;
|
||||||
|
|
||||||
|
.dark-theme & {
|
||||||
|
background: var(--dark-background-secondary);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue