27
0
Fork 1
forked from mirror/Mainroad

logo: allow specifying alt text

This commit is contained in:
Xiretza 2025-02-17 18:34:09 +00:00
parent 7f44ee734f
commit cb4d76c04e

View file

@ -1,6 +1,7 @@
{{- $logoTitle := .Site.Params.logo.title | default .Site.Title -}}
{{- $logoSubtitle := .Site.Params.logo.subtitle | default .Site.Params.subtitle -}}
{{- $logoImage := .Site.Params.logo.image -}}
{{- $logoDesc := .Site.Params.logo.desc -}}
{{- if or $logoTitle $logoImage }}
{{/* Defined when logo is mixed (image + text) */}}
@ -10,7 +11,7 @@
<a class="logo__link" href="{{ "" | relLangURL }}"{{ with $logoTitle }} title="{{ . }}"{{ end }} rel="home">
{{ with $logoImage -}}
<div class="logo__item logo__imagebox">
<img class="logo__img" src="{{ . | relURL }}">
<img class="logo__img" {{ with $logoDesc }}alt="{{ . }}"{{ end }} src="{{ . | relURL }}">
</div>
{{- end -}}
{{ with $logoTitle -}}