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