{{- $ie8 := resources.Get "scss/ie8.scss" | toCSS | minify | fingerprint }}
<link rel="stylesheet" th:rel="stylesheet" type="text/css" href="{{ $ie8.RelPermalink }}" integrity="{{ $ie8.Data.Integrity }}">
<![endif]-->
+{{ block "custom_css" . }}{{ end }}
<link rel="canonical" href="layout.html" th:href="${_canonical.get(uri)}?:${uri}">
<script th:replace="${scripts_head}?:~{}"></script>
-{{ define "main" }}
- <h1>{{ .Title }}</h1>
- {{ .Content }}
- {{ range .Pages }}
- <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
- {{ end }}
-{{ end }}
+{{- define "custom_css" }}
+<style>
+.terms-tags li {
+ display: inline-block;
+ margin: 10px;
+ font-weight: 500;
+}
+
+.terms-tags a {
+ display: block;
+ padding: 3px 10px;
+ background: var(--tertiary);
+ border-radius: 6px;
+ transition: transform 0.1s;
+}
+
+.terms-tags a:active {
+ background: var(--tertiary);
+ transform: scale(0.96);
+}
+</style>
+{{- end }}
+{{- define "main" }}
+
+{{- if .Title }}
+<header class="page-header">
+ <h1>{{ .Title }}</h1>
+ {{- if .Description }}
+ <div class="post-description">
+ {{ .Description }}
+ </div>
+ {{- end }}
+</header>
+{{- end }}
+
+<ul class="terms-tags">
+ {{- $type := .Type }}
+ {{- range $key, $value := .Data.Terms.Alphabetical }}
+ {{- $name := .Name }}
+ {{- $count := .Count }}
+ {{- with site.GetPage (printf "/%s/%s" $type $name) }}
+ <li>
+ <a href="{{ .Permalink }}">{{ .Name }} <sup><strong><sup>{{ $count }}</sup></strong></sup> </a>
+ </li>
+ {{- end }}
+ {{- end }}
+</ul>
+
+{{- end }}{{/* end main */ -}}