move from lazysizes to loading=lazy in-browser

This commit is contained in:
Wouter Groeneveld 2021-03-12 20:42:10 +01:00
parent 687c0a705e
commit 380eca8ba4
6 changed files with 8 additions and 6 deletions

View File

@ -195,6 +195,10 @@
top: 0
z-index: 1
img
margin: 0
overflow: hidden
&:hover::after
background-color:rgba(0,0,0,0.3)

View File

@ -1,6 +1,6 @@
<figure>
<a href="{{ .Destination | safeURL }}" class="lbox">
<img class="lazyload" data-src="{{ .Destination | safeURL }}" {{ with .Text }} alt="{{ . }}"{{ end }} {{ with .Title}} title="{{ . }}"{{ end }}>
<img loading="lazy" src="{{ .Destination | safeURL }}" {{ with .Text }} alt="{{ . }}"{{ end }} {{ with .Title}} title="{{ . }}"{{ end }}>
</a>
{{ with .Title }}
<figcaption>{{ . }}</figcaption>

View File

@ -77,7 +77,7 @@
<p>
<a href="https://facebook.com/redzuurdesem/" target="_blank" rel="noopener">
<img src="/fb/fbwidget.jpg" id="fbwidget" alt="Facebook Widget Screenshot" />
<img loading="lazy" src="/fb/fbwidget.jpg" id="fbwidget" alt="Facebook Widget Screenshot" />
</a>
</p>
</article>

View File

@ -11,7 +11,8 @@
{{- $image := $scratch.Get "image" }}
{{- $bg := ( $image | absLangURL) }}
<li class = 'post_item'>
<a class = 'post_card' href='{{ .RelPermalink }}' title = '{{ .Title }}' style = 'background-image: url({{ $bg }});'>
<a class = 'post_card' href='{{ .RelPermalink }}' title = '{{ .Title }}'>
<img loading="lazy" src="{{ $bg }}" alt="Thumbnail {{ .Title }}">
</a>
<div class = 'excerpt'>
<div class = 'excerpt_meta'>

View File

@ -14,5 +14,4 @@
{{- $scripts = resources.Get $mainScriptPath | resources.ExecuteAsTemplate $mainScriptPath . }}
{{- end }}
<script src = '/js/simple-lightbox.min.js'></script>
<script src="/js/lazysizes.min.js" async></script>
<script src = '{{ $scripts.Permalink }}'></script>

File diff suppressed because one or more lines are too long