aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/Link.astro
blob: 9a6708d48b87c416574052c5f9529bffc4498617 (plain) (blame)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
import "remixicon/fonts/remixicon.css";

interface Props {
    icon: string;
    title: string;
    description: string;
    url: string;
}

const { icon, title, description, url } = Astro.props;
---

<a href={url} class="link">
    <span class="link-icon">
        <i class={"ri-" + icon}></i>
    </span>
    <div class="link-content">
        <h2 class="link-title">{title}</h2>
        <p class="link-description">{description}</p>
    </div>
</a>

<style>
    .link {
        padding: 0.75rem;
        display: flex;
        border: 1px solid var(--zinc-800);
        border-radius: 1rem;
        text-decoration: none;
        background-color: var(--pink-pastel);
        transition:
            transform 0.2s ease-in-out,
            box-shadow 0.2s ease-in-out;
    }

    .link:hover {
        transform: scale(1.05);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    }

    .link-icon {
        width: 3rem;
        height: 3rem;
        margin-right: 1.125rem;
        background: var(--pink-darker);
        border-radius: 0.5rem;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .link-icon i {
        font-size: 1.5rem;
        color: var(--zinc-50);
    }

    .link-title {
        color: var(--zinc-900);
        font-weight: bold;
    }

    .link-description {
        color: var(--zinc-900);
        margin-top: 0.125rem;
    }
</style>
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage