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,38 @@
<!--
Return the number of a certain type of items an organisation has.
@params sc Site context.
@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 -}}
{{- $section_title := .section_title -}}
{{- $organisation_titles := .organisation_titles -}}
{{- $icon := dict
"Roles" "🔨"
"Blog Posts" "📌"
"Web Sites" "✉"
"Programs" "P"
"Writings" "🖉"
"Audiovisuals" "AV"
"Others" "?"
"Qualifications" "Q"
"Awards" "A"
"Appearances" "ME"
-}}
{{- $section_items := default
( where ( where $sc.Site.Pages "Section" "blog" ) "Parent.Title" $section_title )
( default
( where ( where $sc.Site.Pages "Section" "cv" ) "Parent.Title" $section_title )
( where ( where $sc.Site.Pages "Section" "portfolio" ) "Parent.Title" $section_title )
)
-}}
{{- $organisation_items := where $section_items ".Params.organisations" "intersect" $organisation_titles -}}
<span class="organisations-table__items-icon{{- if ( eq ( len $organisation_items ) 0 ) }} organisations-table__items-icon--none{{- end -}}">
{{- index $icon $section_title -}} <br>
{{- ( len $organisation_items ) -}}
</span>