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
30
layouts/partials/cv/organisation/get-title.html
Normal file
30
layouts/partials/cv/organisation/get-title.html
Normal file
|
@ -0,0 +1,30 @@
|
|||
{{- /*
|
||||
Displays an organisation's title.
|
||||
|
||||
@params organisation The organisation to display.
|
||||
@params site_redact The site-level redaction display settings.
|
||||
*/
|
||||
-}}
|
||||
|
||||
{{ $is_redacted := .organisation.Params.redact }}
|
||||
{{ $is_site_show_redacted := eq .site_redact "show" }}
|
||||
{{ $is_site_black_redacted := eq .site_redact "black" }}
|
||||
{{ $is_hidden := and $is_redacted ( not $is_site_show_redacted ) }}
|
||||
|
||||
{{- if $is_hidden -}}
|
||||
{{- if $is_site_black_redacted -}}
|
||||
<li>{{- partialCached "redact-black.html" . -}}</li>
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
<li>
|
||||
<a href="{{ .organisation.RelPermalink }}"
|
||||
>{{ if ( .organisation.Params.markup_title ) }}
|
||||
{{ .organisation.Params.markup_title | safeHTML }}
|
||||
{{ else if ( .organisation.Params.titleLang ) }}
|
||||
{{ partial "text/foreign-text.html" ( dict "original" .organisation.Title "lang" .organisation.Params.titleLang "translation" .organisation.Params.titleTrans ) }}
|
||||
{{ else }}
|
||||
{{ .organisation.Title }}
|
||||
{{ end }}</a
|
||||
>
|
||||
</li>
|
||||
{{- end -}}
|
Loading…
Add table
Add a link
Reference in a new issue