{{ define "title" }} {{ .Page.Title | plainify }} | {{ .Site.Title }} {{ end }} {{ define "main-class" }} {{- if .IsDescendant ( .GetPage "/cv/organisations" ) -}}--single{{- else -}}--section{{- end -}} {{ end }} {{ define "header-scripts" }} {{ if ( or ( eq .Type "cv" ) ( .IsDescendant ( .GetPage "/cv/organisations" ) ) ) }} {{ end }} {{ end }} {{ define "footer-scripts" }} {{ if eq .Type "cv" }} {{ $js := resources.Get "js/roles-chart.js" | resources.ExecuteAsTemplate "/js/render-roles-timeline.js" . }} {{ else if .IsDescendant ( .GetPage "/cv/organisations" ) }} {{ $titles := .Scratch.Get "titles" }} {{ end }} {{ end }} {{ define "main-header" }} {{ if .IsDescendant ( .GetPage "/cv/organisations" ) }}
{{ else }}

{{ .Title | safeHTML }}.

{{ .Content }} {{ if eq .Type "cv" }} {{ end }} {{ if eq .Type "cv" }} {{ end }}
{{ end }} {{ end }} {{ define "main-body" }} {{ if .IsDescendant ( .GetPage "/cv/organisations" ) }} {{ $titles := slice (.Title | plainify) }} {{ range .Sections.ByTitle }} {{ $titles = $titles | append (slice (.Title | plainify) )}} {{ $titles = $titles | append ( partial "cv/organisations/recursive-children-titles.html" . ) }} {{ end }} {{ .Scratch.Set "titles" $titles }}
{{ .Content }}
{{ else }} {{ if eq .Type "cv" }}
{{ else if eq .Type "cv/organisations" . }} {{ with .GetPage "cv/organisations" }} {{ partial "items-table.html" . }} {{ end }} {{ else }} {{ partial "items-grid.html" . }} {{ end }} {{ end }} {{ end }}