Update big.html to tolerate svgs

Turns out you can't specify width/height with vectors... odd
This commit is contained in:
Wolf Noble 2023-08-25 20:17:24 -05:00 committed by GitHub
parent 1e130fbe9a
commit 8cf476e37e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,7 +6,11 @@
{{- $alt := .Page.Title -}} {{- $alt := .Page.Title -}}
{{- with .Page.Params.alt }}{{ $alt = . }}{{ end -}} {{- with .Page.Params.alt }}{{ $alt = . }}{{ end -}}
{{- with $featured -}} {{- with $featured -}}
{{ if or (eq .MediaType.SubType "svg" ) ($disableImageOptimization) }} {{ if eq .MediaType.SubType "svg" }}
{{ with . }}
<img class="w-full rounded-lg single_hero_round nozoom" alt="{{ $alt }}" src="{{ .RelPermalink }}">
{{ end }}
{{ else if $disableImageOptimization }}
{{ with . }} {{ with . }}
<img class="w-full rounded-lg single_hero_round nozoom" alt="{{ $alt }}" width="{{ .Width }}" height="{{ .Height }}" src="{{ .RelPermalink }}"> <img class="w-full rounded-lg single_hero_round nozoom" alt="{{ $alt }}" width="{{ .Width }}" height="{{ .Height }}" src="{{ .RelPermalink }}">
{{ end }} {{ end }}