aboutsummaryrefslogtreecommitdiff
path: root/src/components/PortfolioProject.astro
blob: c5833258e1cf74f2a9349e00823756f1170aba2d (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
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
---
import { Icon } from "astro-icon/components";
import TechnologyBadge from "./TechnologyBadge.astro";

interface Props {
    title: string;
    summary: string;
    tags: string[];

    detailsLink?: string;
    githubLink?: string;
    onlineLink?: string;
}

const { title, summary, tags, detailsLink, githubLink, onlineLink } =
    Astro.props;
---

<article>
    <h3>{title}</h3>

    <p>{summary}</p>

    <div>
        {detailsLink && <a href={detailsLink}>
            <Icon name="tabler:info-circle"/>
            Detalles
        </a>}

        {githubLink && <a href={githubLink}>
            <Icon name="tabler:brand-github"/>
            GitHub
        </a>}

        {onlineLink && <a href={onlineLink}>
            <Icon name="tabler:link"/>
            En línea
        </a>}
    </div>

    <div>
        {tags.map(tag => (
            <TechnologyBadge code={tag} />
        ))}
    </div>
</article>

<style lang="scss">
    @use "../../styles/variables" as *;

    h3, p, div, a {
        margin: 0;
    }

    article {
        display: flex;
        flex-direction: column;
        justify-content: start;
        gap: 0.75rem;

        padding: 1.5rem;
        border-radius: 10px;

        background-color: #fcfcfc;
        border: 1px solid #ccd6e0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), inset 0 1px 0 #fff;

        h3 {
            color: $accent;
            text-shadow: 1px 1px 0 #fff;
            margin-bottom: 0.25rem;
            border-bottom: 1px solid #eee;
            padding-bottom: 0.25rem;
        }
    }

    a {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        color: white;
        text-decoration: none;
        background: $accent;
        padding: 0.4rem 0.8rem;
        border-radius: 6px;
        font-size: 0.9rem;
        font-weight: bold;
        border: 1px solid $accentDark;
        box-shadow: 0 1px 3px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.3);
        text-shadow: 0 -1px 0 rgba(0,0,0,0.3);

        &:hover {
            filter: brightness(1.1);
            transform: translateY(-1px);
        }

        &:active {
            box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
            transform: translateY(0);
        }
    }

    div *:not(:last-child) {
        margin-inline-end: 0.5rem;
    }

    div:nth-last-child(1) {
        margin-block-start: 0.5rem;;
    }
</style>