移除懒加载
This commit is contained in:
@@ -299,7 +299,7 @@ class Search {
|
||||
</div>
|
||||
{item.image &&
|
||||
<div class="article-image">
|
||||
<img src={item.image} loading="lazy" />
|
||||
<img src={item.image} />
|
||||
</div>
|
||||
}
|
||||
</a>
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
{{ with $Width }}width="{{ . }}"{{ end }}
|
||||
{{ with $Height }}height="{{ . }}"{{ end }}
|
||||
{{ with $Srcset }}srcset="{{ . }}"{{ end }}
|
||||
loading="lazy"
|
||||
{{ with $alt }}
|
||||
alt="{{ . }}"
|
||||
{{ end }}
|
||||
|
||||
@@ -34,10 +34,9 @@
|
||||
|
||||
<img src="{{ $Permalink }}"
|
||||
width="{{ $Width }}"
|
||||
height="{{ $Height }}"
|
||||
loading="lazy">
|
||||
height="{{ $Height }}">
|
||||
{{ else }}
|
||||
<img src="{{ $image.permalink }}" loading="lazy" />
|
||||
<img src="{{ $image.permalink }}" />
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
@@ -29,10 +29,9 @@
|
||||
<img src="{{ $Permalink }}"
|
||||
width="{{ $Width }}"
|
||||
height="{{ $Height }}"
|
||||
alt="{{ .Title }}"
|
||||
loading="lazy">
|
||||
alt="{{ .Title }}">
|
||||
{{ else }}
|
||||
<img src="{{ $image.permalink }}" loading="lazy" alt="Featured image of post {{ .Title }}" />
|
||||
<img src="{{ $image.permalink }}" alt="Featured image of post {{ .Title }}" />
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
@@ -20,12 +20,11 @@
|
||||
<img src="{{ $Permalink }}"
|
||||
width="{{ $Width }}"
|
||||
height="{{ $Height }}"
|
||||
loading="lazy"
|
||||
alt="Featured image of post {{ .context.Title }}"
|
||||
{{ with .context.Slug }}data-key="{{ . }}" {{ end }}
|
||||
data-hash="{{ $imageRaw.Data.Integrity }}">
|
||||
{{ else }}
|
||||
<img src="{{ $image.permalink }}" loading="lazy" data-key="{{ .context.Slug }}" data-hash="{{ $image.permalink }}"/>
|
||||
<img src="{{ $image.permalink }}" data-key="{{ .context.Slug }}" data-hash="{{ $image.permalink }}"/>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
@@ -22,10 +22,9 @@
|
||||
{{ with $Srcset }}srcset="{{ . }}"{{ end }}
|
||||
width="{{ $Width }}"
|
||||
height="{{ $Height }}"
|
||||
loading="lazy"
|
||||
alt="Featured image of post {{ .Title }}" />
|
||||
{{ else }}
|
||||
<img src="{{ $image.permalink }}" loading="lazy" alt="Featured image of post {{ .Title }}" />
|
||||
<img src="{{ $image.permalink }}" alt="Featured image of post {{ .Title }}" />
|
||||
{{ end }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
{{ $permalink = .RelPermalink }}
|
||||
{{ end }}
|
||||
<div class="article-image">
|
||||
<img src="{{ $permalink }}" loading="lazy"{{ with $link.alt }} alt="{{ . }}"{{ end }}>
|
||||
<img src="{{ $permalink }}"{{ with $link.alt }} alt="{{ . }}"{{ end }}>
|
||||
</div>
|
||||
{{ end }}
|
||||
</a>
|
||||
|
||||
@@ -11,14 +11,14 @@
|
||||
<figure class="site-avatar">
|
||||
<a href="{{ .Site.BaseURL | relLangURL }}">
|
||||
{{ if not .local }}
|
||||
<img src="{{ .src }}" width="300" height="300" class="site-logo" loading="lazy" alt="Avatar">
|
||||
<img src="{{ .src }}" width="300" height="300" class="site-logo" alt="Avatar">
|
||||
{{ else }}
|
||||
{{ $avatar := resources.Get (.src) }}
|
||||
|
||||
{{ if $avatar }}
|
||||
{{ $avatarResized := $avatar.Resize "300x" }}
|
||||
<img src="{{ $avatarResized.RelPermalink }}" width="{{ $avatarResized.Width }}"
|
||||
height="{{ $avatarResized.Height }}" class="site-logo" loading="lazy" alt="Avatar">
|
||||
height="{{ $avatarResized.Height }}" class="site-logo" alt="Avatar">
|
||||
{{ else }}
|
||||
{{ errorf "Failed loading avatar from %q" . }}
|
||||
{{ end }}
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
{{- $ytHost := cond $pc.PrivacyEnhanced "www.youtube-nocookie.com" "www.youtube.com" -}}
|
||||
{{- $id := .Get "id" | default (.Get 0) -}}
|
||||
<div class="video-wrapper">
|
||||
<iframe loading="lazy"
|
||||
src="https://{{ $ytHost }}/embed/{{ $id }}{{ with .Get "autoplay" }}{{ if eq . "true" }}?autoplay=1{{ end }}{{ end }}"
|
||||
<iframe src="https://{{ $ytHost }}/embed/{{ $id }}{{ with .Get "autoplay" }}{{ if eq . "true" }}?autoplay=1{{ end }}{{ end }}"
|
||||
allowfullscreen
|
||||
title="YouTube Video"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user