feat: Ajout du paramètre lazy loading sur toutes les images

This commit is contained in:
Simon 2021-10-20 16:22:26 +02:00
parent acc35d1c88
commit aeccd70318
3 changed files with 7 additions and 7 deletions

View File

@ -4,7 +4,7 @@
<section>
<article>
<h1>{{ .title | markdownify }}</h1>
{{with .image}}<img src="{{ . | absURL }}" alt="Le futur du numérique responsable">{{end}}
{{with .image}}<img src="{{ . | absURL }}" alt="Le futur du numérique responsable" loading="lazy">{{end}}
<p class="mb-4">{{ .content | markdownify }}</p>
{{ if .button.enable }}
{{ with .button }}
@ -24,7 +24,7 @@
<section class="full">
{{ range .valeur_item }}
<article class="box">
<img src="images/{{.image}}.svg" alt="{{ .name | title }}" height="64" width="64">
<img src="images/{{.image}}.svg" alt="{{ .name | title }}" height="64" width="64" loading="lazy">
<h4 class="mb-2">{{ .name | title }}</h4>
<p>{{ .content | markdownify }}</p>
</article>
@ -41,7 +41,7 @@
<section class="{{ if modBool $i 2 }}image-text{{ else }}highlight text-image{{end}} full">
<article>
{{ if modBool $i 2 }}
<img src="{{ .image }}" alt="{{ .Title }}" />
<img src="{{ .image }}" alt="{{ .Title }}" loading="lazy" />
{{ else }}
{{ .content | markdownify }}
{{ end }}
@ -50,7 +50,7 @@
{{ if modBool $i 2 }}
{{ .content | markdownify }}
{{ else }}
<img src="{{ .image }}" alt="{{ .Title }}" />
<img src="{{ .image }}" alt="{{ .Title }}" loading="lazy" />
{{ end }}
</article>
</section>
@ -67,7 +67,7 @@
</article>
<article>
<a href="https://www.ronalpia.fr/">
<img src="/images/ronalpia.png" alt="Ronalpia, incubation 2021" />
<img src="/images/ronalpia.png" alt="Ronalpia, incubation 2021" loading="lazy" />
</a>
</article>
</section>

View File

@ -83,7 +83,7 @@
<div class="container cards">
{{ range .valeur_item }}
<article class="card center">
<!-- <img src="images/{{.image}}.svg" alt="{{ .name | title }}" height="64" width="64"> -->
<!-- <img src="images/{{.image}}.svg" alt="{{ .name | title }}" height="64" width="64" loading="lazy"> -->
<h3>{{ .name | title }}</h3>
<p>{{ .content | markdownify }}</p>
</article>

View File

@ -1,7 +1,7 @@
<article class="card">
<figure>
<a href="{{ .url }}">
<img src="{{ .image }}" alt="Copie d'écran du site {{ .title }}" />
<img src="{{ .image }}" alt="Copie d'écran du site {{ .title }}" loading="lazy" />
</a>
</figure>
<div>