2025-04-15 22:19:26 +02:00
|
|
|
{{ define "main-class" }}
|
|
|
|
{{- if .IsDescendant ( .GetPage "/cv/organisations" ) -}}
|
|
|
|
--single
|
|
|
|
{{- else -}}
|
|
|
|
--section
|
|
|
|
{{- end }} layouts-cv-organisations-section
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{ define "header-scripts" }}
|
|
|
|
<script id="Google-Charts-script" src="/js/google-charts/google-charts.js"></script>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ define "footer-scripts" }}
|
2025-06-06 17:01:20 +02:00
|
|
|
{{- partial "scripts/show_organisation_roles_in_timeline.js" ( dict "sc" $ "pc" . "organisation_titles" ( .Scratch.Get "titles" ) ) -}}
|
2025-04-15 22:19:26 +02:00
|
|
|
{{ end }}
|
2023-10-03 13:08:35 +01:00
|
|
|
|
|
|
|
{{ define "main-header" }}
|
2025-03-02 22:41:10 +01:00
|
|
|
{{ if .IsDescendant ( .GetPage "/cv/organisations" ) }}
|
|
|
|
<header class="site-content__header">
|
|
|
|
<div
|
2025-06-04 17:33:43 +02:00
|
|
|
class="article-header__featured-image article-header__featured-image--fit"
|
|
|
|
{{- with .Params.featured_image -}}
|
|
|
|
{{- with ( $.Resources.GetMatch . ) -}}
|
|
|
|
{{- $darkest := "" -}}
|
|
|
|
{{- $lightest := "" -}}
|
|
|
|
{{- if not ( in ( slice "avif" "svg" "gif" ) .MediaType.SubType ) -}}
|
|
|
|
{{- $darkest = index (sort .Colors "Luminance") 0 -}}
|
|
|
|
{{- $lightest = index (sort .Colors "Luminance" "desc") 0 -}}
|
|
|
|
{{- end -}}
|
|
|
|
style="background-image: url({{- partialCached "images/get-image.html" ( dict "img" . ) .Title -}});
|
|
|
|
background-color: {{ default ( default "#fff" $lightest ) .Params.bg -}};"
|
|
|
|
{{- else -}}
|
|
|
|
{{- errorf "No Page Resource found for src '%q' (%q).\n\n\tAvailable Page Resources are:\n\t\t%v" . $.Page.File.Path $.Page.Resources -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|
2025-03-02 22:41:10 +01:00
|
|
|
>
|
|
|
|
<div class="article-header__title-wrapper{{ if .Params.title_in_logo }}article-header__title-wrapper--no-title{{ end }}">
|
|
|
|
<h2 class="article-header__title">
|
|
|
|
{{ default .Title .Params.markup_title | .Page.RenderString }}
|
|
|
|
</h2>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
{{ else }}
|
|
|
|
<header class="site-content__header">
|
|
|
|
<h2 class="page-title">{{ .Title | safeHTML }}.</h2>
|
|
|
|
{{- .Content -}}
|
|
|
|
</header>
|
|
|
|
{{ end }}
|
2023-10-03 13:08:35 +01:00
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ define "main-body" }}
|
2025-04-15 22:19:26 +02:00
|
|
|
{{ 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 }}
|
|
|
|
|
|
|
|
<main class="site-content__body organisation">
|
|
|
|
{{- partial "cv/organisation/description.html" ( dict "content" .Content ) -}}
|
|
|
|
|
|
|
|
{{- partial "cv/organisation/roles-timeline.html" -}}
|
|
|
|
|
2025-06-04 18:16:06 +02:00
|
|
|
{{- partial "cv/organisation/related-items.html" ( dict "sc" $ "organisation_titles" ( .Scratch.Get "titles" | append ( slice .Params.fka .Params.abbreviation ) ) "organisation_title" .Title ) -}}
|
2025-04-15 22:19:26 +02:00
|
|
|
</main>
|
|
|
|
{{ else }}
|
|
|
|
{{ partialCached "cv/organisations/organisations-table.html" . }}
|
2025-03-02 22:41:10 +01:00
|
|
|
{{ end }}
|
2023-10-03 13:08:35 +01:00
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ define "main-footer" }}
|
2025-04-15 22:19:26 +02:00
|
|
|
{{ if .IsDescendant ( .GetPage "/cv/organisations" ) }}
|
|
|
|
<footer class="site-content__footer">
|
|
|
|
<section id="hierarchy">
|
|
|
|
<h3 class="subheading">Hierarchy</h3>
|
|
|
|
{{ $.Scratch.Set "parents" ( slice ) }}
|
|
|
|
{{ partial "cv/organisations/recursive-parents.html" ( dict "c" . "g" $ ) }}
|
|
|
|
{{- $parents := partial "cv/organisations/reverse-slice.html" ( $.Scratch.Get "parents" ) -}}
|
2023-10-03 13:08:35 +01:00
|
|
|
|
2025-06-06 17:01:20 +02:00
|
|
|
{{- range $parents -}}
|
|
|
|
<ul>
|
|
|
|
<li class="hierarchy-item hierarchy-item--parent">
|
|
|
|
<a href="{{- .RelPermalink -}}">
|
|
|
|
{{- default .Title .Params.markup_title | .Page.RenderString -}}
|
|
|
|
</a>
|
|
|
|
{{- end -}}
|
|
|
|
<ul>
|
|
|
|
<li class="hierarchy-item hierarchy-item--current">
|
|
|
|
{{- default .Title .Params.markup_title | .Page.RenderString -}}
|
|
|
|
</li>
|
|
|
|
{{- range .Sections -}}
|
|
|
|
<ul>{{- partial "cv/organisations/recursive-children.html" . -}}</ul>
|
|
|
|
{{- end -}}
|
|
|
|
</ul>
|
|
|
|
{{- range $parents -}}
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
{{- end -}}
|
2025-04-15 22:19:26 +02:00
|
|
|
</section>
|
|
|
|
</footer>
|
|
|
|
{{ end }}
|
2023-10-03 13:08:35 +01:00
|
|
|
{{ end }}
|