Skip to content

Commit

Permalink
refactor: optimisation images section partenaires - utilisation exten…
Browse files Browse the repository at this point in the history
…sion webP + fallback en jpg
  • Loading branch information
Shamzic committed Jan 2, 2025
1 parent 06d277f commit e3f1c4a
Show file tree
Hide file tree
Showing 34 changed files with 28 additions and 17 deletions.
Binary file added public/img/partners/bordeaux-metropole.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/img/partners/bordeaux-metropole.png
Binary file not shown.
Binary file added public/img/partners/bordeaux-metropole.webp
Binary file not shown.
Binary file added public/img/partners/demarches-simplifiees.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/img/partners/demarches-simplifiees.png
Binary file not shown.
Binary file added public/img/partners/demarches-simplifiees.webp
Binary file not shown.
Binary file added public/img/partners/domifa.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/img/partners/domifa.png
Binary file not shown.
Binary file added public/img/partners/domifa.webp
Binary file not shown.
Binary file added public/img/partners/etudiant.gouv.fr.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/img/partners/etudiant.gouv.fr.png
Binary file not shown.
Binary file added public/img/partners/etudiant.gouv.fr.webp
Binary file not shown.
Binary file added public/img/partners/jeunes.gouv.fr.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/img/partners/jeunes.gouv.fr.png
Binary file not shown.
Binary file added public/img/partners/jeunes.gouv.fr.webp
Binary file not shown.
Binary file added public/img/partners/mesaidesvelo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/img/partners/mesaidesvelo.png
Binary file not shown.
Binary file added public/img/partners/mesaidesvelo.webp
Binary file not shown.
Binary file added public/img/partners/montpellier-metropole.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/img/partners/montpellier-metropole.png
Binary file not shown.
Binary file added public/img/partners/montpellier-metropole.webp
Binary file not shown.
Binary file added public/img/partners/openfisca.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/img/partners/openfisca.png
Binary file not shown.
Binary file added public/img/partners/openfisca.webp
Binary file not shown.
Binary file added public/img/partners/rdv-service-public.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/img/partners/rdv-service-public.png
Binary file not shown.
Binary file added public/img/partners/rdv-service-public.webp
Binary file not shown.
Binary file added public/img/partners/toulon-metropole.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/img/partners/toulon-metropole.png
Binary file not shown.
Binary file added public/img/partners/toulon-metropole.webp
Binary file not shown.
Binary file added public/img/partners/ville-aubervilliers.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/img/partners/ville-aubervilliers.png
Binary file not shown.
Binary file added public/img/partners/ville-aubervilliers.webp
Binary file not shown.
45 changes: 28 additions & 17 deletions src/components/home/partners-section.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,72 +10,83 @@
rel="noopener noreferrer"
class="aj-partner-link"
>
<img
:src="partner.logo"
:alt="partner.name"
class="aj-partner-logo"
loading="lazy"
/>
<picture>
<source
:srcset="getImagePath(partner.id, 'webp')"
type="image/webp"
/>
<source :srcset="getImagePath(partner.id, 'jpg')" type="image/jpeg" />
<img
:src="getImagePath(partner.id, 'jpg')"
:alt="partner.name"
class="aj-partner-logo"
loading="lazy"
width="200"
height="100"
/>
</picture>
</a>
</span>
</div>
</template>

<script setup lang="ts">
const getImagePath = (id: string, ext: string) => `/img/partners/${id}.${ext}`
const partners = [
{
id: "openfisca",
name: "OpenFisca",
logo: "/img/partners/openfisca.png",
link: "https://openfisca.org/fr/",
},
{
id: "demarches-simplifiees",
name: "Démarches Simplifiées",
logo: "/img/partners/demarches-simplifiees.png",
link: "https://demarches-simplifiees.fr/",
},
{
id: "rdv-service-public",
name: "RDV Service Public",
logo: "/img/partners/rdv-service-public.png",
link: "https://rdv.anct.gouv.fr/",
},
{
id: "domifa",
name: "Domifa",
logo: "/img/partners/domifa.png",
link: "https://domifa.fabrique.social.gouv.fr/",
},
{
id: "mesaidesvelo",
name: "Mesaidesvelo.fr",
logo: "/img/partners/mesaidesvelo.png",
link: "https://mesaidesvelo.fr/",
},
{
id: "bordeaux-metropole",
name: "Bordeaux",
logo: "/img/partners/bordeaux-metropole.png",
link: "https://www.bordeaux-metropole.fr/",
},
{
id: "montpellier-metropole",
name: "Montpellier",
logo: "/img/partners/montpellier-metropole.png",
link: "https://www.montpellier3m.fr/",
},
{
id: "toulon-metropole",
name: "Toulon",
logo: "/img/partners/toulon-metropole.png",
link: "https://metropoletpm.fr/",
},
{
id: "ville-aubervilliers",
name: "Aubervilliers",
logo: "/img/partners/ville-aubervilliers.png",
link: "https://www.aubervilliers.fr/",
},
{
id: "jeunes.gouv.fr",
name: "jeunes.gouv.fr",
logo: "/img/partners/jeunes.gouv.fr.png",
link: "https://jeunes.gouv.fr/",
},
{
id: "etudiant.gouv.fr",
name: "étudiants.gouv.fr",
logo: "/img/partners/etudiant.gouv.fr.png",
link: "https://etudiants.gouv.fr/",
},
]
Expand Down

0 comments on commit e3f1c4a

Please sign in to comment.