@frontfactory/vitepress-theme 1.9.0 → 1.11.0
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/CHANGELOG.md +31 -0
- package/README.md +12 -405
- package/config.js +7 -10
- package/dist/style.css +1 -1
- package/node/banner.d.ts +3 -0
- package/node/banner.js +14 -0
- package/node/blog.d.ts +8 -0
- package/node/blog.js +46 -0
- package/node/options.d.ts +1 -0
- package/node/options.js +17 -0
- package/node/page-actions.d.ts +12 -0
- package/node/page-actions.js +34 -0
- package/node/pages.js +20 -8
- package/node/rss.js +10 -15
- package/package.json +2 -1
- package/src/blog/posts.data.ts +5 -3
- package/src/components/FfBackToTop.vue +5 -35
- package/src/components/FfBanner.vue +3 -2
- package/src/components/FfCopyStatus.vue +6 -14
- package/src/components/FfDocMeta.vue +13 -17
- package/src/components/FfFeedback.vue +4 -9
- package/src/components/FfFooter.vue +2 -2
- package/src/components/FfHero.vue +2 -2
- package/src/components/FfPost.vue +2 -1
- package/src/components/FfProgress.vue +6 -40
- package/src/composables/blog.ts +8 -14
- package/src/composables/copy.ts +4 -11
- package/src/composables/frame.ts +50 -0
- package/src/composables/transient.ts +27 -0
- package/src/content/Card.vue +16 -4
- package/src/content/Tabs.vue +3 -0
- package/src/styles/_code.scss +6 -8
- package/src/styles/_content.scss +22 -3
- package/src/styles/_doc.scss +65 -1
- package/src/styles/_docsearch.scss +94 -0
- package/src/styles/_home.scss +28 -13
- package/src/styles/_mixins.scss +24 -0
- package/src/styles/_motion.scss +1 -1
- package/src/styles/_nav.scss +102 -0
- package/src/styles/_not-found.scss +81 -0
- package/src/styles/_team.scss +141 -0
- package/src/styles/index.scss +3 -0
- package/src/types.ts +3 -2
- package/types/composables/blog.d.ts +3 -4
- package/types/composables/frame.d.ts +6 -0
- package/types/composables/transient.d.ts +6 -0
- package/types/content/Tabs.vue.d.ts +2 -0
- package/types/types.d.ts +3 -2
package/src/styles/_doc.scss
CHANGED
|
@@ -303,11 +303,16 @@
|
|
|
303
303
|
border-bottom: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
+
// The stamp's own `<p class="VPLastUpdated">` sets its font and line height, so the rule has to
|
|
307
|
+
// target it rather than its wrapper; the `<time>` inherits. Both items share one line height
|
|
308
|
+
// so the row centres them on the same baseline.
|
|
309
|
+
|
|
306
310
|
.VPDocFooter .edit-link-button,
|
|
307
|
-
.VPDocFooter .last-updated {
|
|
311
|
+
.VPDocFooter .last-updated .VPLastUpdated {
|
|
308
312
|
font-family: #{mg.ref("font-mono")};
|
|
309
313
|
font-size: #{mg.ref("size-meta")};
|
|
310
314
|
font-weight: 400;
|
|
315
|
+
line-height: #{mg.ref("leading-body")};
|
|
311
316
|
color: #{mg.ref("color-ink-faint")};
|
|
312
317
|
}
|
|
313
318
|
|
|
@@ -315,6 +320,12 @@
|
|
|
315
320
|
color: #{mg.ref("color-accent")};
|
|
316
321
|
}
|
|
317
322
|
|
|
323
|
+
// Vue condenses the whitespace between the label and the `<time>`, so the gap is drawn here.
|
|
324
|
+
|
|
325
|
+
.VPDocFooter .last-updated .VPLastUpdated time {
|
|
326
|
+
margin-inline-start: 1ch;
|
|
327
|
+
}
|
|
328
|
+
|
|
318
329
|
.VPDocFooter .prev-next {
|
|
319
330
|
margin-top: 0;
|
|
320
331
|
padding-top: 0;
|
|
@@ -417,4 +428,57 @@
|
|
|
417
428
|
.VPDocAsideOutline .VPDocOutlineItem.nested .outline-link {
|
|
418
429
|
font-size: #{mg.ref("size-small")};
|
|
419
430
|
}
|
|
431
|
+
|
|
432
|
+
// ----------------------------------------------------------------------------------------- //
|
|
433
|
+
// Aside extras: Carbon ad and sponsors
|
|
434
|
+
//
|
|
435
|
+
// Flat hairline surfaces like `.ff-card`, set in the meta size. The ad is injected by Carbon, so
|
|
436
|
+
// only the native hooks (its colour variables and the classes the component styles) are used.
|
|
437
|
+
// ----------------------------------------------------------------------------------------- //
|
|
438
|
+
|
|
439
|
+
.VPCarbonAds {
|
|
440
|
+
--vp-carbon-ads-bg-color: #{mg.ref("color-surface")};
|
|
441
|
+
--vp-carbon-ads-text-color: #{mg.ref("color-ink-muted")};
|
|
442
|
+
--vp-carbon-ads-hover-text-color: #{mg.ref("color-accent")};
|
|
443
|
+
--vp-carbon-ads-poweredby-color: #{mg.ref("color-ink-faint")};
|
|
444
|
+
--vp-carbon-ads-hover-poweredby-color: #{mg.ref("color-ink")};
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
div.VPCarbonAds {
|
|
448
|
+
border: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
449
|
+
border-radius: #{mg.ref("radius-md")};
|
|
450
|
+
font-size: #{mg.ref("size-small")};
|
|
451
|
+
font-weight: 400;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
div.VPCarbonAds img {
|
|
455
|
+
border-radius: #{mg.ref("radius-sm")};
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
div.VPCarbonAds .carbon-poweredby {
|
|
459
|
+
font-size: #{mg.ref("size-label")};
|
|
460
|
+
|
|
461
|
+
@include mixins.label;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.VPDocAsideSponsors .vp-sponsor.aside {
|
|
465
|
+
border: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
466
|
+
border-radius: #{mg.ref("radius-md")};
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.VPDocAsideSponsors .vp-sponsor.aside .vp-sponsor-tier {
|
|
470
|
+
padding: 0.75rem 1rem;
|
|
471
|
+
text-align: left;
|
|
472
|
+
letter-spacing: #{mg.ref("tracking-label")};
|
|
473
|
+
|
|
474
|
+
@include mixins.label;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
@media (prefers-reduced-motion: reduce) {
|
|
478
|
+
div.VPCarbonAds .carbon-text,
|
|
479
|
+
div.VPCarbonAds .carbon-poweredby,
|
|
480
|
+
.VPDocAsideSponsors .vp-sponsor-grid-item {
|
|
481
|
+
transition: none;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
420
484
|
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// ============================================================================================= //
|
|
2
|
+
// DOCSEARCH //
|
|
3
|
+
// ============================================================================================= //
|
|
4
|
+
|
|
5
|
+
@use "breakpoints" as bp;
|
|
6
|
+
@use "mixins";
|
|
7
|
+
@use "theme" as mg;
|
|
8
|
+
|
|
9
|
+
// The Algolia modal, set like the local search box in `_nav.scss`: a paper shell with a hairline,
|
|
10
|
+
// result rows framed by hairlines that take the accent when selected, labels in the mono voice.
|
|
11
|
+
// Like the local search box it is teleported to <body>, outside the themed root, so these rules are
|
|
12
|
+
// not scoped. The variables do most of the work; `html:root:root` outweighs the default theme's own
|
|
13
|
+
// `:root:root` block that sets them.
|
|
14
|
+
|
|
15
|
+
html:root:root {
|
|
16
|
+
--docsearch-primary-color: #{mg.ref("color-accent")};
|
|
17
|
+
--docsearch-focus-color: #{mg.ref("color-accent")};
|
|
18
|
+
--docsearch-highlight-color: #{mg.ref("color-accent")};
|
|
19
|
+
--docsearch-text-color: #{mg.ref("color-ink")};
|
|
20
|
+
--docsearch-hit-color: #{mg.ref("color-ink-muted")};
|
|
21
|
+
--docsearch-muted-color: #{mg.ref("color-ink-muted")};
|
|
22
|
+
--docsearch-icon-color: #{mg.ref("color-ink-muted")};
|
|
23
|
+
--docsearch-secondary-text-color: #{mg.ref("color-ink-muted")};
|
|
24
|
+
--docsearch-subtle-color: #{mg.ref("color-rule")};
|
|
25
|
+
--docsearch-border-radius: #{mg.ref("radius-sm")};
|
|
26
|
+
--docsearch-container-background: color-mix(in srgb, #{mg.ref("color-paper")} 85%, transparent);
|
|
27
|
+
--docsearch-modal-background: #{mg.ref("color-paper")};
|
|
28
|
+
--docsearch-modal-shadow: var(--vp-shadow-3);
|
|
29
|
+
--docsearch-searchbox-background: #{mg.ref("color-surface")};
|
|
30
|
+
--docsearch-searchbox-focus-background: #{mg.ref("color-paper")};
|
|
31
|
+
--docsearch-hit-background: transparent;
|
|
32
|
+
--docsearch-hit-shadow: none;
|
|
33
|
+
--docsearch-hit-highlight-color: #{mg.ref("color-accent-soft")};
|
|
34
|
+
--docsearch-key-background: #{mg.ref("color-surface-alt")};
|
|
35
|
+
--docsearch-key-gradient: none;
|
|
36
|
+
--docsearch-key-shadow: none;
|
|
37
|
+
--docsearch-footer-background: #{mg.ref("color-paper")};
|
|
38
|
+
--docsearch-footer-shadow: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.DocSearch-Container .DocSearch-Modal {
|
|
42
|
+
border: #{mg.ref("rule-width")} solid #{mg.ref("color-rule-strong")};
|
|
43
|
+
border-radius: #{mg.ref("radius-md")};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.DocSearch-Modal .DocSearch-Hit a {
|
|
47
|
+
border: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
48
|
+
border-radius: #{mg.ref("radius-sm")};
|
|
49
|
+
box-shadow: none;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.DocSearch-Modal .DocSearch-Hit[aria-selected="true"] a {
|
|
53
|
+
border-color: #{mg.ref("color-accent")};
|
|
54
|
+
background: #{mg.ref("color-accent-soft")};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.DocSearch-Modal .DocSearch-Hit-source {
|
|
58
|
+
@include mixins.label;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.DocSearch-Modal .DocSearch-Footer {
|
|
62
|
+
border-top: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// The "Ask AI" trigger beside the search button: the same framed, quiet control.
|
|
66
|
+
|
|
67
|
+
.ff-theme {
|
|
68
|
+
@include bp.up("md") {
|
|
69
|
+
button.VPNavBarAskAiButton {
|
|
70
|
+
justify-content: center;
|
|
71
|
+
width: 2rem;
|
|
72
|
+
height: 2rem;
|
|
73
|
+
padding: 0;
|
|
74
|
+
border: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
75
|
+
border-radius: #{mg.ref("radius-sm")};
|
|
76
|
+
background: transparent;
|
|
77
|
+
color: #{mg.ref("color-ink-faint")};
|
|
78
|
+
transition:
|
|
79
|
+
border-color #{mg.ref("motion-duration")} #{mg.ref("motion-ease")},
|
|
80
|
+
color #{mg.ref("motion-duration")} #{mg.ref("motion-ease")};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
button.VPNavBarAskAiButton:hover {
|
|
84
|
+
border-color: #{mg.ref("color-rule-strong")};
|
|
85
|
+
color: #{mg.ref("color-ink-muted")};
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@media (prefers-reduced-motion: reduce) {
|
|
91
|
+
.ff-theme button.VPNavBarAskAiButton {
|
|
92
|
+
transition: none;
|
|
93
|
+
}
|
|
94
|
+
}
|
package/src/styles/_home.scss
CHANGED
|
@@ -240,10 +240,9 @@
|
|
|
240
240
|
color: #{mg.ref("color-accent")};
|
|
241
241
|
}
|
|
242
242
|
|
|
243
|
-
//
|
|
244
|
-
//
|
|
245
|
-
//
|
|
246
|
-
// install line's only affordance.
|
|
243
|
+
// The copy button shares its size and radius with the one on code blocks (see the mixins). It
|
|
244
|
+
// stays fully opaque here rather than fading in on hover — this one isn't tucked in the corner
|
|
245
|
+
// of a block, it's the install line's only affordance.
|
|
247
246
|
|
|
248
247
|
.ff-hero-copy-group {
|
|
249
248
|
position: relative;
|
|
@@ -263,11 +262,12 @@
|
|
|
263
262
|
z-index: 1;
|
|
264
263
|
display: flex;
|
|
265
264
|
align-items: center;
|
|
266
|
-
height: 1.75rem;
|
|
267
265
|
padding: 0 0.625rem;
|
|
268
266
|
border: #{mg.ref("rule-width")} solid #{mg.ref("color-rule-strong")};
|
|
269
267
|
border-right: 0;
|
|
270
|
-
|
|
268
|
+
|
|
269
|
+
@include mixins.copied-flag;
|
|
270
|
+
|
|
271
271
|
background: #{mg.ref("color-surface-alt")};
|
|
272
272
|
color: #{mg.ref("color-ink-muted")};
|
|
273
273
|
white-space: nowrap;
|
|
@@ -275,15 +275,13 @@
|
|
|
275
275
|
|
|
276
276
|
.ff-hero-copy {
|
|
277
277
|
flex-shrink: 0;
|
|
278
|
-
width: 1.75rem;
|
|
279
|
-
height: 1.75rem;
|
|
280
278
|
border: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
281
|
-
|
|
282
|
-
|
|
279
|
+
|
|
280
|
+
@include mixins.copy-button;
|
|
281
|
+
|
|
283
282
|
background-image: var(--vp-icon-copy);
|
|
284
283
|
background-position: 50%;
|
|
285
284
|
background-repeat: no-repeat;
|
|
286
|
-
background-size: 0.875rem;
|
|
287
285
|
cursor: pointer;
|
|
288
286
|
}
|
|
289
287
|
|
|
@@ -293,7 +291,8 @@
|
|
|
293
291
|
}
|
|
294
292
|
|
|
295
293
|
.ff-hero-copy.copied {
|
|
296
|
-
|
|
294
|
+
@include mixins.copy-button-copied;
|
|
295
|
+
|
|
297
296
|
border-color: #{mg.ref("color-rule-strong")};
|
|
298
297
|
background-color: #{mg.ref("color-surface-alt")};
|
|
299
298
|
background-image: var(--vp-icon-copied);
|
|
@@ -308,10 +307,13 @@
|
|
|
308
307
|
// is the limit; past 960px the column is half the hero, wide enough that this is the one
|
|
309
308
|
// that bites, so the image can run as large as the site's own picture allows.
|
|
310
309
|
max-width: 28rem;
|
|
310
|
+
|
|
311
|
+
// Keeps the picture off the edges of its area, whatever the screen size.
|
|
312
|
+
padding-block: 2rem;
|
|
311
313
|
}
|
|
312
314
|
|
|
313
315
|
.ff-hero-image img {
|
|
314
|
-
width:
|
|
316
|
+
width: 90%;
|
|
315
317
|
height: auto;
|
|
316
318
|
}
|
|
317
319
|
|
|
@@ -336,6 +338,19 @@
|
|
|
336
338
|
border-top: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
337
339
|
}
|
|
338
340
|
|
|
341
|
+
// Single column, the image or panel is the container's last cell and would end flush against
|
|
342
|
+
// the colophon rule: give it the same 3rem the container puts between its own cells. The image
|
|
343
|
+
// already carries 2rem of its own padding below, so it only needs the remaining 1rem.
|
|
344
|
+
@include bp.down("md") {
|
|
345
|
+
.ff-hero.has-image .ff-hero-meta {
|
|
346
|
+
margin-top: 1rem;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.ff-hero.has-panel .ff-hero-meta {
|
|
350
|
+
margin-top: 3rem;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
339
354
|
.ff-hero-meta-item {
|
|
340
355
|
padding-left: 1.5rem;
|
|
341
356
|
border-left: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
package/src/styles/_mixins.scss
CHANGED
|
@@ -53,6 +53,30 @@
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
// The square copy button of a code block and of the hero install line: same size, radius and icon
|
|
57
|
+
// size, so the two do not read as two different controls.
|
|
58
|
+
|
|
59
|
+
@mixin copy-button {
|
|
60
|
+
width: 1.75rem;
|
|
61
|
+
height: 1.75rem;
|
|
62
|
+
border-radius: #{mg.ref("radius-sm")};
|
|
63
|
+
background-color: transparent;
|
|
64
|
+
background-size: 0.875rem;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Once copied, the button squares off its left edge to sit flush against the "Copied" flag.
|
|
68
|
+
|
|
69
|
+
@mixin copy-button-copied {
|
|
70
|
+
border-radius: 0 #{mg.ref("radius-sm")} #{mg.ref("radius-sm")} 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// The "Copied" flag, flush against the left of the button: same height, rounded on its far side.
|
|
74
|
+
|
|
75
|
+
@mixin copied-flag {
|
|
76
|
+
height: 1.75rem;
|
|
77
|
+
border-radius: #{mg.ref("radius-sm")} 0 0 #{mg.ref("radius-sm")};
|
|
78
|
+
}
|
|
79
|
+
|
|
56
80
|
// The page title: the doc h1 and the blog title read as the same voice.
|
|
57
81
|
|
|
58
82
|
@mixin page-title {
|
package/src/styles/_motion.scss
CHANGED
package/src/styles/_nav.scss
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// ============================================================================================= //
|
|
4
4
|
|
|
5
5
|
@use "breakpoints" as bp;
|
|
6
|
+
@use "mixins";
|
|
6
7
|
@use "theme" as mg;
|
|
7
8
|
|
|
8
9
|
.ff-theme {
|
|
@@ -259,6 +260,93 @@
|
|
|
259
260
|
color: #{mg.ref("color-ink")};
|
|
260
261
|
}
|
|
261
262
|
|
|
263
|
+
// Dropdown menus (nav flyouts, the extra "..." menu, the language menu): the same flat hairline
|
|
264
|
+
// panel as the page actions menu. The prefix keeps it off the mobile nav screen, which reuses
|
|
265
|
+
// the menu links, and outranks the components' own scoped styles.
|
|
266
|
+
|
|
267
|
+
.VPFlyout .VPMenu {
|
|
268
|
+
padding: 0.375rem;
|
|
269
|
+
border: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
270
|
+
border-radius: #{mg.ref("radius-md")};
|
|
271
|
+
background-color: var(--vp-c-bg-elv);
|
|
272
|
+
box-shadow: var(--vp-shadow-3);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.VPFlyout .VPMenu .VPMenuLink .link {
|
|
276
|
+
border-radius: #{mg.ref("radius-sm")};
|
|
277
|
+
font-size: #{mg.ref("size-ui")};
|
|
278
|
+
font-weight: 500;
|
|
279
|
+
color: #{mg.ref("color-ink-muted")};
|
|
280
|
+
transition:
|
|
281
|
+
background-color #{mg.ref("motion-duration")} #{mg.ref("motion-ease")},
|
|
282
|
+
color #{mg.ref("motion-duration")} #{mg.ref("motion-ease")};
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.VPFlyout .VPMenu .VPMenuLink .link:hover {
|
|
286
|
+
background-color: #{mg.ref("color-surface-alt")};
|
|
287
|
+
color: #{mg.ref("color-ink")};
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.VPFlyout .VPMenu .VPMenuLink .link.active {
|
|
291
|
+
color: #{mg.ref("color-accent")};
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.VPFlyout .VPMenu .VPMenuGroup .title,
|
|
295
|
+
.VPFlyout .VPMenu .VPNavTranslations .title {
|
|
296
|
+
@include mixins.label;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.VPFlyout .VPMenu .VPMenuGroup,
|
|
300
|
+
.VPFlyout .VPMenu .VPMenuLink,
|
|
301
|
+
.VPFlyout .VPMenu .group,
|
|
302
|
+
.VPFlyout .VPMenu .item {
|
|
303
|
+
border-top-color: #{mg.ref("color-rule")};
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
// Hamburger: ink bars that take the accent on hover, in the same two-pixel weight as the
|
|
307
|
+
// theme's accent rules.
|
|
308
|
+
|
|
309
|
+
.VPNavBarHamburger .top,
|
|
310
|
+
.VPNavBarHamburger .middle,
|
|
311
|
+
.VPNavBarHamburger .bottom {
|
|
312
|
+
height: #{mg.ref("rule-accent-width")};
|
|
313
|
+
background-color: #{mg.ref("color-ink")};
|
|
314
|
+
transition:
|
|
315
|
+
top #{mg.ref("motion-duration")} #{mg.ref("motion-ease")},
|
|
316
|
+
background-color #{mg.ref("motion-duration")} #{mg.ref("motion-ease")},
|
|
317
|
+
transform #{mg.ref("motion-duration")} #{mg.ref("motion-ease")};
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.VPNavBarHamburger:hover .top,
|
|
321
|
+
.VPNavBarHamburger:hover .middle,
|
|
322
|
+
.VPNavBarHamburger:hover .bottom,
|
|
323
|
+
.VPNavBarHamburger.active:hover .top,
|
|
324
|
+
.VPNavBarHamburger.active:hover .middle,
|
|
325
|
+
.VPNavBarHamburger.active:hover .bottom {
|
|
326
|
+
background-color: #{mg.ref("color-accent")};
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
// Social links of the nav bar and the "..." menu, set like the other nav links. The footer
|
|
330
|
+
// draws its own.
|
|
331
|
+
|
|
332
|
+
.VPNavBar .VPSocialLink,
|
|
333
|
+
.VPFlyout .VPSocialLink {
|
|
334
|
+
color: #{mg.ref("color-ink-muted")};
|
|
335
|
+
transition: color #{mg.ref("motion-duration")} #{mg.ref("motion-ease")};
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.VPNavBar .VPSocialLink:hover,
|
|
339
|
+
.VPFlyout .VPSocialLink:hover {
|
|
340
|
+
color: #{mg.ref("color-ink")};
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
// The overlay behind the mobile nav and sidebar: a wash of the page colour, so it reads in
|
|
344
|
+
// both schemes instead of a black sheet.
|
|
345
|
+
|
|
346
|
+
div.VPBackdrop {
|
|
347
|
+
background: color-mix(in srgb, #{mg.ref("color-paper")} 85%, transparent);
|
|
348
|
+
}
|
|
349
|
+
|
|
262
350
|
// Search trigger
|
|
263
351
|
|
|
264
352
|
.VPNavBarSearchButton {
|
|
@@ -361,3 +449,17 @@
|
|
|
361
449
|
border-color: #{mg.ref("color-accent")};
|
|
362
450
|
background: #{mg.ref("color-accent-soft")};
|
|
363
451
|
}
|
|
452
|
+
|
|
453
|
+
@media (prefers-reduced-motion: reduce) {
|
|
454
|
+
.ff-theme {
|
|
455
|
+
.VPFlyout .VPMenu .VPMenuLink .link,
|
|
456
|
+
.VPNavBarHamburger .top,
|
|
457
|
+
.VPNavBarHamburger .middle,
|
|
458
|
+
.VPNavBarHamburger .bottom,
|
|
459
|
+
.VPNavBar .VPSocialLink,
|
|
460
|
+
.VPFlyout .VPSocialLink,
|
|
461
|
+
div.VPBackdrop {
|
|
462
|
+
transition: none;
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// ============================================================================================= //
|
|
2
|
+
// NOT FOUND //
|
|
3
|
+
// ============================================================================================= //
|
|
4
|
+
|
|
5
|
+
@use "theme" as mg;
|
|
6
|
+
|
|
7
|
+
// Styles the default theme's 404 in place: the error code is the monospaced machine text, the
|
|
8
|
+
// title the page title voice, and the way home a hairline button that takes the accent on hover.
|
|
9
|
+
// The selectors carry `.ff-theme` so they outrank the component's own scoped styles.
|
|
10
|
+
|
|
11
|
+
.ff-theme {
|
|
12
|
+
.NotFound {
|
|
13
|
+
max-width: #{mg.ref("layout-content")};
|
|
14
|
+
margin: 0 auto;
|
|
15
|
+
text-align: left;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.NotFound .code {
|
|
19
|
+
font-family: #{mg.ref("font-mono")};
|
|
20
|
+
font-size: #{mg.ref("size-h1")};
|
|
21
|
+
font-weight: 500;
|
|
22
|
+
line-height: 1;
|
|
23
|
+
letter-spacing: #{mg.ref("tracking-title")};
|
|
24
|
+
color: #{mg.ref("color-accent")};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.NotFound .title {
|
|
28
|
+
padding-top: 1.25rem;
|
|
29
|
+
font-family: #{mg.ref("font-display")};
|
|
30
|
+
font-size: #{mg.ref("size-h1")};
|
|
31
|
+
font-weight: 620;
|
|
32
|
+
line-height: #{mg.ref("leading-tight")};
|
|
33
|
+
letter-spacing: #{mg.ref("tracking-title")};
|
|
34
|
+
text-transform: none;
|
|
35
|
+
color: #{mg.ref("color-ink")};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.NotFound .divider {
|
|
39
|
+
width: 100%;
|
|
40
|
+
height: #{mg.ref("rule-width")};
|
|
41
|
+
margin: 2rem 0 1.5rem;
|
|
42
|
+
background-color: #{mg.ref("color-rule")};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.NotFound .quote {
|
|
46
|
+
max-width: 32rem;
|
|
47
|
+
margin: 0;
|
|
48
|
+
font-size: #{mg.ref("size-body")};
|
|
49
|
+
font-weight: 400;
|
|
50
|
+
line-height: 1.65;
|
|
51
|
+
color: #{mg.ref("color-ink-muted")};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.NotFound .action {
|
|
55
|
+
padding-top: 2rem;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.NotFound .link {
|
|
59
|
+
padding: 0 1.25rem;
|
|
60
|
+
border: #{mg.ref("rule-width")} solid #{mg.ref("color-rule-strong")};
|
|
61
|
+
border-radius: #{mg.ref("radius-sm")};
|
|
62
|
+
font-size: #{mg.ref("size-ui")};
|
|
63
|
+
font-weight: 550;
|
|
64
|
+
line-height: 2.75rem;
|
|
65
|
+
color: #{mg.ref("color-ink")};
|
|
66
|
+
transition:
|
|
67
|
+
border-color #{mg.ref("motion-duration")} #{mg.ref("motion-ease")},
|
|
68
|
+
color #{mg.ref("motion-duration")} #{mg.ref("motion-ease")};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.NotFound .link:hover {
|
|
72
|
+
border-color: #{mg.ref("color-accent")};
|
|
73
|
+
color: #{mg.ref("color-accent")};
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@media (prefers-reduced-motion: reduce) {
|
|
78
|
+
.ff-theme .NotFound .link {
|
|
79
|
+
transition: none;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
// ============================================================================================= //
|
|
2
|
+
// TEAM //
|
|
3
|
+
// ============================================================================================= //
|
|
4
|
+
|
|
5
|
+
@use "mixins";
|
|
6
|
+
@use "theme" as mg;
|
|
7
|
+
|
|
8
|
+
// Restyles the default theme's team page in place: the title speaks in the page-title voice, a
|
|
9
|
+
// section title is a monospaced label cut out of a hairline, and a member is a flat hairline
|
|
10
|
+
// surface like `.ff-card`, with no shadow. The selectors carry `.ff-theme` (and the size class where
|
|
11
|
+
// the component sets one) so they outrank the component's own scoped styles.
|
|
12
|
+
|
|
13
|
+
.ff-theme {
|
|
14
|
+
.VPTeamPageTitle {
|
|
15
|
+
text-align: left;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.VPTeamPageTitle .title {
|
|
19
|
+
font-family: #{mg.ref("font-display")};
|
|
20
|
+
|
|
21
|
+
@include mixins.page-title;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.VPTeamPageTitle .lead {
|
|
25
|
+
max-width: 37rem;
|
|
26
|
+
margin: 0;
|
|
27
|
+
font-size: #{mg.ref("size-body")};
|
|
28
|
+
font-weight: 400;
|
|
29
|
+
line-height: 1.65;
|
|
30
|
+
letter-spacing: normal;
|
|
31
|
+
color: #{mg.ref("color-ink-muted")};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.VPTeamPageSection .title {
|
|
35
|
+
max-width: #{mg.ref("layout-wide")};
|
|
36
|
+
text-align: left;
|
|
37
|
+
color: #{mg.ref("color-ink-faint")};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.VPTeamPageSection .title-line {
|
|
41
|
+
height: #{mg.ref("rule-width")};
|
|
42
|
+
background-color: #{mg.ref("color-rule")};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.VPTeamPageSection .title-text {
|
|
46
|
+
padding: 0 0.75rem 0 0;
|
|
47
|
+
background-color: #{mg.ref("color-paper")};
|
|
48
|
+
|
|
49
|
+
@include mixins.label;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.VPTeamPageSection .lead {
|
|
53
|
+
max-width: #{mg.ref("layout-wide")};
|
|
54
|
+
font-size: #{mg.ref("size-body")};
|
|
55
|
+
font-weight: 400;
|
|
56
|
+
line-height: 1.65;
|
|
57
|
+
text-align: left;
|
|
58
|
+
color: #{mg.ref("color-ink-muted")};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// ----------------------------------------------------------------------------------------- //
|
|
62
|
+
// Members
|
|
63
|
+
// ----------------------------------------------------------------------------------------- //
|
|
64
|
+
|
|
65
|
+
// The grid spans the same width as the section title and rule, whatever the member count: the
|
|
66
|
+
// component caps and centres it per count, which left the cards off the title's edges.
|
|
67
|
+
.VPTeamMembers:is(.small, .medium)[class*="count-"] .container {
|
|
68
|
+
max-width: #{mg.ref("layout-wide")};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.VPTeamMembers .VPTeamMembersItem:is(.small, .medium) {
|
|
72
|
+
border: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
73
|
+
border-radius: #{mg.ref("radius-md")};
|
|
74
|
+
background: #{mg.ref("color-surface")};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.VPTeamMembers .VPTeamMembersItem:is(.small, .medium) .profile {
|
|
78
|
+
background: transparent;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.VPTeamMembers .VPTeamMembersItem:is(.small, .medium) .avatar {
|
|
82
|
+
margin: 0;
|
|
83
|
+
border-radius: #{mg.ref("radius-md")};
|
|
84
|
+
box-shadow: none;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.VPTeamMembers .VPTeamMembersItem:is(.small, .medium) .avatar-img {
|
|
88
|
+
border-radius: #{mg.ref("radius-md")};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.VPTeamMembers .VPTeamMembersItem:is(.small, .medium) .data {
|
|
92
|
+
text-align: left;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.VPTeamMembers .VPTeamMembersItem:is(.small, .medium) .name {
|
|
96
|
+
font-family: #{mg.ref("font-display")};
|
|
97
|
+
font-size: #{mg.ref("size-body")};
|
|
98
|
+
font-weight: 620;
|
|
99
|
+
letter-spacing: #{mg.ref("tracking-tight")};
|
|
100
|
+
color: #{mg.ref("color-ink")};
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.VPTeamMembers .VPTeamMembersItem:is(.small, .medium) .affiliation {
|
|
104
|
+
font-family: #{mg.ref("font-mono")};
|
|
105
|
+
font-size: #{mg.ref("size-label")};
|
|
106
|
+
font-weight: 500;
|
|
107
|
+
color: #{mg.ref("color-ink-muted")};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.VPTeamMembers .VPTeamMembersItem:is(.small, .medium) .desc {
|
|
111
|
+
max-width: none;
|
|
112
|
+
margin: 0;
|
|
113
|
+
font-size: #{mg.ref("size-ui-lg")};
|
|
114
|
+
line-height: 1.6;
|
|
115
|
+
color: #{mg.ref("color-ink-muted")};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// The links sit under a hairline, flush with the card's own padding.
|
|
119
|
+
.VPTeamMembers .VPTeamMembersItem:is(.small, .medium) .links {
|
|
120
|
+
justify-content: flex-start;
|
|
121
|
+
height: auto;
|
|
122
|
+
margin: 1.25rem -1rem -1rem;
|
|
123
|
+
padding: 0.5rem 0 0;
|
|
124
|
+
border-top: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.VPTeamMembers .VPTeamMembersItem:is(.small, .medium) .sp {
|
|
128
|
+
border-top: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.VPTeamMembers .VPTeamMembersItem:is(.small, .medium) .sp-link {
|
|
132
|
+
background-color: transparent;
|
|
133
|
+
color: #{mg.ref("color-ink-muted")};
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.VPTeamMembers .VPTeamMembersItem:is(.small, .medium) .sp .sp-link.link:hover,
|
|
137
|
+
.VPTeamMembers .VPTeamMembersItem:is(.small, .medium) .sp .sp-link.link:focus {
|
|
138
|
+
background-color: transparent;
|
|
139
|
+
color: #{mg.ref("color-accent")};
|
|
140
|
+
}
|
|
141
|
+
}
|
package/src/styles/index.scss
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
@use "tokens";
|
|
11
11
|
@use "base";
|
|
12
12
|
@use "nav";
|
|
13
|
+
@use "docsearch";
|
|
13
14
|
@use "sidebar";
|
|
14
15
|
@use "doc";
|
|
15
16
|
@use "code";
|
|
@@ -17,5 +18,7 @@
|
|
|
17
18
|
@use "home";
|
|
18
19
|
@use "content";
|
|
19
20
|
@use "blog";
|
|
21
|
+
@use "not-found";
|
|
22
|
+
@use "team";
|
|
20
23
|
@use "motion";
|
|
21
24
|
@use "print";
|
package/src/types.ts
CHANGED
|
@@ -237,8 +237,9 @@ export interface ThemeOptions {
|
|
|
237
237
|
*/
|
|
238
238
|
feedback?: boolean | FeedbackConfig
|
|
239
239
|
/**
|
|
240
|
-
* Menu in the page kicker with page actions.
|
|
241
|
-
*
|
|
240
|
+
* Menu in the page kicker with page actions. By default only "Copy link" is on; `true` turns on
|
|
241
|
+
* every action and `false` turns the menu off.
|
|
242
|
+
* The Markdown source is injected by `ffTransformPageData`, which a site defining its own
|
|
242
243
|
* `transformPageData` must call from it. Mastodon has no universal share intent, so its link
|
|
243
244
|
* targets `mastodonInstance` (defaults to `mastodon.social`).
|
|
244
245
|
*/
|