@hagicode/hagilight 0.2.3-dev.29.1.b93c22c → 0.2.3-dev.33.1.464ddf6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Footer.astro +155 -0
- package/package.json +6 -2
package/Footer.astro
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
---
|
|
2
|
+
import Copyright from './Copyright.astro';
|
|
3
|
+
import { resolveSiteLinks, type SiteLinksOptions } from './site-links.ts';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
locale?: string;
|
|
7
|
+
links?: SiteLinksOptions;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { locale: propLocale, links } = Astro.props;
|
|
11
|
+
const locale = propLocale ?? Astro.currentLocale ?? 'en-US';
|
|
12
|
+
const resolvedLinks = resolveSiteLinks(locale, links);
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
<footer class="hagilight-footer">
|
|
16
|
+
<div class="hagilight-footer__sections">
|
|
17
|
+
{resolvedLinks.relatedSites.length > 0 && (
|
|
18
|
+
<section>
|
|
19
|
+
<h2>{resolvedLinks.labels.relatedSites}</h2>
|
|
20
|
+
<nav aria-label={resolvedLinks.labels.navigation.relatedSites}>
|
|
21
|
+
<ul>
|
|
22
|
+
{resolvedLinks.relatedSites.map((site) => (
|
|
23
|
+
<li>
|
|
24
|
+
<a href={site.href} target={site.target} rel={site.rel}>{site.name}</a>
|
|
25
|
+
</li>
|
|
26
|
+
))}
|
|
27
|
+
</ul>
|
|
28
|
+
</nav>
|
|
29
|
+
</section>
|
|
30
|
+
)}
|
|
31
|
+
<section>
|
|
32
|
+
<h2>{resolvedLinks.labels.quickLinks}</h2>
|
|
33
|
+
<nav aria-label={resolvedLinks.labels.navigation.quickLinks}>
|
|
34
|
+
<ul>
|
|
35
|
+
{resolvedLinks.quick.map((link) => (
|
|
36
|
+
<li>
|
|
37
|
+
<a
|
|
38
|
+
href={link.href}
|
|
39
|
+
target={link.target}
|
|
40
|
+
rel={link.rel}
|
|
41
|
+
aria-label={link.ariaLabel}
|
|
42
|
+
>{link.label}</a>
|
|
43
|
+
</li>
|
|
44
|
+
))}
|
|
45
|
+
</ul>
|
|
46
|
+
</nav>
|
|
47
|
+
</section>
|
|
48
|
+
<section>
|
|
49
|
+
<h2>{resolvedLinks.labels.community}</h2>
|
|
50
|
+
<nav aria-label={resolvedLinks.labels.navigation.community}>
|
|
51
|
+
<ul>
|
|
52
|
+
{resolvedLinks.community.map((link) => (
|
|
53
|
+
<li>
|
|
54
|
+
<a
|
|
55
|
+
href={link.href}
|
|
56
|
+
target={link.target}
|
|
57
|
+
rel={link.rel}
|
|
58
|
+
aria-label={link.ariaLabel}
|
|
59
|
+
>{link.label}</a>
|
|
60
|
+
</li>
|
|
61
|
+
))}
|
|
62
|
+
</ul>
|
|
63
|
+
</nav>
|
|
64
|
+
</section>
|
|
65
|
+
</div>
|
|
66
|
+
<nav class="hagilight-footer__filings" aria-label={resolvedLinks.labels.navigation.filings}>
|
|
67
|
+
{resolvedLinks.filings.map((link) => (
|
|
68
|
+
<a
|
|
69
|
+
href={link.href}
|
|
70
|
+
target={link.target}
|
|
71
|
+
rel={link.rel}
|
|
72
|
+
aria-label={link.ariaLabel}
|
|
73
|
+
>{link.label}</a>
|
|
74
|
+
))}
|
|
75
|
+
</nav>
|
|
76
|
+
<p class="hagilight-footer__copyright"><Copyright name="HagiCode" /></p>
|
|
77
|
+
</footer>
|
|
78
|
+
|
|
79
|
+
<style>
|
|
80
|
+
.hagilight-footer {
|
|
81
|
+
border-top: 1px solid var(--hagilight-footer-border, currentColor);
|
|
82
|
+
color: var(--hagilight-footer-color, inherit);
|
|
83
|
+
padding: 1.5rem 1rem 1rem;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.hagilight-footer__sections {
|
|
87
|
+
display: grid;
|
|
88
|
+
grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
|
|
89
|
+
gap: 1.5rem;
|
|
90
|
+
margin: 0 auto 1.5rem;
|
|
91
|
+
max-width: 72rem;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.hagilight-footer section {
|
|
95
|
+
min-width: 0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.hagilight-footer h2 {
|
|
99
|
+
margin: 0 0 0.75rem;
|
|
100
|
+
font-size: 0.95rem;
|
|
101
|
+
font-weight: 650;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.hagilight-footer ul {
|
|
105
|
+
display: grid;
|
|
106
|
+
gap: 0.5rem;
|
|
107
|
+
margin: 0;
|
|
108
|
+
padding: 0;
|
|
109
|
+
list-style: none;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.hagilight-footer a {
|
|
113
|
+
color: inherit;
|
|
114
|
+
text-decoration: none;
|
|
115
|
+
text-underline-offset: 0.2em;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.hagilight-footer a:hover {
|
|
119
|
+
text-decoration: underline;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.hagilight-footer a:focus-visible {
|
|
123
|
+
border-radius: 0.125rem;
|
|
124
|
+
outline: 2px solid currentColor;
|
|
125
|
+
outline-offset: 0.2rem;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.hagilight-footer__filings {
|
|
129
|
+
display: flex;
|
|
130
|
+
flex-wrap: wrap;
|
|
131
|
+
justify-content: center;
|
|
132
|
+
gap: 0.75rem 1.5rem;
|
|
133
|
+
border-top: 1px solid var(--hagilight-footer-border, currentColor);
|
|
134
|
+
padding-top: 1rem;
|
|
135
|
+
text-align: center;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.hagilight-footer__copyright {
|
|
139
|
+
margin: 1rem 0 0;
|
|
140
|
+
font-size: 0.8rem;
|
|
141
|
+
text-align: center;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
@media (max-width: 40rem) {
|
|
145
|
+
.hagilight-footer__sections {
|
|
146
|
+
grid-template-columns: 1fr;
|
|
147
|
+
gap: 1.25rem;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.hagilight-footer__filings {
|
|
151
|
+
justify-content: flex-start;
|
|
152
|
+
gap: 0.75rem 1rem;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
</style>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hagicode/hagilight",
|
|
3
|
-
"version": "0.2.3-dev.
|
|
3
|
+
"version": "0.2.3-dev.33.1.464ddf6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Shared Astro components for HagiCode sites",
|
|
6
6
|
"repository": {
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"provenance": true
|
|
14
14
|
},
|
|
15
15
|
"exports": {
|
|
16
|
+
"./Footer": "./Footer.astro",
|
|
16
17
|
"./Copyright": "./Copyright.astro",
|
|
17
18
|
"./PromotoBanner": "./PromotoBanner.astro",
|
|
18
19
|
"./logo.png": "./logo.png",
|
|
@@ -31,6 +32,9 @@
|
|
|
31
32
|
},
|
|
32
33
|
"keywords": [
|
|
33
34
|
"astro-component",
|
|
34
|
-
"withastro"
|
|
35
|
+
"withastro",
|
|
36
|
+
"astro-components",
|
|
37
|
+
"starlight",
|
|
38
|
+
"documentation-components"
|
|
35
39
|
]
|
|
36
40
|
}
|