15 lines
476 B
Vue
15 lines
476 B
Vue
<script setup lang="ts">
|
|
import { classes, safeUrl } from './support';
|
|
|
|
defineProps<{ data: Record<string, any>; style?: Record<string, string> }>();
|
|
</script>
|
|
|
|
<template>
|
|
<section :class="['mb-block mb-image', classes(style)]">
|
|
<figure class="mb-inner">
|
|
<img :src="safeUrl(data.photo)" :alt="data.caption || ''" loading="lazy" />
|
|
<figcaption v-if="data.caption">{{ data.caption }}</figcaption>
|
|
</figure>
|
|
</section>
|
|
</template>
|