rename .html.tmpl files to .html

This commit is contained in:
Ben Goldsworthy 2025-01-05 17:25:32 +01:00
parent 438fdbe22d
commit 37da8acf5a
Signed by: Rumperuu
SSH key fingerprint: SHA256:e5XfzNOr9UvWpEzyLfw0GtTMZWIFh3NmxH+/qQIi3xE
27 changed files with 29 additions and 29 deletions

View file

@ -0,0 +1,30 @@
<!--
Renders the related items for a given organisation for a given section.
@params sc Site context
@params tls Slug of the top-level section of the sub-section.
@params section_title Title of the sub-section to show (e.g. "Blog Posts").
@params organisation_titles `dict` of organsation titles for this org and all of its children.
-->
{{- $sc := .sc -}}
{{- $tls := .tls -}}
{{- $section_title := .section_title -}}
{{- $organisation_titles := .organisation_titles -}}
{{- range ( where ( ( $sc.GetPage $.tls ).Sections ) "Title" $.section_title ) -}}
{{- $section_items := where ( where $sc.Site.Pages "Section" $tls ) "Parent.Title" .Title -}}
{{- $organisation_items := where $section_items ".Params.organisations" "intersect" $organisation_titles -}}
{{- with ( where $organisation_items ".Params.redact" "ne" true ) -}}
{{- if in ( slice "Qualifications" "Awards" ) $section_title -}}
<section id="related-{{ $section_title | anchorize }}" class="related-section related-section--list">
{{- partial "cv/organisation/organisation-items-list.html" ( dict "organisation_title" $sc.Title "section_title" $section_title "content" . ) -}}
</section>
{{- else -}}
<section id="related-{{ $section_title | anchorize }}" class="related-section related-section--tiles">
{{- partial "cv/organisation/organisation-items-tiles.html" ( dict "section_title" $section_title "content" . ) -}}
</section>
{{- end -}}
{{- end -}}
{{- end -}}