@farming-labs/astro-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.astro +120 -2
- package/src/components/DocsPage.astro +100 -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/astro-theme",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.52",
|
|
4
4
|
"description": "Astro UI components for @farming-labs/docs — layout, sidebar, TOC, search, and theme toggle",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"astro",
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
},
|
|
80
80
|
"dependencies": {
|
|
81
81
|
"sugar-high": "^0.9.5",
|
|
82
|
-
"@farming-labs/
|
|
83
|
-
"@farming-labs/
|
|
82
|
+
"@farming-labs/docs": "0.0.52",
|
|
83
|
+
"@farming-labs/astro": "0.0.52"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
86
|
"astro": ">=4.0.0"
|
|
@@ -97,6 +97,25 @@ const lastUpdatedConfig = (() => {
|
|
|
97
97
|
|
|
98
98
|
const showLastUpdatedInFooter = !!data.lastModified && lastUpdatedConfig.enabled && lastUpdatedConfig.position === "footer";
|
|
99
99
|
const showLastUpdatedBelowTitle = !!data.lastModified && lastUpdatedConfig.enabled && lastUpdatedConfig.position === "below-title";
|
|
100
|
+
const feedbackConfig = (() => {
|
|
101
|
+
const defaults = {
|
|
102
|
+
enabled: false,
|
|
103
|
+
question: "How is this guide?",
|
|
104
|
+
positiveLabel: "Good",
|
|
105
|
+
negativeLabel: "Bad",
|
|
106
|
+
};
|
|
107
|
+
const feedback = config?.feedback;
|
|
108
|
+
if (feedback === undefined || feedback === false) return defaults;
|
|
109
|
+
if (feedback === true) return { ...defaults, enabled: true };
|
|
110
|
+
if (typeof feedback !== "object" || feedback === null) return defaults;
|
|
111
|
+
return {
|
|
112
|
+
enabled: feedback.enabled !== false,
|
|
113
|
+
question: feedback.question ?? defaults.question,
|
|
114
|
+
positiveLabel: feedback.positiveLabel ?? defaults.positiveLabel,
|
|
115
|
+
negativeLabel: feedback.negativeLabel ?? defaults.negativeLabel,
|
|
116
|
+
};
|
|
117
|
+
})();
|
|
118
|
+
const feedbackEntry = data.entry ?? config?.entry ?? "docs";
|
|
100
119
|
|
|
101
120
|
const htmlWithoutFirstH1 = (data.html || "").replace(/<h1[^>]*>[\s\S]*?<\/h1>\s*/i, "");
|
|
102
121
|
---
|
|
@@ -221,14 +240,75 @@ const htmlWithoutFirstH1 = (data.html || "").replace(/<h1[^>]*>[\s\S]*?<\/h1>\s*
|
|
|
221
240
|
</>
|
|
222
241
|
)}
|
|
223
242
|
<Fragment set:html={htmlWithoutFirstH1} />
|
|
243
|
+
{feedbackConfig.enabled && (
|
|
244
|
+
<section class="fd-feedback" aria-label="Page feedback">
|
|
245
|
+
<div class="fd-feedback-content">
|
|
246
|
+
<p class="fd-feedback-question">{feedbackConfig.question}</p>
|
|
247
|
+
<div class="fd-feedback-actions" role="group" aria-label={feedbackConfig.question}>
|
|
248
|
+
<button
|
|
249
|
+
type="button"
|
|
250
|
+
class="fd-page-action-btn"
|
|
251
|
+
aria-pressed="false"
|
|
252
|
+
data-feedback-button
|
|
253
|
+
data-feedback-value="positive"
|
|
254
|
+
>
|
|
255
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
256
|
+
<path
|
|
257
|
+
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"
|
|
258
|
+
stroke="currentColor"
|
|
259
|
+
stroke-width="2"
|
|
260
|
+
stroke-linecap="round"
|
|
261
|
+
stroke-linejoin="round"
|
|
262
|
+
/>
|
|
263
|
+
</svg>
|
|
264
|
+
<span>{feedbackConfig.positiveLabel}</span>
|
|
265
|
+
</button>
|
|
266
|
+
<button
|
|
267
|
+
type="button"
|
|
268
|
+
class="fd-page-action-btn"
|
|
269
|
+
aria-pressed="false"
|
|
270
|
+
data-feedback-button
|
|
271
|
+
data-feedback-value="negative"
|
|
272
|
+
>
|
|
273
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
274
|
+
<path
|
|
275
|
+
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"
|
|
276
|
+
stroke="currentColor"
|
|
277
|
+
stroke-width="2"
|
|
278
|
+
stroke-linecap="round"
|
|
279
|
+
stroke-linejoin="round"
|
|
280
|
+
/>
|
|
281
|
+
</svg>
|
|
282
|
+
<span>{feedbackConfig.negativeLabel}</span>
|
|
283
|
+
</button>
|
|
284
|
+
</div>
|
|
285
|
+
</div>
|
|
286
|
+
</section>
|
|
287
|
+
)}
|
|
224
288
|
</DocsPage>
|
|
225
289
|
|
|
226
|
-
{(copyMarkdownEnabled || openDocsEnabled) && (
|
|
227
|
-
<script
|
|
290
|
+
{(copyMarkdownEnabled || openDocsEnabled || feedbackConfig.enabled) && (
|
|
291
|
+
<script
|
|
292
|
+
define:vars={{
|
|
293
|
+
pathname,
|
|
294
|
+
openDocsProviders,
|
|
295
|
+
githubFileUrl,
|
|
296
|
+
feedbackEntry,
|
|
297
|
+
feedbackLocale: data.locale ?? null,
|
|
298
|
+
feedbackSlug: data.slug ?? "",
|
|
299
|
+
feedbackTitle: data.title,
|
|
300
|
+
feedbackDescription: data.description ?? null,
|
|
301
|
+
}}
|
|
302
|
+
>
|
|
228
303
|
(function () {
|
|
229
304
|
var pathnameVal = typeof pathname === "string" ? pathname : "";
|
|
230
305
|
var providers = Array.isArray(openDocsProviders) ? openDocsProviders : [];
|
|
231
306
|
var githubFileUrlVal = githubFileUrl || "";
|
|
307
|
+
var feedbackEntryVal = typeof feedbackEntry === "string" ? feedbackEntry : "docs";
|
|
308
|
+
var feedbackLocaleVal = typeof feedbackLocale === "string" ? feedbackLocale : undefined;
|
|
309
|
+
var feedbackSlugVal = typeof feedbackSlug === "string" ? feedbackSlug : "";
|
|
310
|
+
var feedbackTitleVal = typeof feedbackTitle === "string" ? feedbackTitle : undefined;
|
|
311
|
+
var feedbackDescriptionVal = typeof feedbackDescription === "string" ? feedbackDescription : undefined;
|
|
232
312
|
|
|
233
313
|
function init() {
|
|
234
314
|
document.querySelectorAll("[data-copy-page]").forEach(function (btn) {
|
|
@@ -299,6 +379,44 @@ const htmlWithoutFirstH1 = (data.html || "").replace(/<h1[^>]*>[\s\S]*?<\/h1>\s*
|
|
|
299
379
|
if (triggerEl) triggerEl.setAttribute("aria-expanded", "false");
|
|
300
380
|
});
|
|
301
381
|
});
|
|
382
|
+
|
|
383
|
+
document.querySelectorAll("[data-feedback-button]").forEach(function (btn) {
|
|
384
|
+
btn.addEventListener("click", function () {
|
|
385
|
+
var value = btn.getAttribute("data-feedback-value");
|
|
386
|
+
if (value !== "positive" && value !== "negative") return;
|
|
387
|
+
|
|
388
|
+
document.querySelectorAll("[data-feedback-button]").forEach(function (item) {
|
|
389
|
+
if (!(item instanceof HTMLElement)) return;
|
|
390
|
+
var selected = item.getAttribute("data-feedback-value") === value;
|
|
391
|
+
if (selected) item.setAttribute("data-selected", "true");
|
|
392
|
+
else item.removeAttribute("data-selected");
|
|
393
|
+
item.setAttribute("aria-pressed", String(selected));
|
|
394
|
+
});
|
|
395
|
+
|
|
396
|
+
var pathnameCurrent = window.location.pathname.replace(/\/$/, "") || "/";
|
|
397
|
+
var data = {
|
|
398
|
+
value: value,
|
|
399
|
+
title: feedbackTitleVal,
|
|
400
|
+
description: feedbackDescriptionVal,
|
|
401
|
+
url: window.location.href,
|
|
402
|
+
pathname: pathnameCurrent,
|
|
403
|
+
path: pathnameCurrent,
|
|
404
|
+
entry: feedbackEntryVal,
|
|
405
|
+
slug: feedbackSlugVal,
|
|
406
|
+
locale: feedbackLocaleVal,
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
try {
|
|
410
|
+
if (typeof window !== "undefined" && window.__fdOnFeedback__) {
|
|
411
|
+
window.__fdOnFeedback__(data);
|
|
412
|
+
}
|
|
413
|
+
} catch (_) {}
|
|
414
|
+
|
|
415
|
+
if (typeof window !== "undefined") {
|
|
416
|
+
window.dispatchEvent(new CustomEvent("fd:feedback", { detail: data }));
|
|
417
|
+
}
|
|
418
|
+
});
|
|
419
|
+
});
|
|
302
420
|
}
|
|
303
421
|
|
|
304
422
|
if (document.readyState === "loading") {
|
|
@@ -127,6 +127,104 @@ const localizedParentUrl = withLang(parentUrl);
|
|
|
127
127
|
</div>
|
|
128
128
|
|
|
129
129
|
<script>
|
|
130
|
+
let hoverLinkGlobalsBound = false;
|
|
131
|
+
|
|
132
|
+
function setHoverLinkOpen(root, open) {
|
|
133
|
+
if (!(root instanceof HTMLElement)) return;
|
|
134
|
+
const trigger = root.querySelector('.fd-hover-link-trigger');
|
|
135
|
+
const popover = root.querySelector('.fd-hover-link-popover');
|
|
136
|
+
if (!(trigger instanceof HTMLElement) || !(popover instanceof HTMLElement)) return;
|
|
137
|
+
|
|
138
|
+
root.classList.toggle('fd-hover-link-open', open);
|
|
139
|
+
trigger.setAttribute('aria-expanded', String(open));
|
|
140
|
+
popover.setAttribute('aria-hidden', String(!open));
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function closeOpenHoverLinks(event) {
|
|
144
|
+
document.querySelectorAll('[data-hover-link].fd-hover-link-open').forEach((root) => {
|
|
145
|
+
if (!(root instanceof HTMLElement)) return;
|
|
146
|
+
if (event.target instanceof Node && root.contains(event.target)) return;
|
|
147
|
+
setHoverLinkOpen(root, false);
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function bindHoverLinks() {
|
|
152
|
+
document.querySelectorAll('[data-hover-link]').forEach((root) => {
|
|
153
|
+
if (!(root instanceof HTMLElement)) return;
|
|
154
|
+
if (root.dataset.fdHoverLinkBound === 'true') return;
|
|
155
|
+
root.dataset.fdHoverLinkBound = 'true';
|
|
156
|
+
|
|
157
|
+
const trigger = root.querySelector('.fd-hover-link-trigger');
|
|
158
|
+
const popover = root.querySelector('.fd-hover-link-popover');
|
|
159
|
+
if (!(trigger instanceof HTMLElement) || !(popover instanceof HTMLElement)) return;
|
|
160
|
+
|
|
161
|
+
let closeTimer = 0;
|
|
162
|
+
const containsTarget = (target) => target instanceof Node && root.contains(target);
|
|
163
|
+
const clearCloseTimer = () => {
|
|
164
|
+
if (closeTimer !== 0) {
|
|
165
|
+
window.clearTimeout(closeTimer);
|
|
166
|
+
closeTimer = 0;
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
const openPopover = () => {
|
|
171
|
+
clearCloseTimer();
|
|
172
|
+
setHoverLinkOpen(root, true);
|
|
173
|
+
};
|
|
174
|
+
const closePopover = () => {
|
|
175
|
+
clearCloseTimer();
|
|
176
|
+
setHoverLinkOpen(root, false);
|
|
177
|
+
};
|
|
178
|
+
const closePopoverSoon = () => {
|
|
179
|
+
clearCloseTimer();
|
|
180
|
+
closeTimer = window.setTimeout(closePopover, 90);
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
trigger.addEventListener('pointerenter', openPopover);
|
|
184
|
+
trigger.addEventListener('pointerleave', (event) => {
|
|
185
|
+
if (containsTarget(event.relatedTarget)) return;
|
|
186
|
+
closePopoverSoon();
|
|
187
|
+
});
|
|
188
|
+
trigger.addEventListener('focus', (event) => {
|
|
189
|
+
if (!(event.currentTarget instanceof HTMLElement)) return;
|
|
190
|
+
if (typeof event.currentTarget.matches === 'function' && !event.currentTarget.matches(':focus-visible')) {
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
openPopover();
|
|
194
|
+
});
|
|
195
|
+
trigger.addEventListener('blur', (event) => {
|
|
196
|
+
if (containsTarget(event.relatedTarget)) return;
|
|
197
|
+
closePopoverSoon();
|
|
198
|
+
});
|
|
199
|
+
trigger.addEventListener('click', (event) => {
|
|
200
|
+
event.preventDefault();
|
|
201
|
+
openPopover();
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
popover.addEventListener('pointerenter', openPopover);
|
|
205
|
+
popover.addEventListener('pointerleave', (event) => {
|
|
206
|
+
if (containsTarget(event.relatedTarget)) return;
|
|
207
|
+
closePopoverSoon();
|
|
208
|
+
});
|
|
209
|
+
popover.addEventListener('focusin', openPopover);
|
|
210
|
+
popover.addEventListener('focusout', (event) => {
|
|
211
|
+
if (containsTarget(event.relatedTarget)) return;
|
|
212
|
+
closePopoverSoon();
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
root.addEventListener('keydown', (event) => {
|
|
216
|
+
if (event.key !== 'Escape') return;
|
|
217
|
+
closePopover();
|
|
218
|
+
});
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
if (hoverLinkGlobalsBound) return;
|
|
222
|
+
hoverLinkGlobalsBound = true;
|
|
223
|
+
|
|
224
|
+
document.addEventListener('pointerdown', closeOpenHoverLinks);
|
|
225
|
+
document.addEventListener('focusin', closeOpenHoverLinks);
|
|
226
|
+
}
|
|
227
|
+
|
|
130
228
|
function getItemOffset(depth) {
|
|
131
229
|
if (depth <= 2) return 14;
|
|
132
230
|
if (depth === 3) return 26;
|
|
@@ -457,6 +555,8 @@ const localizedParentUrl = withLang(parentUrl);
|
|
|
457
555
|
});
|
|
458
556
|
});
|
|
459
557
|
});
|
|
558
|
+
|
|
559
|
+
bindHoverLinks();
|
|
460
560
|
}
|
|
461
561
|
|
|
462
562
|
function runTocWhenIdle() {
|
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
|
@@ -701,10 +701,19 @@ samp {
|
|
|
701
701
|
color: var(--color-fd-foreground);
|
|
702
702
|
}
|
|
703
703
|
|
|
704
|
+
.fd-page-action-btn[data-selected="true"] {
|
|
705
|
+
color: var(--color-fd-accent-foreground);
|
|
706
|
+
background: var(--color-fd-accent);
|
|
707
|
+
}
|
|
708
|
+
|
|
704
709
|
.fd-page-action-btn svg {
|
|
705
710
|
flex-shrink: 0;
|
|
706
711
|
}
|
|
707
712
|
|
|
713
|
+
.fd-page-action-btn[data-selected="true"] svg {
|
|
714
|
+
color: currentColor;
|
|
715
|
+
}
|
|
716
|
+
|
|
708
717
|
.fd-page-action-dropdown {
|
|
709
718
|
position: relative;
|
|
710
719
|
}
|
|
@@ -918,6 +927,206 @@ samp {
|
|
|
918
927
|
opacity: 0.8;
|
|
919
928
|
}
|
|
920
929
|
|
|
930
|
+
.fd-hover-link {
|
|
931
|
+
position: relative;
|
|
932
|
+
display: inline-block;
|
|
933
|
+
vertical-align: baseline;
|
|
934
|
+
max-width: 100%;
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
.fd-hover-link-trigger {
|
|
938
|
+
display: inline !important;
|
|
939
|
+
border: none;
|
|
940
|
+
background: transparent;
|
|
941
|
+
padding: 0;
|
|
942
|
+
margin: 0;
|
|
943
|
+
color: var(--color-fd-foreground);
|
|
944
|
+
cursor: pointer;
|
|
945
|
+
text-decoration: underline;
|
|
946
|
+
text-decoration-style: dashed;
|
|
947
|
+
text-decoration-thickness: 0.08em;
|
|
948
|
+
text-underline-offset: 0.22em;
|
|
949
|
+
text-decoration-color: color-mix(in srgb, var(--color-fd-foreground) 46%, transparent);
|
|
950
|
+
font: inherit;
|
|
951
|
+
line-height: inherit;
|
|
952
|
+
vertical-align: baseline;
|
|
953
|
+
appearance: none;
|
|
954
|
+
transition: text-decoration-color 180ms ease, opacity 180ms ease;
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
.fd-hover-link-trigger:hover,
|
|
958
|
+
.fd-hover-link-trigger:focus-visible,
|
|
959
|
+
.fd-hover-link-open > .fd-hover-link-trigger {
|
|
960
|
+
text-decoration-color: color-mix(in srgb, var(--color-fd-foreground) 68%, transparent);
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
.fd-hover-link-trigger:focus-visible {
|
|
964
|
+
outline: none;
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
.fd-hover-link-popover {
|
|
968
|
+
--fd-hover-link-rest-x: -50%;
|
|
969
|
+
--fd-hover-link-rest-y: 8px;
|
|
970
|
+
--fd-hover-link-open-x: -50%;
|
|
971
|
+
--fd-hover-link-open-y: 0;
|
|
972
|
+
position: absolute;
|
|
973
|
+
top: calc(100% + var(--fd-hover-link-side-offset, 12px));
|
|
974
|
+
left: 50%;
|
|
975
|
+
z-index: 40;
|
|
976
|
+
width: min(22rem, calc(100vw - 2rem));
|
|
977
|
+
max-width: min(22rem, calc(100vw - 2rem));
|
|
978
|
+
opacity: 0;
|
|
979
|
+
visibility: hidden;
|
|
980
|
+
pointer-events: none;
|
|
981
|
+
transform: translate3d(var(--fd-hover-link-rest-x), var(--fd-hover-link-rest-y), 0);
|
|
982
|
+
transition: opacity 180ms ease, transform 180ms ease, visibility 180ms linear;
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
.fd-hover-link[data-align="start"] > .fd-hover-link-popover {
|
|
986
|
+
left: 0;
|
|
987
|
+
--fd-hover-link-rest-x: 0;
|
|
988
|
+
--fd-hover-link-open-x: 0;
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
.fd-hover-link[data-align="end"] > .fd-hover-link-popover {
|
|
992
|
+
left: auto;
|
|
993
|
+
right: 0;
|
|
994
|
+
--fd-hover-link-rest-x: 0;
|
|
995
|
+
--fd-hover-link-open-x: 0;
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
.fd-hover-link[data-side="top"] > .fd-hover-link-popover {
|
|
999
|
+
top: auto;
|
|
1000
|
+
bottom: calc(100% + var(--fd-hover-link-side-offset, 12px));
|
|
1001
|
+
--fd-hover-link-rest-y: -8px;
|
|
1002
|
+
--fd-hover-link-open-y: 0;
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
.fd-hover-link[data-side="right"] > .fd-hover-link-popover {
|
|
1006
|
+
top: 50%;
|
|
1007
|
+
left: calc(100% + var(--fd-hover-link-side-offset, 12px));
|
|
1008
|
+
right: auto;
|
|
1009
|
+
--fd-hover-link-rest-x: 8px;
|
|
1010
|
+
--fd-hover-link-rest-y: -50%;
|
|
1011
|
+
--fd-hover-link-open-x: 0;
|
|
1012
|
+
--fd-hover-link-open-y: -50%;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
.fd-hover-link[data-side="right"][data-align="start"] > .fd-hover-link-popover {
|
|
1016
|
+
top: 0;
|
|
1017
|
+
--fd-hover-link-rest-y: 0;
|
|
1018
|
+
--fd-hover-link-open-y: 0;
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
.fd-hover-link[data-side="right"][data-align="end"] > .fd-hover-link-popover {
|
|
1022
|
+
top: auto;
|
|
1023
|
+
bottom: 0;
|
|
1024
|
+
--fd-hover-link-rest-y: 0;
|
|
1025
|
+
--fd-hover-link-open-y: 0;
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
.fd-hover-link[data-side="left"] > .fd-hover-link-popover {
|
|
1029
|
+
top: 50%;
|
|
1030
|
+
left: auto;
|
|
1031
|
+
right: calc(100% + var(--fd-hover-link-side-offset, 12px));
|
|
1032
|
+
--fd-hover-link-rest-x: -8px;
|
|
1033
|
+
--fd-hover-link-rest-y: -50%;
|
|
1034
|
+
--fd-hover-link-open-x: 0;
|
|
1035
|
+
--fd-hover-link-open-y: -50%;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
.fd-hover-link[data-side="left"][data-align="start"] > .fd-hover-link-popover {
|
|
1039
|
+
top: 0;
|
|
1040
|
+
--fd-hover-link-rest-y: 0;
|
|
1041
|
+
--fd-hover-link-open-y: 0;
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
.fd-hover-link[data-side="left"][data-align="end"] > .fd-hover-link-popover {
|
|
1045
|
+
top: auto;
|
|
1046
|
+
bottom: 0;
|
|
1047
|
+
--fd-hover-link-rest-y: 0;
|
|
1048
|
+
--fd-hover-link-open-y: 0;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
.fd-hover-link-open > .fd-hover-link-popover {
|
|
1052
|
+
opacity: 1;
|
|
1053
|
+
visibility: visible;
|
|
1054
|
+
pointer-events: auto;
|
|
1055
|
+
transform: translate3d(var(--fd-hover-link-open-x), var(--fd-hover-link-open-y), 0);
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
.fd-hover-link-card {
|
|
1059
|
+
display: flex;
|
|
1060
|
+
flex-direction: column;
|
|
1061
|
+
gap: 0.75rem;
|
|
1062
|
+
width: 100%;
|
|
1063
|
+
border-radius: calc(var(--radius, 0.75rem) + 2px);
|
|
1064
|
+
border: 1px solid color-mix(in srgb, var(--color-fd-border) 88%, transparent);
|
|
1065
|
+
background: var(--color-fd-popover, var(--color-fd-background));
|
|
1066
|
+
color: var(--color-fd-popover-foreground, var(--color-fd-foreground));
|
|
1067
|
+
padding: 0.95rem 1rem;
|
|
1068
|
+
box-shadow: 0 20px 45px color-mix(in srgb, var(--color-fd-background) 78%, transparent);
|
|
1069
|
+
backdrop-filter: blur(14px);
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
.fd-hover-link-body {
|
|
1073
|
+
display: flex;
|
|
1074
|
+
flex-direction: column;
|
|
1075
|
+
gap: 0.35rem;
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
.fd-hover-link-preview-label {
|
|
1079
|
+
font-size: 0.68rem;
|
|
1080
|
+
text-transform: uppercase;
|
|
1081
|
+
letter-spacing: 0.1em;
|
|
1082
|
+
font-family: var(--fd-font-mono, var(--font-geist-mono, ui-monospace, monospace));
|
|
1083
|
+
color: color-mix(in srgb, var(--color-fd-popover-foreground, var(--color-fd-foreground)) 55%, transparent);
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
.fd-hover-link-title,
|
|
1087
|
+
.fd-hover-link-cta {
|
|
1088
|
+
text-decoration: none !important;
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
.fd-hover-link-title {
|
|
1092
|
+
color: var(--color-fd-popover-foreground, var(--color-fd-foreground));
|
|
1093
|
+
font-size: 1rem;
|
|
1094
|
+
font-weight: 600 !important;
|
|
1095
|
+
line-height: 1.3;
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
.fd-hover-link-title:hover,
|
|
1099
|
+
.fd-hover-link-cta:hover {
|
|
1100
|
+
opacity: 1;
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
.fd-hover-link-description {
|
|
1104
|
+
font-size: 0.92rem;
|
|
1105
|
+
line-height: 1.6;
|
|
1106
|
+
color: color-mix(in srgb, var(--color-fd-popover-foreground, var(--color-fd-foreground)) 74%, transparent);
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
.fd-hover-link-footer {
|
|
1110
|
+
display: flex;
|
|
1111
|
+
align-items: center;
|
|
1112
|
+
justify-content: space-between;
|
|
1113
|
+
gap: 0.75rem;
|
|
1114
|
+
padding-top: 0.25rem;
|
|
1115
|
+
border-top: 1px solid color-mix(in srgb, var(--color-fd-border) 72%, transparent);
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
.fd-hover-link-cta {
|
|
1119
|
+
display: inline-flex !important;
|
|
1120
|
+
align-items: center;
|
|
1121
|
+
gap: 0.4rem;
|
|
1122
|
+
color: var(--color-fd-primary);
|
|
1123
|
+
font-size: 0.8rem;
|
|
1124
|
+
font-weight: 600 !important;
|
|
1125
|
+
text-transform: uppercase;
|
|
1126
|
+
letter-spacing: 0.08em;
|
|
1127
|
+
font-family: var(--fd-font-mono, var(--font-geist-mono, ui-monospace, monospace));
|
|
1128
|
+
}
|
|
1129
|
+
|
|
921
1130
|
.fd-page-body h1 {
|
|
922
1131
|
font-size: var(--fd-h1-size, 2.25rem);
|
|
923
1132
|
font-weight: var(--fd-h1-weight, 700);
|
|
@@ -1411,6 +1620,35 @@ html.dark pre.shiki {
|
|
|
1411
1620
|
margin-bottom: 1rem;
|
|
1412
1621
|
}
|
|
1413
1622
|
|
|
1623
|
+
.fd-feedback {
|
|
1624
|
+
margin-top: 2rem;
|
|
1625
|
+
padding-top: 1.25rem;
|
|
1626
|
+
border-top: 1px solid var(--color-fd-border);
|
|
1627
|
+
}
|
|
1628
|
+
|
|
1629
|
+
.fd-feedback-content {
|
|
1630
|
+
display: flex;
|
|
1631
|
+
align-items: center;
|
|
1632
|
+
justify-content: space-between;
|
|
1633
|
+
gap: 1rem;
|
|
1634
|
+
flex-wrap: wrap;
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1637
|
+
.fd-feedback-question {
|
|
1638
|
+
margin: 0;
|
|
1639
|
+
font-size: 0.9375rem;
|
|
1640
|
+
font-weight: 600;
|
|
1641
|
+
line-height: 1.5;
|
|
1642
|
+
color: var(--color-fd-foreground);
|
|
1643
|
+
}
|
|
1644
|
+
|
|
1645
|
+
.fd-feedback-actions {
|
|
1646
|
+
display: inline-flex;
|
|
1647
|
+
align-items: center;
|
|
1648
|
+
gap: 0.5rem;
|
|
1649
|
+
flex-wrap: wrap;
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1414
1652
|
@media (max-width: 640px) {
|
|
1415
1653
|
.fd-last-modified {
|
|
1416
1654
|
width: 100%;
|