Suppression de la librairie lozad puisque les navigateurs font maintenant du lazy loading

This commit is contained in:
2022-09-13 23:27:16 +02:00
parent 5fac28ae1d
commit 9b9ceaea16
15 changed files with 14 additions and 32 deletions

View File

@ -1,7 +1,7 @@
<article class="col-lg-4 col-md-6 col-12 clearfix wow fadeInUp mb-4" data-wow-duration="500ms">
<div class="post-block">
<div class="media-wrapper">
<img class="img-fluid lozad" data-src="{{ .Params.Image_webp | absURL }}" onerror="this.onerror=null;this.src='{{ .Params.image | absURL }}'">
<img class="img-fluid" src="{{ .Params.Image_webp | absURL }}" onerror="this.onerror=null;this.src='{{ .Params.image | absURL }}'" loading="lazy">
</div>
<div class="content">

View File

@ -16,7 +16,7 @@
{{ end }}
</ul>
{{ if .Params.Image }}
<img class="img-fluid mb-50 lozad" data-src="{{ .Params.Image | absURL }}" alt="blog-image">
<img class="img-fluid mb-50" src="{{ .Params.Image | absURL }}" alt="blog-image" loading="lazy">
{{ end }}
</div>
<div class="col-lg-8 offset-lg-2">

View File

@ -14,10 +14,10 @@
<div class="content text-center">
<figure>
{{ if .Params.Image }}
<img class="rounded-circle img-fluid lozad" data-src="{{.Params.Image | relURL }}">
<img class="rounded-circle img-fluid" src="{{.Params.Image | relURL }}" loading="lazy">
{{else if .Params.Email}}
<img class="rounded-circle img-fluid lozad"
data-src="https://www.gravatar.com/avatar/{{ md5 .Params.email }}?s=128&pg&d=identicon">
<img class="rounded-circle img-fluid"
src="https://www.gravatar.com/avatar/{{ md5 .Params.email }}?s=128&pg&d=identicon" loading="lazy">
{{ end }}
<figcaption>
<h5 class="font-weight-bold">

View File

@ -5,7 +5,7 @@
{{"<!-- Welcome Slider-->" | safeHTML}}
<section class="hero-area" style='background-image: url("{{ .bg_image_webp | absURL }}")'>
<!-- this image is for trigger this section fallback background image -->
<img class="d-none" src="{{ .bg_image_webp | absURL }}" onerror="this.onerror=null;this.parentElement.style.backgroundImage= 'url({{ .bg_image | absURL }})'"/>
<img class="d-none" src="{{ .bg_image_webp | absURL }}" onerror="this.onerror=null;this.parentElement.style.backgroundImage= 'url({{ .bg_image | absURL }})'" loading="lazy"/>
<div class="block p-6">
{{ if .icon }}

View File

@ -8,7 +8,7 @@
<div class="row justify-content-center align-items-center">
<div class="col-12 col-md-2 m-md-0 m-5 m-md-3" style="height: 150px; background-image: url('{{ .image_webp | absURL }}'); background-size: contain; background-position: center; background-repeat: no-repeat; ">
<!-- this image is for trigger this section fallback background image -->
<img src="{{ .image_webp | absURL }}" style="display: none;" onerror="this.onerror=null;this.parentElement.style.backgroundImage= 'url({{ .image | absURL }})'">
<img src="{{ .image_webp | absURL }}" style="display: none;" onerror="this.onerror=null;this.parentElement.style.backgroundImage= 'url({{ .image | absURL }})'" loading="lazy">
</div>
<div class="col-12 col-md-9">
<div class="content-block">

View File

@ -18,11 +18,11 @@
{{"<!-- copyright -->" | safeHTML}}
<div class="copyright text-center">
<a href="{{ site.Home.Permalink }}">
<img src="{{ site.Params.logo | absURL }}" alt="{{ site.Title }}" height="42" />
<img src="{{ site.Params.logo | absURL }}" alt="{{ site.Title }}" height="42" loading="lazy" />
</a>
<br>
<p>{{ site.Params.copyright | markdownify }}</p>
<img src="/images/sponsors.jpg" alt="Sponsors : Nouvelle Aquitaine - UE" height="100" />
<img src="/images/sponsors.jpg" alt="Sponsors : Nouvelle Aquitaine - UE" height="100" loading="lazy" />
</div>
</div>
</div>

View File

@ -5,7 +5,7 @@
{{"<!-- Start Counter Section -->" | safeHTML}}
<section id="counter" class="parallax-section bg-1 section overly" style='background-image: url("{{ .bg_image_webp | absURL }}")'>
<!-- this image is for trigger this section fallback background image -->
<img class="lozad" style="display: none;" onerror="this.onerror=null;this.parentElement.style.backgroundImage= 'url({{ .bg_image | absURL }})'" data-src="{{ .bg_image_webp | absURL }}" />
<img style="display: none;" onerror="this.onerror=null;this.parentElement.style.backgroundImage= 'url({{ .bg_image | absURL }})'" src="{{ .bg_image_webp | absURL }}" loading="lazy" />
<div class="container">
<div class="row justify-content-center">
{{ range .counter_item }}

View File

@ -4,7 +4,7 @@
<nav class="navbar navbar-expand-sm navbar-dark">
<a class="navbar-brand p-0" href="{{ .Site.BaseURL | relLangURL }}">
{{ if site.Params.logo }}
<img class="lozad" data-src="{{ site.Params.logo | absURL }}" alt="{{ .Site.Title }}" height="42">
<img src="{{ site.Params.logo | absURL }}" alt="{{ .Site.Title }}" height="42" loading="lazy">
{{ else }}
{{ site.Title }}
{{ end }}

View File

@ -18,7 +18,7 @@
<div class="row">
{{ with .image }}
<div class="col-lg-6 p-3 text-center">
<img class="img-fluid lozad" data-src="{{ . | absURL }}" alt="image">
<img class="img-fluid" src="{{ . | absURL }}" alt="image" loading="lazy">
</div>
{{ end }}
<div class="col-lg-{{ with .image }}6{{else}}12{{ end }} p-3">

View File

@ -22,7 +22,7 @@
<div class="team-member">
<div class="member-photo">
{{"<!-- member photo -->" | safeHTML}}
<img class="img-fluid lozad" data-src="{{ .image_webp | absURL }}" onerror="this.onerror=null;this.src='{{ .image | absURL }}'" alt="{{ .name }}">
<img class="img-fluid" src="{{ .image_webp | absURL }}" onerror="this.onerror=null;this.src='{{ .image | absURL }}'" alt="{{ .name }}" loading="lazy">
{{"<!-- member social profile -->" | safeHTML}}
<div class="mask">

View File

@ -18,7 +18,7 @@
{{"<!-- client photo -->" | safeHTML}}
<div class="client-thumb">
<img class="img-fluid lozad" data-src="{{ .image_webp | absURL }}" onerror="this.onerror=null;this.src='{{ .image | absURL }}'" alt="{{ .name }}">
<img class="img-fluid" src="{{ .image_webp | absURL }}" onerror="this.onerror=null;this.src='{{ .image | absURL }}'" alt="{{ .name }}" loading="lazy">
</div>
{{"<!-- client info -->" | safeHTML}}