@@ -0,0 +1,44 @@
|
||||
{{- define "title" }}{{ T "archive" }} - {{ .Site.Title }}{{ end -}}
|
||||
|
||||
{{- define "item" -}}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">{{ .Title | title }}</a>
|
||||
{{ with .Keywords }}<span class="keywords">{{ . }}</span>{{ end }}
|
||||
{{ with .Description }}<div class="description">{{ . }}</div>{{ end }}
|
||||
</li>
|
||||
{{- end }}
|
||||
|
||||
{{- define "content" }}
|
||||
{{- range .Pages.GroupByParam "category" }}
|
||||
<section class="list-zettels">
|
||||
<span class="list-title">{{ .Key | title }}:</span>
|
||||
<ul>
|
||||
{{- range (where .Pages "Params.subcategory" "eq" nil).ByTitle }}
|
||||
{{ template "item" . }}
|
||||
{{- end }}
|
||||
{{- range .Pages.GroupByParam "subcategory" }}
|
||||
<li class="subcategory">
|
||||
<span class="list-subtitle">{{ .Key | title }}:</span>
|
||||
<ul>
|
||||
{{- range .Pages.ByTitle }}
|
||||
{{ template "item" . }}
|
||||
{{- end }}
|
||||
</ul>
|
||||
</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
</section>
|
||||
{{- end }}
|
||||
|
||||
{{- $uncat := where .Pages "Params.category" "eq" nil }}
|
||||
{{- if $uncat }}
|
||||
<section class="list-zettels">
|
||||
<span class="list-title">Other:</span>
|
||||
<ul>
|
||||
{{- range $uncat.ByTitle }}
|
||||
{{ template "item" . }}
|
||||
{{- end }}
|
||||
</ul>
|
||||
</section>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user