-
Notifications
You must be signed in to change notification settings - Fork 194
Expand file tree
/
Copy pathNavCard.astro
More file actions
98 lines (91 loc) · 1.98 KB
/
Copy pathNavCard.astro
File metadata and controls
98 lines (91 loc) · 1.98 KB
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
---
import i18next, { t } from "i18next"
import LinkSvg from "~/assets/svgs/home/home-link.svg?raw"
export type Props = {
icon: string
name: string
content: string
link: string
}
const { icon, name, content, link } = Astro.props as Props
/**
* This component adds the classNames required by the scripts/click-to-zoom.ts script.
*/
---
<div class="navs-item">
<span class="navs-item-icon">
<Fragment set:html={icon} />
</span>
<span class="navs-item-title">{name}</span>
<span class="navs-item-content">{content}</span>
<a class="navs-item-link text-[#C58D49] dark:text-white-800" href={link}>
{t("ui.readMore")}
<span class="link-icon text-[#C58D49] dark:text-white-800">
<Fragment set:html={LinkSvg} />
</span>
</a>
</div>
<style>
.navs-item {
width: 250px;
display: flex;
flex-direction: column;
gap: 26px;
margin-top: 100px;
}
.navs-item-icon {
display: inline-flex;
width: 35px;
height: 35px;
align-items: center;
@apply text-black dark:text-white-800;
}
.navs-item-title {
font-size: 22px;
font-weight: 600;
}
.navs-item-content {
font-size: 20px;
line-height: normal;
height: 84px;
}
.navs-item-link {
width: 123px;
height: 34px;
display: flex;
justify-content: center;
align-items: center;
border-radius: 20px;
font-size: 16px;
text-decoration: 1px underline;
text-underline-offset: 2px;
@apply bg-normal dark:bg-dark-normal;
}
.navs-item-link:hover {
@apply bg-highlight dark:bg-dark-highlight;
}
.link-icon {
display: inline-flex;
width: 8px;
height: 8px;
margin-left: 2px;
}
@media screen and (max-width: 50em) {
.navs-item {
align-items: center;
gap: 8px;
width: 260px;
}
.navs-item-title {
font-size: 20px;
line-height: normal;
}
.navs-item-content {
text-align: center;
height: auto;
}
.navs-item-link {
margin-top: 14px;
}
}
</style>