congo/layouts/partials/logo.html

30 lines
1.2 KiB
HTML
Raw Normal View History

{{- if $.Page.Site.Params.header.logo }}
{{- $logo := resources.Get $.Page.Site.Params.header.logo }}
{{- $logo_dark := resources.Get $.Page.Site.Params.header.logoDark }}
{{- $logoAlt := $.Page.Site.Title -}}
{{- $logoClass := "max-h-[10rem] max-w-[10rem] object-scale-down object-left flex" -}}
{{- $logoDarkClass := (print $logoClass " hidden dark:flex") -}}
{{- if $logo_dark -}}
{{- $logoClass = (print $logoClass " dark:hidden" ) -}}
{{- end }}
{{- if or $logo $logo_dark -}}
<a href="{{ "" | relLangURL }}" class="mr-2">
{{- end }}
{{- with $logo }}
{{- partial "picture.html" (dict "img" . "alt" $logoAlt "class" $logoClass "lazy" false "webp" false ) -}}
{{- end -}}
{{- with $logo_dark }}
{{- partial "picture.html" (dict "img" . "alt" $logoAlt "class" $logoDarkClass "lazy" false "webp" false ) -}}
{{- end -}}
{{- if or $logo $logo_dark -}}
</a>
2022-11-10 00:32:43 +00:00
{{- end }}
{{- end }}
{{- if $.Page.Site.Params.header.showTitle | default true }}
<a
class="decoration-primary-500 hover:underline hover:decoration-2 hover:underline-offset-2"
rel="me"
href="{{ "" | relLangURL }}"
>{{ .Site.Title | markdownify | emojify }}</a
>
{{- end }}