diff options
author | uPagge <git@upagge.ru> | 2021-02-18 01:06:16 +0300 |
---|---|---|
committer | uPagge <git@upagge.ru> | 2021-02-18 01:06:16 +0300 |
commit | 6d9fe8e5bb60672fb45c424794ad58db721f9a7c (patch) | |
tree | 4de7f2c74f8dd756b2e6c0ed39ea8921c5148311 /layouts/partials | |
parent | 222bc102083bd750be5a60667f998d67fb932590 (diff) |
lazyload test
Diffstat (limited to 'layouts/partials')
-rw-r--r-- | layouts/partials/plugin/image.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/layouts/partials/plugin/image.html b/layouts/partials/plugin/image.html index be9e491..14fd0b5 100644 --- a/layouts/partials/plugin/image.html +++ b/layouts/partials/plugin/image.html @@ -19,14 +19,14 @@ <div style="text-align: center"> {{- if .Linked -}} <a target="_blank" class="lightgallery" href="{{ $large | safeURL }}" title="{{ .Title | default $alt }}" data-thumbnail="{{ $small | safeURL }}"{{ with .Caption }} data-sub-html="<h2>{{ . }}</h2>{{ with $.Title }}<p>{{ . }}</p>{{ end }}"{{ end }}{{ with .Rel }} rel="{{ . }}"{{ end }}> - <img class="lazyload{{ with .Class }} {{ . }}{{ end }}" + <img src="{{ .Src | safeURL }}" data-src="{{ .Src | safeURL }}" data-srcset="{{ $small | safeURL }}, {{ .Src | safeURL }} 1.5x, {{ $large | safeURL }} 1.6x" data-sizes="auto" alt="{{ $alt }}"{{ with .Height }} height="{{ . }}"{{ end }}{{ with .Width }} width="{{ . }}"{{ end }} /> </a> {{- else -}} - <img class="lazyload{{ with .Class }} {{ . }}{{ end }}" + <img src="{{ .Src | safeURL }}" data-src="{{ .Src | safeURL }}" data-srcset="{{ $small | safeURL }}, {{ .Src | safeURL }} 1.5x, {{ $large | safeURL }} 1.6x" data-sizes="auto" |