initial taxonomy list(s)..

master
Marcell Mars 3 years ago
parent 565d34ced0
commit e8202cebf0

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-us{{ end }}">
<head>
{{- partialCached "head.html" . -}}
<title>{{- .Title }} - {{ .Site.Title -}}</title>
{{- partialCached "sandpointjs.html" . .RelPermalink -}}
</head>
<body>
{{- block "keywords" . -}}{{- end -}}
{{- partialCached "footer.html" . -}}
</body>
</html>

@ -0,0 +1,16 @@
{{ define "keywords" }}
{{ $p := split (trim .RelPermalink "/") "/" }}
{{ if eq (len $p) 1 }}
<div class="coretitle"><span class="supt">{{ index $p 0 }}</span>All</div>
{{ range $taxonomyname, $taxonomy := .Site.Taxonomies }}
{{ range $key, $value := $taxonomy }}
<span> <a href="/{{ index $p 0 }}/{{ $key }}">{{ $key }}</a>({{ len (index $.Site.Taxonomies.keywords $key) }})</span>
{{ end }}
{{ end }}
{{ else }}
<div class="coretitle"><span class="supt">{{ index $p 0 }}</span>{{ index $p 1 }}</div>
{{ range .Pages }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
{{ end }}
{{ end }}
Loading…
Cancel
Save