rename .html.tmpl
files to .html
This commit is contained in:
parent
438fdbe22d
commit
37da8acf5a
27 changed files with 29 additions and 29 deletions
38
layouts/partials/cv/organisation/get-num-of-items.html
Normal file
38
layouts/partials/cv/organisation/get-num-of-items.html
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue