2022-08-10 17:22:08 -04:00
|
|
|
<script setup lang="ts">
|
2023-01-28 15:32:48 -05:00
|
|
|
const props = defineProps<{ src: string }>();
|
2022-08-10 18:05:40 -04:00
|
|
|
|
2023-01-28 15:32:48 -05:00
|
|
|
const src = props.src;
|
2022-08-10 18:05:40 -04:00
|
|
|
const imgSrc =
|
|
|
|
src.startsWith("http://") || src.startsWith("https://")
|
|
|
|
? src
|
|
|
|
: `/images/posts/${src}`;
|
2022-08-10 17:22:08 -04:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2022-08-10 18:05:40 -04:00
|
|
|
<figure class="flex flex-col items-center">
|
2023-05-23 18:12:14 -04:00
|
|
|
<img :src="imgSrc" class="drop-shadow-lg" />
|
|
|
|
<figcaption class="text-center m-0"><slot /></figcaption>
|
2022-08-10 17:22:08 -04:00
|
|
|
</figure>
|
|
|
|
</template>
|