hugo-theme-zzo/layouts/partials/header/header-img.html

27 lines
1.3 KiB
HTML

{{ if $.Params.header }}
{{ range $.Params.header }}
{{ if eq .type "img" }}
<div class="site-header basicflex-column site-header__align-{{ .align }}" data-ani="{{ $.Site.Params.enableUiAnimation | default "true" }}" style="background-image: url('{{ .imageSrc | relURL }}'); background-size: {{ .imageSize }};
background-repeat: {{ .imageRepeat }}; background-position: {{ .imagePosition }}; width: 100%; height: {{ .height }}px; padding: {{ .paddingY }}px {{ .paddingX }}px;">
{{ $header := . }}
{{ if .title }}
{{ range .title }}
<div class="site-header__title {{ if $header.titleShadow }}site-header__title--shadow{{ end }}" style="font-size: {{ $header.titleFontSize }}px; {{ with $header.titleColor }}color:{{ . }}{{ end }};">
{{ . }}
</div>
{{ end }}
{{ end }}
{{ if .spaceBetweenTitleSubtitle }}
<div style="height: {{ .spaceBetweenTitleSubtitle }}px"></div>
{{ end }}
{{ if .subtitle }}
{{ range .subtitle }}
<div class="site-header__subtitle" style="font-size: {{ $header.subtitleFontSize }}px; {{ with $header.subtitleColor }}color:{{ . }}{{ end }}" data-cursive="{{ with $header.subtitleCursive }}{{ . }}{{ end }}">
{{ . }}
</div>
{{ end }}
{{ end }}
</div>
{{ end }}
{{ end }}
{{ end }}