refactor: split single header and meta components into partials
This commit is contained in:
parent
d0577aec91
commit
e6889cabba
22 changed files with 742 additions and 406 deletions
36
layouts/partials/single/post-meta.html
Normal file
36
layouts/partials/single/post-meta.html
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue