fix: HTML errors

This commit is contained in:
Ben Goldsworthy 2025-01-05 17:28:25 +01:00
parent c158ac525d
commit c7cfdcdb5b
Signed by: Rumperuu
SSH key fingerprint: SHA256:e5XfzNOr9UvWpEzyLfw0GtTMZWIFh3NmxH+/qQIi3xE
4 changed files with 25 additions and 15 deletions

View file

@ -15,23 +15,22 @@
class="picture"
itemprop="image"
>
{{- if $isResizable -}}
<source srcset="{{- ($src.Resize "1200x webp").RelPermalink -}}" />
<source srcset="{{- ($src.Resize "800x png").RelPermalink -}}" media="(max-width: 800px)"/>
{{- end -}}
{{ if $isResizable -}}
<source srcset="{{- ($src.Resize "1200x webp").RelPermalink -}}" />
<source srcset="{{- ($src.Resize "800x png").RelPermalink -}}" media="(max-width: 800px)"/>
{{- end }}
<img
class="u-photo picture__image"
{{- if not $isResizable -}}
{{ if not $isResizable -}}
src="{{- $src.RelPermalink -}}"
{{- else -}}
src="{{- ($src.Resize "1200x webp").RelPermalink -}}"
width="{{- $src.Width -}}"
height="{{- $src.Height -}}"
{{- end -}}
{{- with $src.Params.alt -}}alt="{{- . -}}"{{- end -}}
{{- with $src.Params.title -}}title="{{- . -}}" {{- end -}}
{{- end }}
{{ with $src.Params.alt -}}alt="{{- . -}}"{{- end }}
{{ with $src.Params.title -}}title="{{- . -}}" {{- end }}
loading="lazy"
role="img"
/>
</picture>
</picture>