summaryrefslogtreecommitdiff
path: root/docs/showcases/Showcase.vue
blob: 5873a8ef37335e21891eaf81e29ac36b54130339 (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
<script setup>
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>