initial taxonomy list(s)..
This commit is contained in:
parent
565d34ced0
commit
e8202cebf0
2 changed files with 28 additions and 0 deletions
12
layouts/taxonomy/baseof.html
Normal file
12
layouts/taxonomy/baseof.html
Normal file
|
@ -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>
|
16
layouts/taxonomy/list.html
Normal file
16
layouts/taxonomy/list.html
Normal file
|
@ -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…
Add table
Reference in a new issue