{{ define "main" }} {{- $all := partialCached "concepts.html" "concepts" }}
{{- if not (and .Params.docName (not .Params.shift)) }}

{{ partial "title.html" . }}

{{ end }} {{- if eq .Path "/knowledge" }} {{- /* The bundle's own page: what its root file declares, then its index as written. */ -}} {{- $c := .Params.concept }}

{{ $c.description }}

{{- /* The bundle's record as a catalogue card, its base IRI the call number: a bar of the ladder's states, the health figures, then the rest. */ -}} {{- $tones := partial "tones.html" . }} {{- $n := newScratch }} {{- range $all.id }}{{ $n.Add .trust.tone 1 }}{{ end }} {{- $health := "health/" | relURL }}
Knowledge bundle{{ with $c.lokf_version }} LOKF {{ . }}{{ end }} {{- with $c.base_iri }}{{ . }}{{ end }}

Health{{ len $all.id }} concepts

{{ partial "health-tiles.html" (dict "states" true) }}
{{- with $c.license }}
Licence
{{ partial "licence.html" . }}
{{ end }} {{- with $c.publisher }}
Publisher
{{ or .name .id }}
{{ end }}
As data
{{ range $f := slice "concepts.jsonld" "graph.json" "graph.nt" "datasets.jsonld" }}{{ $f }} {{ end }}
{{ partial "content.html" . }} {{- else if hasPrefix .Path "/knowledge/" }} {{- /* A group's page: its concepts by title, each with its trust label and description. */ -}} {{- else }} {{- /* A docs folder's own page: its index.md when it has one, and for docs/ itself every page by its group. */ -}} {{ partial "content.html" . }} {{- if eq .Path "/docs" }} {{- range (partialCached "docs-groups.html" "docs").list }}

{{ .label }}

{{- end }} {{- end }} {{- end }}
{{ end }}