@farming-labs/svelte-theme 0.0.50 → 0.0.52
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/package.json +3 -3
- package/src/components/DocsContent.svelte +105 -0
- package/src/components/DocsPage.svelte +88 -0
- package/src/themes/colorful.js +1 -0
- package/src/themes/darksharp.js +1 -0
- package/src/themes/default.js +1 -0
- package/src/themes/greentree.js +1 -0
- package/src/themes/pixel-border.js +3 -1
- package/styles/docs.css +238 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farming-labs/svelte-theme",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.52",
|
|
4
4
|
"description": "Svelte UI components for @farming-labs/docs — layout, sidebar, TOC, search, and theme toggle",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docs",
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
"dependencies": {
|
|
83
83
|
"gray-matter": "^4.0.3",
|
|
84
84
|
"sugar-high": "^0.9.5",
|
|
85
|
-
"@farming-labs/
|
|
86
|
-
"@farming-labs/
|
|
85
|
+
"@farming-labs/docs": "0.0.52",
|
|
86
|
+
"@farming-labs/svelte": "0.0.52"
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|
|
89
89
|
"svelte": ">=5.0.0"
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
let openDropdownMenu = $state(false);
|
|
13
13
|
let copyLabel = $state("Copy page");
|
|
14
14
|
let copied = $state(false);
|
|
15
|
+
let selectedFeedback = $state(null);
|
|
15
16
|
|
|
16
17
|
let titleSuffix = $derived(
|
|
17
18
|
config?.metadata?.titleTemplate
|
|
@@ -121,6 +122,26 @@
|
|
|
121
122
|
);
|
|
122
123
|
let showActionsAbove = $derived(pageActionsPosition === "above-title" && showPageActions);
|
|
123
124
|
let showActionsBelow = $derived(pageActionsPosition === "below-title" && showPageActions);
|
|
125
|
+
let feedbackConfig = $derived.by(() => {
|
|
126
|
+
const defaults = {
|
|
127
|
+
enabled: false,
|
|
128
|
+
question: "How is this guide?",
|
|
129
|
+
positiveLabel: "Good",
|
|
130
|
+
negativeLabel: "Bad",
|
|
131
|
+
onFeedback: undefined,
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
const feedback = config?.feedback;
|
|
135
|
+
if (feedback === undefined || feedback === false) return defaults;
|
|
136
|
+
if (feedback === true) return { ...defaults, enabled: true };
|
|
137
|
+
return {
|
|
138
|
+
enabled: feedback.enabled !== false,
|
|
139
|
+
question: feedback.question ?? defaults.question,
|
|
140
|
+
positiveLabel: feedback.positiveLabel ?? defaults.positiveLabel,
|
|
141
|
+
negativeLabel: feedback.negativeLabel ?? defaults.negativeLabel,
|
|
142
|
+
onFeedback: typeof feedback.onFeedback === "function" ? feedback.onFeedback : undefined,
|
|
143
|
+
};
|
|
144
|
+
});
|
|
124
145
|
|
|
125
146
|
function handleCopyPage() {
|
|
126
147
|
let text = "";
|
|
@@ -170,6 +191,44 @@
|
|
|
170
191
|
closeDropdown();
|
|
171
192
|
}
|
|
172
193
|
|
|
194
|
+
function handleFeedback(value) {
|
|
195
|
+
selectedFeedback = value;
|
|
196
|
+
|
|
197
|
+
const pathname =
|
|
198
|
+
typeof window !== "undefined"
|
|
199
|
+
? window.location.pathname.replace(/\/$/, "") || "/"
|
|
200
|
+
: data.slug
|
|
201
|
+
? `/${data.entry ?? config?.entry ?? "docs"}/${data.slug}`
|
|
202
|
+
: `/${data.entry ?? config?.entry ?? "docs"}`;
|
|
203
|
+
|
|
204
|
+
const payload = {
|
|
205
|
+
value,
|
|
206
|
+
title: data.title,
|
|
207
|
+
description: data.description,
|
|
208
|
+
url: typeof window !== "undefined" ? window.location.href : pathname,
|
|
209
|
+
pathname,
|
|
210
|
+
path: pathname,
|
|
211
|
+
entry: data.entry ?? config?.entry ?? "docs",
|
|
212
|
+
slug: data.slug ?? "",
|
|
213
|
+
locale: data.locale,
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
try {
|
|
217
|
+
feedbackConfig.onFeedback?.(payload);
|
|
218
|
+
} catch {}
|
|
219
|
+
|
|
220
|
+
try {
|
|
221
|
+
const docsWindow = typeof window !== "undefined" ? window : undefined;
|
|
222
|
+
if (docsWindow && typeof docsWindow.__fdOnFeedback__ === "function") {
|
|
223
|
+
docsWindow.__fdOnFeedback__(payload);
|
|
224
|
+
}
|
|
225
|
+
} catch {}
|
|
226
|
+
|
|
227
|
+
if (typeof window !== "undefined") {
|
|
228
|
+
window.dispatchEvent(new CustomEvent("fd:feedback", { detail: payload }));
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
173
232
|
function handleClickOutside(e) {
|
|
174
233
|
const target = e.target;
|
|
175
234
|
if (openDropdownMenu && !target?.closest?.(".fd-page-action-dropdown")) {
|
|
@@ -344,6 +403,52 @@
|
|
|
344
403
|
{/if}
|
|
345
404
|
|
|
346
405
|
{@html htmlWithoutFirstH1}
|
|
406
|
+
|
|
407
|
+
{#if feedbackConfig.enabled}
|
|
408
|
+
<section class="fd-feedback" aria-label="Page feedback">
|
|
409
|
+
<div class="fd-feedback-content">
|
|
410
|
+
<p class="fd-feedback-question">{feedbackConfig.question}</p>
|
|
411
|
+
<div class="fd-feedback-actions" role="group" aria-label={feedbackConfig.question}>
|
|
412
|
+
<button
|
|
413
|
+
type="button"
|
|
414
|
+
class="fd-page-action-btn"
|
|
415
|
+
aria-pressed={selectedFeedback === "positive"}
|
|
416
|
+
data-selected={selectedFeedback === "positive" ? "true" : undefined}
|
|
417
|
+
onclick={() => handleFeedback("positive")}
|
|
418
|
+
>
|
|
419
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
420
|
+
<path
|
|
421
|
+
d="M7 21H5a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h2m0 11V10m0 11h9.28a2 2 0 0 0 1.97-1.66l1.2-7A2 2 0 0 0 17.48 10H13V6.5a2.5 2.5 0 0 0-2.5-2.5L7 10"
|
|
422
|
+
stroke="currentColor"
|
|
423
|
+
stroke-width="2"
|
|
424
|
+
stroke-linecap="round"
|
|
425
|
+
stroke-linejoin="round"
|
|
426
|
+
/>
|
|
427
|
+
</svg>
|
|
428
|
+
<span>{feedbackConfig.positiveLabel}</span>
|
|
429
|
+
</button>
|
|
430
|
+
<button
|
|
431
|
+
type="button"
|
|
432
|
+
class="fd-page-action-btn"
|
|
433
|
+
aria-pressed={selectedFeedback === "negative"}
|
|
434
|
+
data-selected={selectedFeedback === "negative" ? "true" : undefined}
|
|
435
|
+
onclick={() => handleFeedback("negative")}
|
|
436
|
+
>
|
|
437
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
438
|
+
<path
|
|
439
|
+
d="M17 3h2a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2h-2M17 3v11m0-11H7.72a2 2 0 0 0-1.97 1.66l-1.2 7A2 2 0 0 0 6.52 14H11v3.5a2.5 2.5 0 0 0 2.5 2.5L17 14"
|
|
440
|
+
stroke="currentColor"
|
|
441
|
+
stroke-width="2"
|
|
442
|
+
stroke-linecap="round"
|
|
443
|
+
stroke-linejoin="round"
|
|
444
|
+
/>
|
|
445
|
+
</svg>
|
|
446
|
+
<span>{feedbackConfig.negativeLabel}</span>
|
|
447
|
+
</button>
|
|
448
|
+
</div>
|
|
449
|
+
</div>
|
|
450
|
+
</section>
|
|
451
|
+
{/if}
|
|
347
452
|
</div>
|
|
348
453
|
{/snippet}
|
|
349
454
|
</DocsPage>
|
|
@@ -40,6 +40,25 @@
|
|
|
40
40
|
return { ...page, url: withLang(page.url, activeLocale) };
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
function setHoverLinkOpen(root, open) {
|
|
44
|
+
if (!(root instanceof HTMLElement)) return;
|
|
45
|
+
const trigger = root.querySelector(".fd-hover-link-trigger");
|
|
46
|
+
const popover = root.querySelector(".fd-hover-link-popover");
|
|
47
|
+
if (!(trigger instanceof HTMLElement) || !(popover instanceof HTMLElement)) return;
|
|
48
|
+
|
|
49
|
+
root.classList.toggle("fd-hover-link-open", open);
|
|
50
|
+
trigger.setAttribute("aria-expanded", String(open));
|
|
51
|
+
popover.setAttribute("aria-hidden", String(!open));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function closeOpenHoverLinks(event) {
|
|
55
|
+
document.querySelectorAll("[data-hover-link].fd-hover-link-open").forEach((root) => {
|
|
56
|
+
if (!(root instanceof HTMLElement)) return;
|
|
57
|
+
if (event.target instanceof Node && root.contains(event.target)) return;
|
|
58
|
+
setHoverLinkOpen(root, false);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
43
62
|
onMount(() => {
|
|
44
63
|
scanHeadings();
|
|
45
64
|
wireInteractive();
|
|
@@ -115,6 +134,75 @@
|
|
|
115
134
|
const localized = withLang(href, locale);
|
|
116
135
|
if (localized) link.setAttribute("href", localized);
|
|
117
136
|
});
|
|
137
|
+
|
|
138
|
+
document.querySelectorAll("[data-hover-link]").forEach((root) => {
|
|
139
|
+
if (!(root instanceof HTMLElement)) return;
|
|
140
|
+
if (root.dataset.fdHoverLinkBound === "true") return;
|
|
141
|
+
root.dataset.fdHoverLinkBound = "true";
|
|
142
|
+
|
|
143
|
+
const trigger = root.querySelector(".fd-hover-link-trigger");
|
|
144
|
+
const popover = root.querySelector(".fd-hover-link-popover");
|
|
145
|
+
if (!(trigger instanceof HTMLElement) || !(popover instanceof HTMLElement)) return;
|
|
146
|
+
|
|
147
|
+
let closeTimer = 0;
|
|
148
|
+
const setOpen = (open) => {
|
|
149
|
+
if (closeTimer !== 0) {
|
|
150
|
+
window.clearTimeout(closeTimer);
|
|
151
|
+
closeTimer = 0;
|
|
152
|
+
}
|
|
153
|
+
setHoverLinkOpen(root, open);
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
const containsTarget = (target) => target instanceof Node && root.contains(target);
|
|
157
|
+
const closeSoon = () => {
|
|
158
|
+
if (closeTimer !== 0) window.clearTimeout(closeTimer);
|
|
159
|
+
closeTimer = window.setTimeout(() => setOpen(false), 90);
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
trigger.addEventListener("pointerenter", () => setOpen(true));
|
|
163
|
+
trigger.addEventListener("pointerleave", (event) => {
|
|
164
|
+
if (containsTarget(event.relatedTarget)) return;
|
|
165
|
+
closeSoon();
|
|
166
|
+
});
|
|
167
|
+
trigger.addEventListener("focus", (event) => {
|
|
168
|
+
if (!(event.currentTarget instanceof HTMLElement)) return;
|
|
169
|
+
if (typeof event.currentTarget.matches === "function" && !event.currentTarget.matches(":focus-visible")) {
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
setOpen(true);
|
|
173
|
+
});
|
|
174
|
+
trigger.addEventListener("blur", (event) => {
|
|
175
|
+
if (containsTarget(event.relatedTarget)) return;
|
|
176
|
+
closeSoon();
|
|
177
|
+
});
|
|
178
|
+
trigger.addEventListener("click", (event) => {
|
|
179
|
+
event.preventDefault();
|
|
180
|
+
setOpen(true);
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
popover.addEventListener("pointerenter", () => setOpen(true));
|
|
184
|
+
popover.addEventListener("pointerleave", (event) => {
|
|
185
|
+
if (containsTarget(event.relatedTarget)) return;
|
|
186
|
+
closeSoon();
|
|
187
|
+
});
|
|
188
|
+
popover.addEventListener("focusin", () => setOpen(true));
|
|
189
|
+
popover.addEventListener("focusout", (event) => {
|
|
190
|
+
if (containsTarget(event.relatedTarget)) return;
|
|
191
|
+
closeSoon();
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
root.addEventListener("keydown", (event) => {
|
|
195
|
+
if (event.key !== "Escape") return;
|
|
196
|
+
setOpen(false);
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
if (document.documentElement.dataset.fdHoverLinkGlobalBound !== "true") {
|
|
201
|
+
document.documentElement.dataset.fdHoverLinkGlobalBound = "true";
|
|
202
|
+
|
|
203
|
+
document.addEventListener("pointerdown", closeOpenHoverLinks);
|
|
204
|
+
document.addEventListener("focusin", closeOpenHoverLinks);
|
|
205
|
+
}
|
|
118
206
|
});
|
|
119
207
|
}
|
|
120
208
|
</script>
|
package/src/themes/colorful.js
CHANGED
package/src/themes/darksharp.js
CHANGED
package/src/themes/default.js
CHANGED
package/src/themes/greentree.js
CHANGED
|
@@ -27,7 +27,9 @@ const PixelBorderUIDefaults = {
|
|
|
27
27
|
toc: { enabled: true, depth: 3 },
|
|
28
28
|
header: { height: 56, sticky: true },
|
|
29
29
|
},
|
|
30
|
-
components: {
|
|
30
|
+
components: {
|
|
31
|
+
HoverLink: { linkLabel: "Open page", showIndicator: false },
|
|
32
|
+
},
|
|
31
33
|
};
|
|
32
34
|
|
|
33
35
|
export const pixelBorder = createTheme({
|
package/styles/docs.css
CHANGED
|
@@ -644,10 +644,19 @@ samp {
|
|
|
644
644
|
color: var(--color-fd-foreground);
|
|
645
645
|
}
|
|
646
646
|
|
|
647
|
+
.fd-page-action-btn[data-selected="true"] {
|
|
648
|
+
color: var(--color-fd-accent-foreground);
|
|
649
|
+
background: var(--color-fd-accent);
|
|
650
|
+
}
|
|
651
|
+
|
|
647
652
|
.fd-page-action-btn svg {
|
|
648
653
|
flex-shrink: 0;
|
|
649
654
|
}
|
|
650
655
|
|
|
656
|
+
.fd-page-action-btn[data-selected="true"] svg {
|
|
657
|
+
color: currentColor;
|
|
658
|
+
}
|
|
659
|
+
|
|
651
660
|
.fd-page-action-dropdown {
|
|
652
661
|
position: relative;
|
|
653
662
|
}
|
|
@@ -715,6 +724,35 @@ samp {
|
|
|
715
724
|
margin-bottom: 1rem;
|
|
716
725
|
}
|
|
717
726
|
|
|
727
|
+
.fd-feedback {
|
|
728
|
+
margin-top: 2rem;
|
|
729
|
+
padding-top: 1.25rem;
|
|
730
|
+
border-top: 1px solid var(--color-fd-border);
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
.fd-feedback-content {
|
|
734
|
+
display: flex;
|
|
735
|
+
align-items: center;
|
|
736
|
+
justify-content: space-between;
|
|
737
|
+
gap: 1rem;
|
|
738
|
+
flex-wrap: wrap;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
.fd-feedback-question {
|
|
742
|
+
margin: 0;
|
|
743
|
+
font-size: 0.9375rem;
|
|
744
|
+
font-weight: 600;
|
|
745
|
+
line-height: 1.5;
|
|
746
|
+
color: var(--color-fd-foreground);
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
.fd-feedback-actions {
|
|
750
|
+
display: inline-flex;
|
|
751
|
+
align-items: center;
|
|
752
|
+
gap: 0.5rem;
|
|
753
|
+
flex-wrap: wrap;
|
|
754
|
+
}
|
|
755
|
+
|
|
718
756
|
/* ─── Breadcrumb ─────────────────────────────────────────────────────── */
|
|
719
757
|
|
|
720
758
|
.fd-breadcrumb {
|
|
@@ -914,6 +952,206 @@ samp {
|
|
|
914
952
|
opacity: 0.8;
|
|
915
953
|
}
|
|
916
954
|
|
|
955
|
+
.fd-hover-link {
|
|
956
|
+
position: relative;
|
|
957
|
+
display: inline-block;
|
|
958
|
+
vertical-align: baseline;
|
|
959
|
+
max-width: 100%;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
.fd-hover-link-trigger {
|
|
963
|
+
display: inline !important;
|
|
964
|
+
border: none;
|
|
965
|
+
background: transparent;
|
|
966
|
+
padding: 0;
|
|
967
|
+
margin: 0;
|
|
968
|
+
color: var(--color-fd-foreground);
|
|
969
|
+
cursor: pointer;
|
|
970
|
+
text-decoration: underline;
|
|
971
|
+
text-decoration-style: dashed;
|
|
972
|
+
text-decoration-thickness: 0.08em;
|
|
973
|
+
text-underline-offset: 0.22em;
|
|
974
|
+
text-decoration-color: color-mix(in srgb, var(--color-fd-foreground) 46%, transparent);
|
|
975
|
+
font: inherit;
|
|
976
|
+
line-height: inherit;
|
|
977
|
+
vertical-align: baseline;
|
|
978
|
+
appearance: none;
|
|
979
|
+
transition: text-decoration-color 180ms ease, opacity 180ms ease;
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
.fd-hover-link-trigger:hover,
|
|
983
|
+
.fd-hover-link-trigger:focus-visible,
|
|
984
|
+
.fd-hover-link-open > .fd-hover-link-trigger {
|
|
985
|
+
text-decoration-color: color-mix(in srgb, var(--color-fd-foreground) 68%, transparent);
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
.fd-hover-link-trigger:focus-visible {
|
|
989
|
+
outline: none;
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
.fd-hover-link-popover {
|
|
993
|
+
--fd-hover-link-rest-x: -50%;
|
|
994
|
+
--fd-hover-link-rest-y: 8px;
|
|
995
|
+
--fd-hover-link-open-x: -50%;
|
|
996
|
+
--fd-hover-link-open-y: 0;
|
|
997
|
+
position: absolute;
|
|
998
|
+
top: calc(100% + var(--fd-hover-link-side-offset, 12px));
|
|
999
|
+
left: 50%;
|
|
1000
|
+
z-index: 40;
|
|
1001
|
+
width: min(22rem, calc(100vw - 2rem));
|
|
1002
|
+
max-width: min(22rem, calc(100vw - 2rem));
|
|
1003
|
+
opacity: 0;
|
|
1004
|
+
visibility: hidden;
|
|
1005
|
+
pointer-events: none;
|
|
1006
|
+
transform: translate3d(var(--fd-hover-link-rest-x), var(--fd-hover-link-rest-y), 0);
|
|
1007
|
+
transition: opacity 180ms ease, transform 180ms ease, visibility 180ms linear;
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
.fd-hover-link[data-align="start"] > .fd-hover-link-popover {
|
|
1011
|
+
left: 0;
|
|
1012
|
+
--fd-hover-link-rest-x: 0;
|
|
1013
|
+
--fd-hover-link-open-x: 0;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
.fd-hover-link[data-align="end"] > .fd-hover-link-popover {
|
|
1017
|
+
left: auto;
|
|
1018
|
+
right: 0;
|
|
1019
|
+
--fd-hover-link-rest-x: 0;
|
|
1020
|
+
--fd-hover-link-open-x: 0;
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
.fd-hover-link[data-side="top"] > .fd-hover-link-popover {
|
|
1024
|
+
top: auto;
|
|
1025
|
+
bottom: calc(100% + var(--fd-hover-link-side-offset, 12px));
|
|
1026
|
+
--fd-hover-link-rest-y: -8px;
|
|
1027
|
+
--fd-hover-link-open-y: 0;
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
.fd-hover-link[data-side="right"] > .fd-hover-link-popover {
|
|
1031
|
+
top: 50%;
|
|
1032
|
+
left: calc(100% + var(--fd-hover-link-side-offset, 12px));
|
|
1033
|
+
right: auto;
|
|
1034
|
+
--fd-hover-link-rest-x: 8px;
|
|
1035
|
+
--fd-hover-link-rest-y: -50%;
|
|
1036
|
+
--fd-hover-link-open-x: 0;
|
|
1037
|
+
--fd-hover-link-open-y: -50%;
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
.fd-hover-link[data-side="right"][data-align="start"] > .fd-hover-link-popover {
|
|
1041
|
+
top: 0;
|
|
1042
|
+
--fd-hover-link-rest-y: 0;
|
|
1043
|
+
--fd-hover-link-open-y: 0;
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
.fd-hover-link[data-side="right"][data-align="end"] > .fd-hover-link-popover {
|
|
1047
|
+
top: auto;
|
|
1048
|
+
bottom: 0;
|
|
1049
|
+
--fd-hover-link-rest-y: 0;
|
|
1050
|
+
--fd-hover-link-open-y: 0;
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
.fd-hover-link[data-side="left"] > .fd-hover-link-popover {
|
|
1054
|
+
top: 50%;
|
|
1055
|
+
left: auto;
|
|
1056
|
+
right: calc(100% + var(--fd-hover-link-side-offset, 12px));
|
|
1057
|
+
--fd-hover-link-rest-x: -8px;
|
|
1058
|
+
--fd-hover-link-rest-y: -50%;
|
|
1059
|
+
--fd-hover-link-open-x: 0;
|
|
1060
|
+
--fd-hover-link-open-y: -50%;
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
.fd-hover-link[data-side="left"][data-align="start"] > .fd-hover-link-popover {
|
|
1064
|
+
top: 0;
|
|
1065
|
+
--fd-hover-link-rest-y: 0;
|
|
1066
|
+
--fd-hover-link-open-y: 0;
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
.fd-hover-link[data-side="left"][data-align="end"] > .fd-hover-link-popover {
|
|
1070
|
+
top: auto;
|
|
1071
|
+
bottom: 0;
|
|
1072
|
+
--fd-hover-link-rest-y: 0;
|
|
1073
|
+
--fd-hover-link-open-y: 0;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
.fd-hover-link-open > .fd-hover-link-popover {
|
|
1077
|
+
opacity: 1;
|
|
1078
|
+
visibility: visible;
|
|
1079
|
+
pointer-events: auto;
|
|
1080
|
+
transform: translate3d(var(--fd-hover-link-open-x), var(--fd-hover-link-open-y), 0);
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
.fd-hover-link-card {
|
|
1084
|
+
display: flex;
|
|
1085
|
+
flex-direction: column;
|
|
1086
|
+
gap: 0.75rem;
|
|
1087
|
+
width: 100%;
|
|
1088
|
+
border-radius: calc(var(--radius, 0.75rem) + 2px);
|
|
1089
|
+
border: 1px solid color-mix(in srgb, var(--color-fd-border) 88%, transparent);
|
|
1090
|
+
background: var(--color-fd-popover, var(--color-fd-background));
|
|
1091
|
+
color: var(--color-fd-popover-foreground, var(--color-fd-foreground));
|
|
1092
|
+
padding: 0.95rem 1rem;
|
|
1093
|
+
box-shadow: 0 20px 45px color-mix(in srgb, var(--color-fd-background) 78%, transparent);
|
|
1094
|
+
backdrop-filter: blur(14px);
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
.fd-hover-link-body {
|
|
1098
|
+
display: flex;
|
|
1099
|
+
flex-direction: column;
|
|
1100
|
+
gap: 0.35rem;
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
.fd-hover-link-preview-label {
|
|
1104
|
+
font-size: 0.68rem;
|
|
1105
|
+
text-transform: uppercase;
|
|
1106
|
+
letter-spacing: 0.1em;
|
|
1107
|
+
font-family: var(--fd-font-mono, var(--font-geist-mono, ui-monospace, monospace));
|
|
1108
|
+
color: color-mix(in srgb, var(--color-fd-popover-foreground, var(--color-fd-foreground)) 55%, transparent);
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
.fd-hover-link-title,
|
|
1112
|
+
.fd-hover-link-cta {
|
|
1113
|
+
text-decoration: none !important;
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
.fd-hover-link-title {
|
|
1117
|
+
color: var(--color-fd-popover-foreground, var(--color-fd-foreground));
|
|
1118
|
+
font-size: 1rem;
|
|
1119
|
+
font-weight: 600 !important;
|
|
1120
|
+
line-height: 1.3;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
.fd-hover-link-title:hover,
|
|
1124
|
+
.fd-hover-link-cta:hover {
|
|
1125
|
+
opacity: 1;
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
.fd-hover-link-description {
|
|
1129
|
+
font-size: 0.92rem;
|
|
1130
|
+
line-height: 1.6;
|
|
1131
|
+
color: color-mix(in srgb, var(--color-fd-popover-foreground, var(--color-fd-foreground)) 74%, transparent);
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
.fd-hover-link-footer {
|
|
1135
|
+
display: flex;
|
|
1136
|
+
align-items: center;
|
|
1137
|
+
justify-content: space-between;
|
|
1138
|
+
gap: 0.75rem;
|
|
1139
|
+
padding-top: 0.25rem;
|
|
1140
|
+
border-top: 1px solid color-mix(in srgb, var(--color-fd-border) 72%, transparent);
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
.fd-hover-link-cta {
|
|
1144
|
+
display: inline-flex !important;
|
|
1145
|
+
align-items: center;
|
|
1146
|
+
gap: 0.4rem;
|
|
1147
|
+
color: var(--color-fd-primary);
|
|
1148
|
+
font-size: 0.8rem;
|
|
1149
|
+
font-weight: 600 !important;
|
|
1150
|
+
text-transform: uppercase;
|
|
1151
|
+
letter-spacing: 0.08em;
|
|
1152
|
+
font-family: var(--fd-font-mono, var(--font-geist-mono, ui-monospace, monospace));
|
|
1153
|
+
}
|
|
1154
|
+
|
|
917
1155
|
.fd-page-body h1 {
|
|
918
1156
|
font-size: var(--fd-h1-size, 2.25rem);
|
|
919
1157
|
font-weight: var(--fd-h1-weight, 700);
|