b96e7fed67
looks a lot better
17 lines
411 B
Vue
17 lines
411 B
Vue
<script setup lang="ts">
|
|
const props = defineProps<{ src: string }>();
|
|
|
|
const src = props.src;
|
|
const imgSrc =
|
|
src.startsWith("http://") || src.startsWith("https://")
|
|
? src
|
|
: `/images/posts/${src}`;
|
|
</script>
|
|
|
|
<template>
|
|
<figure class="flex flex-col items-center">
|
|
<img :src="imgSrc" class="drop-shadow-lg" />
|
|
<figcaption class="text-center m-0"><slot /></figcaption>
|
|
</figure>
|
|
</template>
|