blob: 46d2138765448cae1cd0c6fb65d202d515e93ee0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
<script setup>
import { defineProps } from 'vue';
const props = defineProps({
src: { type: String, required: true },
author: { type: String, required: true },
url: { type: String, required: true }
});
</script>
<template>
<figure>
<a :href="url">
<img :src="src" :alt="author" />
</a>
<figcaption>
<span>Author: {{ author }}</span>
</figcaption>
</figure>
</template>
<style scoped>
img {
border-radius: 4px;
}
/* same as VPFeature */
figure {
padding: 0.8rem;
padding-bottom: 0;
border-radius: 12px;
background-color: var(--vp-c-bg-soft);
}
figcaption {
text-align: center;
padding-top: .4em;
padding-bottom: .6em;
}
</style>
|