mirror of https://github.com/jpanther/congo.git
🛠 fix: Syntax error
parent
88c73a3aae
commit
0d4fe03a45
|
@ -1,13 +1,14 @@
|
|||
{{ $url := urls.Parse .Destination }}
|
||||
{{ $altText := .Text }}
|
||||
{{ $caption := .Title }}
|
||||
{{ $lazyLoad := $.Page.Site.Params.enableImageLazyLoading | default true }}
|
||||
{{ if findRE "^https?" $url.Scheme }}
|
||||
<figure>
|
||||
<img
|
||||
class="mx-auto my-0 rounded-md"
|
||||
src="{{ $url.String }}"
|
||||
alt="{{ $altText }}"
|
||||
{{ if .Site.Params.enableImageLazyLoading | default true }}
|
||||
{{ if $lazyLoad }}
|
||||
loading="lazy"
|
||||
{{ end }}
|
||||
/>
|
||||
|
@ -39,7 +40,7 @@
|
|||
{{ end }}
|
||||
{{ end }}
|
||||
alt="{{ $altText }}"
|
||||
{{ if .Site.Params.enableImageLazyLoading | default true }}
|
||||
{{ if $lazyLoad }}
|
||||
loading="lazy"
|
||||
{{ end }}
|
||||
/>
|
||||
|
@ -51,7 +52,7 @@
|
|||
class="mx-auto my-0 rounded-md"
|
||||
src="{{ $url.String }}"
|
||||
alt="{{ $altText }}"
|
||||
{{ if .Site.Params.enableImageLazyLoading | default true }}
|
||||
{{ if $lazyLoad }}
|
||||
loading="lazy"
|
||||
{{ end }}
|
||||
/>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
{{ end }}
|
||||
{{ end }}
|
||||
alt="{{ $.Params.featureAlt | default $.Params.coverAlt | default "" }}"
|
||||
{{ if .Site.Params.enableImageLazyLoading | default true }}
|
||||
{{ if $.Site.Params.enableImageLazyLoading | default true }}
|
||||
loading="lazy"
|
||||
{{ end }}
|
||||
/>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
160w, {{- (.Fill "320x240 smart").RelPermalink }} 2x"
|
||||
src="{{ (.Fill "160x120 smart").RelPermalink }}"
|
||||
{{ end }}
|
||||
{{ if .Site.Params.enableImageLazyLoading | default true }}
|
||||
{{ if $.Site.Params.enableImageLazyLoading | default true }}
|
||||
loading="lazy"
|
||||
{{ end }}
|
||||
/>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
height="96"
|
||||
alt="{{ $.Site.Author.name | default "Author" }}"
|
||||
src="{{ $authorImage.RelPermalink }}"
|
||||
{{ if .Site.Params.enableImageLazyLoading | default true }}
|
||||
{{ if $.Site.Params.enableImageLazyLoading | default true }}
|
||||
loading="lazy"
|
||||
{{ end }}
|
||||
/>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
height="144"
|
||||
alt="{{ $.Site.Author.name | default "Author" }}"
|
||||
src="{{ $authorImage.RelPermalink }}"
|
||||
{{ if .Site.Params.enableImageLazyLoading | default true }}
|
||||
{{ if $.Site.Params.enableImageLazyLoading | default true }}
|
||||
loading="lazy"
|
||||
{{ end }}
|
||||
/>
|
||||
|
|
Loading…
Reference in New Issue