refactor: move Vuepress files in dedicated directory

Signed-off-by: Lucien Cartier-Tilet <lucien@phundrak.com>
This commit is contained in:
2023-02-02 19:45:15 +01:00
parent 8e7322c225
commit 8413181750
59 changed files with 9 additions and 9 deletions

View File

@@ -0,0 +1,25 @@
<template>
<img :srcset="srcset" :sizes="sizes" :alt="props.alt" :src="props.src" />
</template>
<script setup lang="ts">
const props = defineProps<{
src: string;
width: number;
preview: string;
previewWidth: number;
previewThreshold?: number;
alt?: string;
}>();
const srcset = [
`${props.preview} ${props.previewWidth}w`,
`${props.src} ${props.width}w`,
].join(', ');
const sizes = [
`(max-width: ${props.previewThreshold || props.previewWidth}px) ${
props.previewWidth
}px`,
`${props.width}px`,
].join(', ');
</script>