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

{{ .Title | safeHTML }}. {{ if not ( or ( eq .Type "cv" ) ( eq .Type "cv/organisations" ) ) -}} {{- range .AlternativeOutputFormats -}} RSS feed {{- end -}} {{- end -}}

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