@hagicode/hagilight-starlight 0.19.1-dev.185.1.a85e2a8 → 0.19.1-dev.188.1.00e8fd4
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 +220 -70
- package/package.json +2 -2
package/Footer.astro
CHANGED
|
@@ -58,69 +58,57 @@ const resolvedLinks = resolveSiteLinks(currentLanguage ?? locale, {
|
|
|
58
58
|
<FooterBrand locale={resolvedLinks.locale} links={resolvedLinks.quick} avatar={avatar} randomAvatar={randomAvatar} siteId={links?.siteId} siteUrl={links?.siteUrl ?? Astro.site?.href} />
|
|
59
59
|
</div>
|
|
60
60
|
<div class="hagilight-site-links">
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
<
|
|
64
|
-
|
|
61
|
+
<div class="hagilight-cols">
|
|
62
|
+
{resolvedLinks.columns.map((column, index) => (
|
|
63
|
+
<nav
|
|
64
|
+
class="hagilight-col"
|
|
65
|
+
data-column={column.id}
|
|
66
|
+
style={`--hagilight-col-i: ${index}`}
|
|
67
|
+
aria-labelledby={`hagilight-col-${column.id}`}
|
|
68
|
+
>
|
|
69
|
+
<h2 id={`hagilight-col-${column.id}`}>{resolvedLinks.labels.columns[column.id]}</h2>
|
|
65
70
|
<ul>
|
|
66
|
-
{
|
|
71
|
+
{column.entries.map((entry) => (
|
|
67
72
|
<li>
|
|
68
|
-
<a
|
|
69
|
-
{
|
|
70
|
-
|
|
73
|
+
<a
|
|
74
|
+
href={entry.href}
|
|
75
|
+
target={entry.target}
|
|
76
|
+
rel={entry.rel}
|
|
77
|
+
{...(entry.source === 'link' ? siteLinkGaAttributes(entry, 'footer') : {})}
|
|
78
|
+
>{entry.label}</a>
|
|
71
79
|
</li>
|
|
72
80
|
))}
|
|
73
81
|
</ul>
|
|
74
82
|
</nav>
|
|
75
|
-
</section>
|
|
76
|
-
)}
|
|
77
|
-
<section>
|
|
78
|
-
<h2>{resolvedLinks.labels.quickLinks}</h2>
|
|
79
|
-
<nav aria-label={resolvedLinks.labels.navigation.quickLinks}>
|
|
80
|
-
<ul>
|
|
81
|
-
{resolvedLinks.quick.map((link) => (
|
|
82
|
-
<li>
|
|
83
|
-
<a
|
|
84
|
-
href={link.href}
|
|
85
|
-
target={link.target}
|
|
86
|
-
rel={link.rel}
|
|
87
|
-
{...siteLinkGaAttributes(link, 'footer')}
|
|
88
|
-
>{link.label}</a>
|
|
89
|
-
</li>
|
|
90
|
-
))}
|
|
91
|
-
</ul>
|
|
92
|
-
</nav>
|
|
93
|
-
</section>
|
|
94
|
-
<section>
|
|
95
|
-
<h2>{resolvedLinks.labels.community}</h2>
|
|
96
|
-
<nav aria-label={resolvedLinks.labels.navigation.community}>
|
|
97
|
-
<ul>
|
|
98
|
-
{resolvedLinks.community.map((link) => (
|
|
99
|
-
<li>
|
|
100
|
-
<a
|
|
101
|
-
href={link.href}
|
|
102
|
-
target={link.target}
|
|
103
|
-
rel={link.rel}
|
|
104
|
-
{...siteLinkGaAttributes(link, 'footer')}
|
|
105
|
-
>{link.label}</a>
|
|
106
|
-
</li>
|
|
107
|
-
))}
|
|
108
|
-
</ul>
|
|
109
|
-
</nav>
|
|
110
|
-
</section>
|
|
111
|
-
<nav class="hagilight-filings" aria-label={resolvedLinks.labels.navigation.filings}>
|
|
112
|
-
{resolvedLinks.filings.map((link) => (
|
|
113
|
-
<a
|
|
114
|
-
href={link.href}
|
|
115
|
-
target={link.target}
|
|
116
|
-
rel={link.rel}
|
|
117
|
-
aria-label={link.ariaLabel}
|
|
118
|
-
>{link.label}</a>
|
|
119
83
|
))}
|
|
120
|
-
|
|
121
|
-
|
|
84
|
+
</div>
|
|
85
|
+
<div class="hagilight-footer__base">
|
|
86
|
+
{resolvedLinks.feeds.length > 0 && (
|
|
87
|
+
<nav class="hagilight-footer__feeds" aria-label={resolvedLinks.labels.navigation.feeds}>
|
|
88
|
+
{resolvedLinks.feeds.map((link) => (
|
|
89
|
+
<a
|
|
90
|
+
href={link.href}
|
|
91
|
+
target={link.target}
|
|
92
|
+
rel={link.rel}
|
|
93
|
+
{...siteLinkGaAttributes(link, 'footer')}
|
|
94
|
+
>{link.label}</a>
|
|
95
|
+
))}
|
|
96
|
+
</nav>
|
|
122
97
|
)}
|
|
123
|
-
|
|
98
|
+
<nav class="hagilight-filings" aria-label={resolvedLinks.labels.navigation.filings}>
|
|
99
|
+
{resolvedLinks.filings.map((link) => (
|
|
100
|
+
<a
|
|
101
|
+
href={link.href}
|
|
102
|
+
target={link.target}
|
|
103
|
+
rel={link.rel}
|
|
104
|
+
aria-label={link.ariaLabel}
|
|
105
|
+
>{link.label}</a>
|
|
106
|
+
))}
|
|
107
|
+
{consent && (
|
|
108
|
+
<button type="button" class="hagilight-consent-entry" data-consent-preferences>{consentCopy.footerEntry}</button>
|
|
109
|
+
)}
|
|
110
|
+
</nav>
|
|
111
|
+
</div>
|
|
124
112
|
</div>
|
|
125
113
|
<p class="hagilight-copyright">
|
|
126
114
|
<Copyright name="HagiCode" />
|
|
@@ -146,9 +134,7 @@ const resolvedLinks = resolveSiteLinks(currentLanguage ?? locale, {
|
|
|
146
134
|
}
|
|
147
135
|
|
|
148
136
|
.hagilight-site-links {
|
|
149
|
-
|
|
150
|
-
grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
|
|
151
|
-
gap: 1.5rem;
|
|
137
|
+
container: hagilight-cols / inline-size;
|
|
152
138
|
margin: 0 auto 1rem;
|
|
153
139
|
max-width: 72rem;
|
|
154
140
|
padding-inline: 1rem;
|
|
@@ -156,19 +142,13 @@ const resolvedLinks = resolveSiteLinks(currentLanguage ?? locale, {
|
|
|
156
142
|
padding-block-end: var(--hagilight-consent-clearance, 0px);
|
|
157
143
|
}
|
|
158
144
|
|
|
159
|
-
.hagilight-site-links section {
|
|
160
|
-
min-width: 0;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
145
|
.hagilight-site-links h2 {
|
|
164
|
-
margin: 0 0 0.75rem;
|
|
165
146
|
color: var(--sl-color-white);
|
|
166
147
|
font-size: var(--sl-text-sm);
|
|
167
148
|
}
|
|
168
149
|
|
|
169
150
|
.hagilight-site-links ul {
|
|
170
151
|
display: grid;
|
|
171
|
-
gap: 0.5rem;
|
|
172
152
|
margin: 0;
|
|
173
153
|
padding: 0;
|
|
174
154
|
list-style: none;
|
|
@@ -180,7 +160,8 @@ const resolvedLinks = resolveSiteLinks(currentLanguage ?? locale, {
|
|
|
180
160
|
text-decoration: none;
|
|
181
161
|
}
|
|
182
162
|
|
|
183
|
-
.hagilight-site-links a:hover
|
|
163
|
+
.hagilight-site-links a:hover,
|
|
164
|
+
.hagilight-site-links a:focus-visible {
|
|
184
165
|
color: var(--sl-color-white);
|
|
185
166
|
}
|
|
186
167
|
|
|
@@ -195,16 +176,185 @@ const resolvedLinks = resolveSiteLinks(currentLanguage ?? locale, {
|
|
|
195
176
|
cursor: pointer;
|
|
196
177
|
}
|
|
197
178
|
|
|
198
|
-
|
|
199
|
-
|
|
179
|
+
/* Footer columns: four level, purpose-based columns. Each column owns a rule that
|
|
180
|
+
draws in as it scrolls into view and runs the full width while the column is
|
|
181
|
+
used; the other columns' headings step back. */
|
|
182
|
+
.hagilight-cols,
|
|
183
|
+
.hagilight-footer__base {
|
|
184
|
+
--_accent: var(--hagilight-footer-accent, var(--sl-color-accent, var(--ifm-color-primary, currentColor)));
|
|
185
|
+
--_track: var(--hagilight-footer-border, var(--sl-color-gray-5, color-mix(in srgb, currentColor 26%, transparent)));
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.hagilight-cols {
|
|
189
|
+
margin-block-end: 1.75rem;
|
|
190
|
+
--_ease: cubic-bezier(0.16, 1, 0.3, 1);
|
|
191
|
+
display: grid;
|
|
192
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
193
|
+
gap: 1.75rem 1.5rem;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
@container hagilight-cols (max-width: 19rem) {
|
|
197
|
+
.hagilight-cols { grid-template-columns: minmax(0, 1fr); }
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
@container hagilight-cols (min-width: 40rem) {
|
|
201
|
+
.hagilight-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 2.25rem; }
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.hagilight-col {
|
|
205
|
+
--_seg: 0.12;
|
|
206
|
+
position: relative;
|
|
207
|
+
min-width: 0;
|
|
208
|
+
padding-top: 1.125rem;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.hagilight-col::before,
|
|
212
|
+
.hagilight-col::after {
|
|
213
|
+
content: '';
|
|
214
|
+
position: absolute;
|
|
215
|
+
inset: 0 0 auto;
|
|
216
|
+
height: 1px;
|
|
217
|
+
pointer-events: none;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.hagilight-col::before { background: var(--_track); }
|
|
221
|
+
|
|
222
|
+
.hagilight-col::after {
|
|
223
|
+
height: 2px;
|
|
224
|
+
margin-top: -0.5px;
|
|
225
|
+
background: var(--_accent);
|
|
226
|
+
transform-origin: left center;
|
|
227
|
+
scale: var(--_seg) 1;
|
|
228
|
+
transition: scale 0.6s var(--_ease);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.hagilight-col h2 {
|
|
232
|
+
margin: 0 0 0.875rem;
|
|
233
|
+
transition: opacity 0.3s ease-out;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.hagilight-col ul { gap: 0.4rem; }
|
|
237
|
+
|
|
238
|
+
.hagilight-col a {
|
|
239
|
+
position: relative;
|
|
240
|
+
display: inline-block;
|
|
241
|
+
padding-block: 0.125rem;
|
|
242
|
+
text-decoration: underline;
|
|
243
|
+
text-decoration-color: transparent;
|
|
244
|
+
text-decoration-thickness: 1px;
|
|
245
|
+
text-underline-offset: 0.25em;
|
|
246
|
+
transition: text-decoration-color 0.25s ease-out;
|
|
247
|
+
-webkit-tap-highlight-color: transparent;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/* The link's own rule draws in the gutter, so a hover never reflows the label. */
|
|
251
|
+
.hagilight-col a::before {
|
|
252
|
+
content: '';
|
|
253
|
+
position: absolute;
|
|
254
|
+
top: 0.82em;
|
|
255
|
+
left: -0.95rem;
|
|
256
|
+
width: 0.7rem;
|
|
257
|
+
height: 1px;
|
|
258
|
+
background: var(--_accent);
|
|
259
|
+
transform-origin: left center;
|
|
260
|
+
scale: 0 1;
|
|
261
|
+
transition: scale 0.35s var(--_ease);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.hagilight-col a[target='_blank']::after {
|
|
265
|
+
/* Joined to the last word by no-break spaces, so the arrow never wraps onto a line of its own. */
|
|
266
|
+
content: '\00a0\00a0\00a0';
|
|
267
|
+
background: currentColor;
|
|
268
|
+
opacity: 0.5;
|
|
269
|
+
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 11.5l7-7M5.5 4.5h6v6' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right center / 0.62em 0.62em no-repeat;
|
|
270
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 11.5l7-7M5.5 4.5h6v6' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right center / 0.62em 0.62em no-repeat;
|
|
271
|
+
transition: mask-position 0.3s var(--_ease), opacity 0.3s ease-out;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.hagilight-col a:is(:hover, :focus-visible) { text-decoration-color: currentColor; }
|
|
275
|
+
.hagilight-col a:is(:hover, :focus-visible)::before { scale: 1 1; }
|
|
276
|
+
.hagilight-col a[target='_blank']:is(:hover, :focus-visible)::after {
|
|
277
|
+
opacity: 0.9;
|
|
278
|
+
-webkit-mask-position: calc(100% + 0.1em) calc(50% - 0.1em);
|
|
279
|
+
mask-position: calc(100% + 0.1em) calc(50% - 0.1em);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.hagilight-col:is(:hover, :focus-within) { --_seg: 1; }
|
|
283
|
+
|
|
284
|
+
@media (hover: hover) {
|
|
285
|
+
.hagilight-cols:has(.hagilight-col:is(:hover, :focus-within)) .hagilight-col:not(:hover, :focus-within) h2 {
|
|
286
|
+
opacity: 0.5;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.hagilight-cols ::selection,
|
|
291
|
+
.hagilight-footer__base ::selection {
|
|
292
|
+
background: color-mix(in srgb, var(--_accent) 34%, transparent);
|
|
293
|
+
color: inherit;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/* The one authored moment: columns rise out of a blur, one after another, as the footer scrolls in.
|
|
297
|
+
Without scroll-driven animation support, or under reduced motion, the columns are simply there. */
|
|
298
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
299
|
+
@supports (animation-timeline: view()) {
|
|
300
|
+
.hagilight-col {
|
|
301
|
+
animation-name: hagilight-col-in;
|
|
302
|
+
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
|
|
303
|
+
animation-fill-mode: both;
|
|
304
|
+
animation-timeline: view();
|
|
305
|
+
animation-range: entry calc(var(--hagilight-col-i, 0) * 6%) entry calc(46% + var(--hagilight-col-i, 0) * 6%);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.hagilight-col::after {
|
|
309
|
+
animation-name: hagilight-col-rule;
|
|
310
|
+
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
|
|
311
|
+
animation-fill-mode: both;
|
|
312
|
+
animation-timeline: view();
|
|
313
|
+
animation-range: entry calc(var(--hagilight-col-i, 0) * 6%) entry calc(60% + var(--hagilight-col-i, 0) * 6%);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
@keyframes hagilight-col-in {
|
|
319
|
+
from { opacity: 0; translate: 0 1.25rem; filter: blur(6px); }
|
|
320
|
+
to { opacity: 1; translate: 0 0; filter: blur(0); }
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
@keyframes hagilight-col-rule {
|
|
324
|
+
from { clip-path: inset(0 100% 0 0); }
|
|
325
|
+
to { clip-path: inset(0 0 0 0); }
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/* The bottom row: feeds on the start side, filings on the end side. */
|
|
329
|
+
.hagilight-footer__base {
|
|
200
330
|
display: flex;
|
|
201
331
|
flex-wrap: wrap;
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
332
|
+
align-items: baseline;
|
|
333
|
+
justify-content: space-between;
|
|
334
|
+
gap: 0.75rem 2rem;
|
|
335
|
+
border-top: 1px solid var(--_track);
|
|
205
336
|
padding-top: 1rem;
|
|
206
337
|
}
|
|
207
338
|
|
|
339
|
+
.hagilight-footer__feeds,
|
|
340
|
+
.hagilight-filings {
|
|
341
|
+
display: flex;
|
|
342
|
+
flex-wrap: wrap;
|
|
343
|
+
gap: 0.5rem 1.25rem;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.hagilight-footer__feeds a,
|
|
347
|
+
.hagilight-filings a {
|
|
348
|
+
text-decoration: underline;
|
|
349
|
+
text-decoration-color: transparent;
|
|
350
|
+
text-decoration-thickness: 1px;
|
|
351
|
+
text-underline-offset: 0.25em;
|
|
352
|
+
transition: text-decoration-color 0.25s ease-out;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.hagilight-footer__feeds a:is(:hover, :focus-visible),
|
|
356
|
+
.hagilight-filings a:is(:hover, :focus-visible) { text-decoration-color: currentColor; }
|
|
357
|
+
|
|
208
358
|
.hagilight-copyright {
|
|
209
359
|
margin-block: 1rem;
|
|
210
360
|
color: var(--sl-color-gray-3);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hagicode/hagilight-starlight",
|
|
3
|
-
"version": "0.19.1-dev.
|
|
3
|
+
"version": "0.19.1-dev.188.1.00e8fd4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Starlight plugin and components for HagiCode documentation",
|
|
6
6
|
"repository": {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"assets/showcase/*"
|
|
54
54
|
],
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@hagicode/hagilight-core": "0.19.1-dev.
|
|
56
|
+
"@hagicode/hagilight-core": "0.19.1-dev.188.1.00e8fd4"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"@astrojs/starlight": "^0.42.4",
|