Add srcset attribute to images

This commit is contained in:
Paul Nicoué 2023-03-03 15:28:20 +01:00
parent 8e4ddfd2c6
commit ab87a2f241
13 changed files with 20 additions and 8 deletions

View file

@ -2,7 +2,7 @@
<div aria-hidden="true" class="project-image">
<a tabindex="-1" :href="url" target="_blank" :title="`Accéder au site web de ${title}`">
<img :src="screenshot" :alt="`Page d'accueil du site web de ${title}`">
<img :src="image.large" :srcset="`${image.small} 640w, ${image.medium} 1280w, ${image.large} 1920w`" :alt="`Page d'accueil du site web de ${title}`">
</a>
</div>
@ -17,7 +17,7 @@
defineProps({
title: String,
url: String,
screenshot: String
image: Object
});
</script>