refactor: split single header and meta components into partials

This commit is contained in:
Ben Goldsworthy 2025-01-27 23:34:33 +01:00
parent d0577aec91
commit e6889cabba
No known key found for this signature in database
22 changed files with 742 additions and 406 deletions

View file

@ -0,0 +1,36 @@
{{- /*
Displays the meta information for an item.
@params pc Page context
@params sc Site context
*/
-}}
<footer class="site-content__footer">
<h2>Meta</h2>
{{- with ( .pc.GetTerms "categories" ) -}}
{{ partial "single/post-meta/categories.html" ( dict "categories" . ) }}
{{- end -}}
{{- with ( .pc.GetTerms "areas" ) -}}
{{ partial "single/post-meta/life-areas.html" ( dict "areas" . ) }}
{{- end -}}
{{- with ( .pc.GetTerms "skills" ) -}}
{{ partial "single/post-meta/skills.html" ( dict "pc" $.pc "skills" . "skills_ciisec_levels" $.pc.Params.skills_ciisec_levels ) }}
{{- end -}}
{{- if ( .pc.GetTerms "organisations" ) -}}
{{ partial "single/post-meta/organisations.html" ( dict "pc" .pc "sc" .sc ) }}
{{- end -}}
{{- with ( .pc.GetTerms "locations" ) -}}
{{ partial "single/post-meta/locations.html" ( dict "locations" . ) }}
{{- end -}}
{{- with ( .pc.GetTerms "tags" ) -}}
{{ partial "single/post-meta/tags.html" ( dict "tags" . ) }}
{{- end -}}
</footer>