🐛 Don't lazy load prominent images

Fixes: #591
This commit is contained in:
James Panther
2023-09-10 10:38:54 +10:00
parent 743104db52
commit f34a827cea
4 changed files with 5 additions and 16 deletions
-3
View File
@@ -31,9 +31,6 @@
{{ end }}
{{ end }}
alt="{{ $.Params.featureAlt | default $.Params.coverAlt | default "" }}"
{{ if $.Site.Params.enableImageLazyLoading | default true }}
loading="lazy"
{{ end }}
/>
{{ with $.Params.coverCaption }}
<figcaption class="mb-6 -mt-3 text-center">{{ . | markdownify }}</figcaption>
+2 -5
View File
@@ -3,20 +3,17 @@
h-full
{{ end }} flex flex-col items-center justify-center text-center"
>
<header class="flex flex-col items-center mb-3">
<header class="mb-3 flex flex-col items-center">
{{ with .Site.Author.image }}
{{ $authorImage := resources.Get . }}
{{ if $authorImage }}
{{ $authorImage := $authorImage.Fill "288x288 Center" }}
<img
class="mb-2 rounded-full h-36 w-36"
class="mb-2 h-36 w-36 rounded-full"
width="144"
height="144"
alt="{{ $.Site.Author.name | default "Author" }}"
src="{{ $authorImage.RelPermalink }}"
{{ if $.Site.Params.enableImageLazyLoading | default true }}
loading="lazy"
{{ end }}
/>
{{ end }}
{{ end }}
-6
View File
@@ -9,9 +9,6 @@
height="{{ div $logo.Height 2 }}"
class="max-h-[10rem] max-w-[10rem] object-scale-down object-left{{ if $logo_dark }} hidden dark:flex{{ end }}"
alt="{{ .Site.Title }}"
{{ if .Site.Params.enableImageLazyLoading | default true }}
loading="lazy"
{{ end }}
/>
{{- if $logo_dark }}
<img
@@ -20,9 +17,6 @@
height="{{ div $logo_dark.Height 2 }}"
class="max-h-[10rem] max-w-[10rem] object-scale-down object-left dark:hidden"
alt="{{ .Site.Title }}"
{{ if .Site.Params.enableImageLazyLoading | default true }}
loading="lazy"
{{ end }}
/>
{{- end}}
</a>