feat: Optimisation des photos
This commit is contained in:
parent
2081925880
commit
c8d88bf027
|
@ -9,4 +9,4 @@ image: israel-palacio-IprD0z0zqss-unsplash.jpg
|
|||
|
||||
À l'âge de 16 ans, n'oubliez pas de vous rendre en mairie pour procéder au recensement militaire. Si vous voulez plus d'information vous pouvez vous rendre sur [cette page du site du service public](https://www.service-public.fr/particuliers/vosdroits/F870).
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -28,6 +28,6 @@ Levons toutefois une ambiguïté, il ne faudrait pas se laisser aller au raccour
|
|||
|
||||
Voici l'évolution des tonnages, en kg/habitant de nos 11 communes. (en kaki la part enfouie, en vert la part recyclée ; total 385kg en 2010 contre 445 en 2020) :
|
||||
|
||||

|
||||

|
||||
|
||||
__Communiqué de la Communauté de Communes du Pays d'Urfé__
|
||||
|
|
|
@ -17,6 +17,6 @@ Il faudra venir muni de votre carte vitale.
|
|||
|
||||
N'hésitez pas !
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
{{/*
|
||||
S'il n'y a pas de / dans l'url d'une image alors on ajoute le path de l'article
|
||||
*/}}
|
||||
{{ $path := cond (in .Destination "/") .Destination (path.Join "/" .Page.RelPermalink .Destination) }}
|
||||
<img src="{{ $path | safeURL }}" alt="{{ .Text }}" {{ with .Title}} title="{{ . }}"{{ end }} />
|
||||
{{ $path := cond (in .Destination "/") .Destination (path.Join "/" .Page.File.Dir .Destination) }}
|
||||
{{ $image := .Page.Resources.GetMatch (printf "*%s*" .Destination) }}
|
||||
{{ with $image }}
|
||||
{{ $resized := $image.Resize "610x q100 webp" }}
|
||||
{{ $path = $resized.RelPermalink }}
|
||||
{{ end }}
|
||||
<img src="{{ $path | safeURL }}" alt="{{ .Text }}" {{ with .Title}} title="{{ . }}"{{ end }} loading="lazy" />
|
||||
|
|
Loading…
Reference in New Issue