summaryrefslogtreecommitdiff
path: root/docs/src/components/Showcase.astro
blob: 7eea178b1b8ef68091410ad0d3ad8166c2757fad (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
---
interface Props {
    src: string
    author: string
    url: string
}

const { src, author, url } = Astro.props
---

<figure>
    <a href={url}>
        <img src={src} alt={author}>
    </a>
    <figcaption>
        <span>Author: {author}</span>
    </figcaption>
</figure>

<style>
img {
    border-radius: calc(var(--card-radius) - 8px);
}

figure {
    padding: .8rem;
    padding-bottom: 0;
    border-radius: var(--card-radius);
    background-color: color-mix(in srgb, var(--sl-color-black), var(--sl-color-white) 2%);
    border: 1px solid var(--sl-color-gray-6);
}

figcaption {
    text-align: center;
    margin: 0;
}
</style>