@xingwangzhe/stalux 1.38.0 → 1.39.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/README.md +4 -0
- package/package.json +1 -1
- package/src/components/stalux/layout/navigationProgress.astro +55 -0
- package/src/internal/style-names.generated.ts +14 -12
- package/src/layouts/Stalux.astro +4 -4
- package/src/scripts/analytics-runtime.ts +3 -2
- package/src/scripts/navigation-progress.ts +146 -0
- package/src/scripts/view-transitions.ts +37 -49
- package/src/styles/base.css +7 -0
- package/src/styles/generated.css +1 -1
- package/src/styles/motion.css +27 -0
package/README.md
CHANGED
|
@@ -18,6 +18,10 @@ Standalone images written as `` receive a `figure` and
|
|
|
18
18
|
|
|
19
19
|
Code blocks default to the single `dark-plus` theme, with system color-scheme switching and theme selectors disabled. To opt into another theme or switching behavior, explicitly override `themes`, `useDarkModeMediaQuery`, and `themeCssSelector` through `expressiveCode`. This only changes generated code styles and adds no telemetry.
|
|
20
20
|
|
|
21
|
+
Route changes automatically show a 2px accent-colored progress bar at the top of the viewport, with no configuration. Its length follows actual milestones, with slow visual growth toward a bounded ceiling while waiting: loading begins, document/font preparation finishes, the DOM swaps, and page scripts finish; completion waits for the visual transition as well. It only reaches the end when loading and the transition both complete, and does not represent download/time percentages. It handles superseded or canceled navigation, history traversal, and reduced motion without additional requests or telemetry.
|
|
22
|
+
|
|
23
|
+
The sticky header stays at the top while the body grows with long content. Route transitions use one content snapshot with a short crossfade and a stationary header. Nested titles, sidebars and paragraphs no longer create separate snapshots, reducing rasterization and compositing work on mobile devices. Content, lightboxes, search, comments and analytics keep their existing behavior.
|
|
24
|
+
|
|
21
25
|
---
|
|
22
26
|
|
|
23
27
|
## 🚀 Quick Start
|
package/package.json
CHANGED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<div
|
|
2
|
+
data-stalux-navigation-progress
|
|
3
|
+
aria-hidden="true"
|
|
4
|
+
transition:persist="stalux-navigation-progress"
|
|
5
|
+
transition:name="stalux-navigation-progress"
|
|
6
|
+
transition:animate="none"
|
|
7
|
+
></div>
|
|
8
|
+
|
|
9
|
+
<style is:global>
|
|
10
|
+
[data-stalux-navigation-progress] {
|
|
11
|
+
position: fixed;
|
|
12
|
+
inset: 0 0 auto;
|
|
13
|
+
height: 2px;
|
|
14
|
+
z-index: 2147483647;
|
|
15
|
+
pointer-events: none;
|
|
16
|
+
background: var(--stalux-accent-color, #eab308);
|
|
17
|
+
transform: scaleX(0);
|
|
18
|
+
transform-origin: left;
|
|
19
|
+
opacity: 0;
|
|
20
|
+
transition:
|
|
21
|
+
transform 450ms ease-out,
|
|
22
|
+
opacity 120ms ease-out;
|
|
23
|
+
}
|
|
24
|
+
[data-stalux-navigation-progress][data-stage] {
|
|
25
|
+
opacity: 1;
|
|
26
|
+
}
|
|
27
|
+
[data-stalux-navigation-progress][data-stage="complete"] {
|
|
28
|
+
transition:
|
|
29
|
+
transform 160ms ease-out,
|
|
30
|
+
opacity 120ms ease-out;
|
|
31
|
+
}
|
|
32
|
+
[data-stalux-navigation-progress]:not([data-stage]) {
|
|
33
|
+
transition: opacity 120ms ease-out;
|
|
34
|
+
}
|
|
35
|
+
::view-transition-group(stalux-navigation-progress) {
|
|
36
|
+
z-index: 2147483647;
|
|
37
|
+
}
|
|
38
|
+
::view-transition-old(stalux-navigation-progress) {
|
|
39
|
+
display: none;
|
|
40
|
+
}
|
|
41
|
+
::view-transition-new(stalux-navigation-progress) {
|
|
42
|
+
animation: none;
|
|
43
|
+
}
|
|
44
|
+
@media (prefers-reduced-motion: reduce) {
|
|
45
|
+
[data-stalux-navigation-progress],
|
|
46
|
+
[data-stalux-navigation-progress][data-stage] {
|
|
47
|
+
transition: none;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
@media print {
|
|
51
|
+
[data-stalux-navigation-progress] {
|
|
52
|
+
display: none;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
</style>
|
|
@@ -342,17 +342,19 @@ export const styleNames: { classes: Record<string, string>; variables: Record<st
|
|
|
342
342
|
"stalux-page-enter-back": "k7",
|
|
343
343
|
"stalux-page-exit": "k8",
|
|
344
344
|
"stalux-random-spin": "k9",
|
|
345
|
-
"stalux-
|
|
346
|
-
"stalux-
|
|
347
|
-
"stalux-sidebar-left-in": "kc",
|
|
348
|
-
"stalux-sidebar-left-out": "kd",
|
|
349
|
-
"stalux-sidebar-
|
|
350
|
-
"stalux-sidebar-
|
|
351
|
-
"stalux-sidebar-right-in": "kg",
|
|
352
|
-
"stalux-sidebar-right-out": "kh",
|
|
353
|
-
"stalux-
|
|
354
|
-
"stalux-
|
|
355
|
-
"stalux-
|
|
356
|
-
"stalux-
|
|
345
|
+
"stalux-route-fade-in": "ka",
|
|
346
|
+
"stalux-route-fade-out": "kb",
|
|
347
|
+
"stalux-sidebar-left-back-in": "kc",
|
|
348
|
+
"stalux-sidebar-left-back-out": "kd",
|
|
349
|
+
"stalux-sidebar-left-in": "ke",
|
|
350
|
+
"stalux-sidebar-left-out": "kf",
|
|
351
|
+
"stalux-sidebar-right-back-in": "kg",
|
|
352
|
+
"stalux-sidebar-right-back-out": "kh",
|
|
353
|
+
"stalux-sidebar-right-in": "ki",
|
|
354
|
+
"stalux-sidebar-right-out": "kj",
|
|
355
|
+
"stalux-social-stalux-social-arrive": "kk",
|
|
356
|
+
"stalux-taxonomy-enter": "kl",
|
|
357
|
+
"stalux-taxonomy-enter-back": "km",
|
|
358
|
+
"stalux-word-word-glow": "kn"
|
|
357
359
|
}
|
|
358
360
|
};
|
package/src/layouts/Stalux.astro
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { getCollection } from "astro:content";
|
|
3
3
|
import Footer from "@components/stalux/layout/footer.astro";
|
|
4
4
|
import Head from "@components/stalux/layout/head.astro";
|
|
5
|
+
import NavigationProgress from "@components/stalux/layout/navigationProgress.astro";
|
|
5
6
|
import Navs from "@components/stalux/layout/navs.astro";
|
|
6
7
|
import { getAccentColorStyle } from "@utils/accent-color";
|
|
7
8
|
import {
|
|
@@ -85,6 +86,7 @@ const routeAnimation = getRouteAnimation(routeKind);
|
|
|
85
86
|
data-stalux-umami-id={headConfig?.umami?.id}
|
|
86
87
|
data-stalux-umami-url={headConfig?.umami?.url}
|
|
87
88
|
>
|
|
89
|
+
<NavigationProgress />
|
|
88
90
|
<header
|
|
89
91
|
class="stalux-site-header"
|
|
90
92
|
data-stalux-font-group="header"
|
|
@@ -115,10 +117,8 @@ const routeAnimation = getRouteAnimation(routeKind);
|
|
|
115
117
|
<main
|
|
116
118
|
class="stalux-main"
|
|
117
119
|
data-stalux-route={routeKind}
|
|
118
|
-
transition:name=
|
|
119
|
-
transition:animate={
|
|
120
|
-
? "none"
|
|
121
|
-
: routeAnimation}
|
|
120
|
+
transition:name="stalux-page"
|
|
121
|
+
transition:animate={routeAnimation}
|
|
122
122
|
>
|
|
123
123
|
<slot />
|
|
124
124
|
</main>
|
|
@@ -142,13 +142,14 @@ function trackVercountPage(): void {
|
|
|
142
142
|
document.head.appendChild(script);
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
-
if (state.installed && (!state.native || state.revision !==
|
|
145
|
+
if (state.installed && (!state.native || state.revision !== 3)) {
|
|
146
|
+
// Revision 3 also replaces the shared navigation/motion listeners.
|
|
146
147
|
// An open tab can cross a deployment boundary. Its old anonymous worker
|
|
147
148
|
// listeners cannot be detached safely; reload once to install the new runtime.
|
|
148
149
|
window.location.reload();
|
|
149
150
|
} else if (!state.installed) {
|
|
150
151
|
state.native = true;
|
|
151
|
-
state.revision =
|
|
152
|
+
state.revision = 3;
|
|
152
153
|
state.installed = true;
|
|
153
154
|
document.addEventListener("astro:page-load", () => {
|
|
154
155
|
initializeTrackers();
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
TransitionBeforePreparationEvent,
|
|
3
|
+
TransitionBeforeSwapEvent,
|
|
4
|
+
} from "astro:transitions/client";
|
|
5
|
+
|
|
6
|
+
type Stage = "loading" | "prepared" | "swapped" | "loaded" | "complete";
|
|
7
|
+
interface Navigation {
|
|
8
|
+
signal: AbortSignal;
|
|
9
|
+
stage: Stage;
|
|
10
|
+
swapped: boolean;
|
|
11
|
+
loaded: boolean;
|
|
12
|
+
animated: boolean;
|
|
13
|
+
progress: number;
|
|
14
|
+
detach: () => void;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** Real milestones with bounded visual easing while waiting; never a download percentage. */
|
|
18
|
+
export function installNavigationProgress(): void {
|
|
19
|
+
let active: Navigation | undefined;
|
|
20
|
+
let swapping: Navigation | undefined;
|
|
21
|
+
let trickleTimer: ReturnType<typeof setTimeout> | undefined;
|
|
22
|
+
let hideTimer: ReturnType<typeof setTimeout> | undefined;
|
|
23
|
+
const element = () => document.querySelector<HTMLElement>("[data-stalux-navigation-progress]");
|
|
24
|
+
const paint = (stage?: Stage, progress = 0) => {
|
|
25
|
+
const bar = element();
|
|
26
|
+
if (!bar) return;
|
|
27
|
+
bar.style.transform = `scaleX(${progress})`;
|
|
28
|
+
if (stage) bar.dataset.stage = stage;
|
|
29
|
+
else delete bar.dataset.stage;
|
|
30
|
+
};
|
|
31
|
+
const clear = () => {
|
|
32
|
+
clearTimeout(trickleTimer);
|
|
33
|
+
trickleTimer = undefined;
|
|
34
|
+
swapping = undefined;
|
|
35
|
+
clearTimeout(hideTimer);
|
|
36
|
+
hideTimer = undefined;
|
|
37
|
+
active?.detach();
|
|
38
|
+
active = undefined;
|
|
39
|
+
paint();
|
|
40
|
+
};
|
|
41
|
+
const advance = (navigation: Navigation, stage: Stage) => {
|
|
42
|
+
if (active !== navigation || navigation.signal.aborted) return;
|
|
43
|
+
navigation.stage = stage;
|
|
44
|
+
const milestones = {
|
|
45
|
+
loading: 0.08,
|
|
46
|
+
prepared: 0.65,
|
|
47
|
+
swapped: 0.85,
|
|
48
|
+
loaded: 0.95,
|
|
49
|
+
complete: 1,
|
|
50
|
+
};
|
|
51
|
+
navigation.progress = Math.max(navigation.progress, milestones[stage]);
|
|
52
|
+
paint(stage, navigation.progress);
|
|
53
|
+
};
|
|
54
|
+
const complete = (navigation: Navigation) => {
|
|
55
|
+
if (
|
|
56
|
+
active !== navigation ||
|
|
57
|
+
navigation.stage === "complete" ||
|
|
58
|
+
!navigation.loaded ||
|
|
59
|
+
!navigation.animated
|
|
60
|
+
)
|
|
61
|
+
return;
|
|
62
|
+
clearTimeout(trickleTimer);
|
|
63
|
+
trickleTimer = undefined;
|
|
64
|
+
advance(navigation, "complete");
|
|
65
|
+
navigation.detach();
|
|
66
|
+
hideTimer = setTimeout(() => {
|
|
67
|
+
if (active === navigation) clear();
|
|
68
|
+
}, 250);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const trickle = (navigation: Navigation) => {
|
|
72
|
+
if (active !== navigation || navigation.signal.aborted || navigation.stage === "complete")
|
|
73
|
+
return;
|
|
74
|
+
const limits = { loading: 0.6, prepared: 0.8, swapped: 0.92, loaded: 0.98 };
|
|
75
|
+
const limit = limits[navigation.stage];
|
|
76
|
+
navigation.progress += (limit - navigation.progress) * 0.12;
|
|
77
|
+
paint(navigation.stage, navigation.progress);
|
|
78
|
+
trickleTimer = setTimeout(() => trickle(navigation), 500);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
document.addEventListener("astro:before-preparation", (event) => {
|
|
82
|
+
clear();
|
|
83
|
+
const preparation = event as TransitionBeforePreparationEvent;
|
|
84
|
+
if (preparation.signal.aborted || event.defaultPrevented) return;
|
|
85
|
+
const abort = () => {
|
|
86
|
+
if (active === navigation) clear();
|
|
87
|
+
};
|
|
88
|
+
const navigation: Navigation = {
|
|
89
|
+
signal: preparation.signal,
|
|
90
|
+
stage: "loading",
|
|
91
|
+
progress: 0.08,
|
|
92
|
+
swapped: false,
|
|
93
|
+
loaded: false,
|
|
94
|
+
animated: false,
|
|
95
|
+
detach: () => preparation.signal.removeEventListener("abort", abort),
|
|
96
|
+
};
|
|
97
|
+
active = navigation;
|
|
98
|
+
preparation.signal.addEventListener("abort", abort, { once: true });
|
|
99
|
+
paint("loading", navigation.progress);
|
|
100
|
+
trickleTimer = setTimeout(() => trickle(navigation), 500);
|
|
101
|
+
const loader = preparation.loader;
|
|
102
|
+
preparation.loader = async () => {
|
|
103
|
+
try {
|
|
104
|
+
await loader();
|
|
105
|
+
if (preparation.defaultPrevented) abort();
|
|
106
|
+
else advance(navigation, "prepared");
|
|
107
|
+
} catch (error) {
|
|
108
|
+
abort();
|
|
109
|
+
throw error;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
// A later listener may cancel preparation before Astro calls the loader.
|
|
113
|
+
queueMicrotask(() => {
|
|
114
|
+
if (preparation.defaultPrevented) abort();
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
document.addEventListener("astro:before-swap", (event) => {
|
|
118
|
+
const swap = event as TransitionBeforeSwapEvent;
|
|
119
|
+
const navigation = active;
|
|
120
|
+
if (!navigation || navigation.signal !== swap.signal || swap.signal.aborted) return;
|
|
121
|
+
swapping = navigation;
|
|
122
|
+
const finished = () => {
|
|
123
|
+
if (active !== navigation || navigation.signal.aborted) return;
|
|
124
|
+
navigation.animated = true;
|
|
125
|
+
complete(navigation);
|
|
126
|
+
};
|
|
127
|
+
// Skipped/rejected animations must not leave a completed navigation stuck.
|
|
128
|
+
void swap.viewTransition.finished.then(finished, finished);
|
|
129
|
+
});
|
|
130
|
+
document.addEventListener("astro:after-swap", () => {
|
|
131
|
+
if (!active || swapping !== active || active.signal.aborted) return;
|
|
132
|
+
swapping = undefined;
|
|
133
|
+
active.swapped = true;
|
|
134
|
+
advance(active, "swapped");
|
|
135
|
+
});
|
|
136
|
+
document.addEventListener("astro:page-load", () => {
|
|
137
|
+
if (!active?.swapped || active.signal.aborted || active.stage === "complete") return;
|
|
138
|
+
active.loaded = true;
|
|
139
|
+
advance(active, "loaded");
|
|
140
|
+
complete(active);
|
|
141
|
+
});
|
|
142
|
+
window.addEventListener("pagehide", clear);
|
|
143
|
+
window.addEventListener("pageshow", (event) => {
|
|
144
|
+
if (event.persisted) clear();
|
|
145
|
+
});
|
|
146
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getRouteKind } from "@utils/public-routes";
|
|
2
2
|
import { createClientLogger } from "./logger";
|
|
3
3
|
import { prepareNavigationFont } from "./navigation-font";
|
|
4
|
+
import { installNavigationProgress } from "./navigation-progress";
|
|
4
5
|
|
|
5
6
|
const logger = createClientLogger("view-transitions");
|
|
6
7
|
|
|
@@ -23,87 +24,74 @@ interface NavigationEvent {
|
|
|
23
24
|
loader: () => Promise<void>;
|
|
24
25
|
newDocument: Document;
|
|
25
26
|
signal: AbortSignal;
|
|
27
|
+
viewTransition?: ViewTransition;
|
|
26
28
|
}
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
const ARTICLE_TEXT_BLOCK_TAGS = new Set(["H2", "H3", "P", "BLOCKQUOTE"]);
|
|
30
|
-
|
|
31
|
-
function setArticleTextTransitions(root: ParentNode, enabled: boolean): void {
|
|
32
|
-
const bodies = root.querySelectorAll<HTMLElement>(".stalux-post-body");
|
|
33
|
-
|
|
34
|
-
for (const body of bodies) {
|
|
35
|
-
for (const oldBlock of body.querySelectorAll<HTMLElement>(
|
|
36
|
-
":scope > [data-stalux-article-text-transition]",
|
|
37
|
-
)) {
|
|
38
|
-
oldBlock.style.removeProperty("view-transition-name");
|
|
39
|
-
delete oldBlock.dataset.staluxArticleTextTransition;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
if (!enabled) continue;
|
|
43
|
-
|
|
44
|
-
const tagIndexes = new Map<string, number>();
|
|
45
|
-
let namedBlocks = 0;
|
|
46
|
-
for (const block of body.children) {
|
|
47
|
-
if (!ARTICLE_TEXT_BLOCK_TAGS.has(block.tagName)) continue;
|
|
48
|
-
const tag = block.tagName.toLowerCase();
|
|
49
|
-
const index = tagIndexes.get(tag) ?? 0;
|
|
50
|
-
tagIndexes.set(tag, index + 1);
|
|
51
|
-
block.setAttribute("data-stalux-article-text-transition", "");
|
|
52
|
-
(block as HTMLElement).style.setProperty(
|
|
53
|
-
"view-transition-name",
|
|
54
|
-
`stalux-article-text-${tag}-${index}`,
|
|
55
|
-
);
|
|
56
|
-
namedBlocks += 1;
|
|
57
|
-
if (namedBlocks >= ARTICLE_TEXT_BLOCK_LIMIT) break;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function setNavigationState(event: NavigationEvent): void {
|
|
30
|
+
function setNavigationState(event: NavigationEvent, html = document.documentElement): void {
|
|
63
31
|
const from = getRouteKind(new URL(event.from, window.location.href).pathname);
|
|
64
32
|
const to = getRouteKind(new URL(event.to, window.location.href).pathname);
|
|
65
|
-
const html = document.documentElement;
|
|
66
33
|
html.dataset.staluxVtFrom = from;
|
|
67
34
|
html.dataset.staluxVtTo = to;
|
|
68
35
|
html.dataset.staluxVtDirection = event.direction;
|
|
69
36
|
}
|
|
70
37
|
|
|
38
|
+
function clearNavigationState(): void {
|
|
39
|
+
delete document.documentElement.dataset.staluxVtFrom;
|
|
40
|
+
delete document.documentElement.dataset.staluxVtTo;
|
|
41
|
+
delete document.documentElement.dataset.staluxVtDirection;
|
|
42
|
+
}
|
|
43
|
+
|
|
71
44
|
const transitionWindow = window as TransitionWindow;
|
|
72
45
|
if (!transitionWindow.__STALUX_VT_LISTENER__) {
|
|
73
46
|
transitionWindow.__STALUX_VT_LISTENER__ = true;
|
|
74
47
|
|
|
48
|
+
let generation = 0;
|
|
75
49
|
document.addEventListener("astro:before-preparation", (event) => {
|
|
76
50
|
const navigation = event as unknown as NavigationEvent;
|
|
51
|
+
const current = ++generation;
|
|
77
52
|
setNavigationState(navigation);
|
|
53
|
+
navigation.signal.addEventListener(
|
|
54
|
+
"abort",
|
|
55
|
+
() => {
|
|
56
|
+
if (current === generation) clearNavigationState();
|
|
57
|
+
},
|
|
58
|
+
{ once: true },
|
|
59
|
+
);
|
|
60
|
+
queueMicrotask(() => {
|
|
61
|
+
if (event.defaultPrevented && current === generation) clearNavigationState();
|
|
62
|
+
});
|
|
78
63
|
const loader = navigation.loader;
|
|
79
64
|
navigation.loader = async () => {
|
|
80
65
|
await loader();
|
|
81
66
|
if (!event.defaultPrevented) {
|
|
82
|
-
const fromRoute = getRouteKind(
|
|
83
|
-
new URL(navigation.from, window.location.href).pathname,
|
|
84
|
-
);
|
|
85
|
-
const toRoute = getRouteKind(new URL(navigation.to, window.location.href).pathname);
|
|
86
|
-
if (fromRoute === "article") {
|
|
87
|
-
setArticleTextTransitions(document, toRoute === "article");
|
|
88
|
-
}
|
|
89
|
-
setArticleTextTransitions(navigation.newDocument, toRoute === "article");
|
|
90
67
|
await prepareNavigationFont(navigation.newDocument, navigation.signal);
|
|
91
68
|
}
|
|
92
69
|
};
|
|
93
70
|
});
|
|
94
71
|
|
|
72
|
+
document.addEventListener("astro:before-swap", (event) => {
|
|
73
|
+
const navigation = event as unknown as NavigationEvent;
|
|
74
|
+
if (navigation.signal.aborted) return;
|
|
75
|
+
const current = generation;
|
|
76
|
+
// Astro replaces the root attributes during swap. Carry motion state into
|
|
77
|
+
// the new document and keep it until the last animation actually settles.
|
|
78
|
+
setNavigationState(navigation, navigation.newDocument.documentElement);
|
|
79
|
+
const finish = () => {
|
|
80
|
+
if (current === generation) clearNavigationState();
|
|
81
|
+
};
|
|
82
|
+
void navigation.viewTransition?.finished.then(finish, finish);
|
|
83
|
+
});
|
|
84
|
+
|
|
95
85
|
document.addEventListener("astro:after-swap", () => {
|
|
96
86
|
setRouteState(window.location.pathname);
|
|
97
87
|
});
|
|
98
88
|
|
|
99
89
|
document.addEventListener("astro:page-load", () => {
|
|
100
90
|
setRouteState(window.location.pathname);
|
|
101
|
-
setArticleTextTransitions(document, getRouteKind(window.location.pathname) === "article");
|
|
102
|
-
delete document.documentElement.dataset.staluxVtFrom;
|
|
103
|
-
delete document.documentElement.dataset.staluxVtTo;
|
|
104
|
-
delete document.documentElement.dataset.staluxVtDirection;
|
|
105
91
|
});
|
|
92
|
+
|
|
93
|
+
// Register after the font wrapper so prepared includes its bounded wait.
|
|
94
|
+
installNavigationProgress();
|
|
106
95
|
}
|
|
107
96
|
|
|
108
97
|
setRouteState(window.location.pathname);
|
|
109
|
-
setArticleTextTransitions(document, getRouteKind(window.location.pathname) === "article");
|
package/src/styles/base.css
CHANGED
|
@@ -19,6 +19,13 @@
|
|
|
19
19
|
line-height: 1.25;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
/* Sticky elements are bounded by the body. A one-viewport body height
|
|
23
|
+
lets overflowing content scroll its header out of the viewport. */
|
|
24
|
+
body {
|
|
25
|
+
height: auto;
|
|
26
|
+
min-height: 100%;
|
|
27
|
+
}
|
|
28
|
+
|
|
22
29
|
/* Reserve the classic scrollbar before content height changes across routes. */
|
|
23
30
|
html {
|
|
24
31
|
scrollbar-gutter: stable;
|
package/src/styles/generated.css
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
@layer theme, base, components, utilities;
|
|
2
|
-
@layer components{.stalux-404-home-btn{background:var(--black-20p);border:var(--border-thin) solid var(--white-20p);transition:background-color var(--transition-normal), transform var(--transition-normal), box-shadow var(--transition-normal);border-radius:var(--radius-md);padding:var(--space-md) var(--space-lg);color:var(--white-90p);font-size:var(--font-size-base);text-decoration:none;display:inline-block}.stalux-ai-prompt{clip-path:inset(50%);white-space:pre-wrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.stalux-badge-group{border:none}.stalux-badge-group-arrow{font-size:.65rem;transition:transform .2s;display:inline-block}.stalux-badge-group-summary{user-select:none;cursor:pointer;color:var(--white-70p);gap:.4rem;padding:.2rem 0;font-size:.85rem;list-style-type:none;transition:color .2s}.stalux-beian-public-security-beian{color:#ffffffb3;gap:5px;font-size:.9rem;text-decoration:none;transition:color .3s;display:inline-flex}.stalux-card-post-categories,.stalux-card-post-tags{gap:.4rem}.stalux-card-post-category{background:var(--category-bg);color:#fff;border-radius:6px;padding:.18rem .5rem;font-size:.84rem;line-height:1;display:inline-block}.stalux-card-post-description{overflow-wrap:anywhere;color:var(--white-70p);line-height:1.6}.stalux-card-post-meta{gap:.6rem}.stalux-card-post-tag{background:var(--tag-bg);color:#fff;border-radius:9999px;padding:.22rem .7rem;font-size:.85rem;line-height:1;display:inline-block}.stalux-card-post-title{overflow-wrap:anywhere;margin:0;line-height:1.35}.stalux-card-read-more{align-self:flex-start;margin-top:.6rem}.stalux-card-time{gap:.45rem;display:inline-flex}.stalux-copyright{color:var(--white-70p);gap:.3em;font-weight:500}.stalux-footer{backdrop-filter:blur(10px);color:var(--white-full);background-color:#0000001a;margin-top:auto;padding:1.5rem 0;font-size:.9rem}.stalux-footer-content{gap:.8rem;max-width:1200px;margin:0 auto;padding:0 1rem}.stalux-nav-list{transform:scale(var(--nav-scale,1));transform-origin:50%;box-sizing:border-box;gap:2rem;max-width:100%;transition:transform .22s cubic-bezier(.22,.72,.22,1);overflow:visible}.stalux-nav-overlay{pointer-events:none;z-index:999;opacity:0;background:#0009;height:100%;transition:opacity .3s;display:none;position:fixed;top:0;left:0}.stalux-nav-scroll-btn{background:var(--black-30p);backdrop-filter:blur(8px);box-shadow:var(--shadow-md);pointer-events:none;z-index:10;cursor:pointer;width:36px;height:36px;color:var(--white-full);opacity:0;border:none;border-radius:9999px;padding:0;transition:opacity .25s;display:none;position:absolute;top:50%;transform:translateY(-50%)}.stalux-nav-toggle{z-index:998;cursor:pointer;min-width:48px;min-height:48px;color:inherit;background:0 0;border:none;padding:.75rem;display:none}.stalux-post-card{box-sizing:border-box;cursor:pointer;gap:var(--space-lg);border-radius:var(--radius-lg);background-color:var(--card-bg);height:100%;padding:var(--space-lg);box-shadow:var(--card-box-shadow);transition:transform .22s cubic-bezier(.22,.72,.22,1)}.stalux-stats-site-build-time{color:#fffc;margin-top:.5rem;font-size:.9rem}.stalux-stats-stats-separator{color:#ffffff80}.stalux-theme-info{color:var(--white-70p);gap:.3em;font-size:.85rem}.stalux-home-body{min-height:calc(100vh - var(--stalux-site-header-height));padding-bottom:var(--space-3xl);position:relative}.stalux-nav-container{box-sizing:border-box;max-width:100%;position:relative;overflow:hidden}.stalux-author{margin-top:4em}.stalux-card-post-cover{border-radius:var(--radius-md);flex-shrink:0;height:180px;margin-bottom:.5rem;overflow:hidden}.stalux-home-title{color:var(--white-full);text-shadow:var(--stalux-text-shadow);margin-top:1.5em;font-size:4em}.stalux-nav-item{text-shadow:var(--stalux-text-shadow);flex-shrink:0;margin-left:1em;margin-right:1em;font-size:1.3em}.stalux-page-description{color:var(--white-60p);margin-bottom:1.5em;font-size:1.2em}.stalux-page-title{text-shadow:var(--stalux-text-shadow);margin-top:1.5em;font-size:2.5em}.stalux-typewriter{min-height:2em;text-shadow:var(--stalux-text-shadow);margin-top:1.5em;font-size:2.5em}.stalux-404-error-container{min-height:60vh;padding:2rem}.stalux-badge,.stalux-badges-wrapper .stalux-badge{width:auto}.stalux-u-min-w-0{min-width:0}.stalux-u-w-full{width:100%}.stalux-u-flex{display:flex}.stalux-u-flex-col{flex-direction:column}.stalux-u-flex-wrap{flex-wrap:wrap}.stalux-u-items-center{align-items:center}.stalux-u-justify-center{justify-content:center}.stalux-badges,.stalux-badges-wrapper{gap:.5rem}.stalux-beian-beian-info{gap:1rem}.stalux-stats-site-stats{gap:.5rem;font-size:.9rem}.stalux-nav-text{white-space:nowrap;color:var(--white-full)}.stalux-badge-group-items{padding-top:.35rem}.stalux-u-text-center{text-align:center}.stalux-badge-group-hint{color:var(--white-70p);font-size:.7rem}.stalux-badge-group-title{color:var(--white-80p)}#stalux-home-show-post-list{cursor:pointer;text-shadow:var(--stalux-text-shadow);margin-top:3em;font-size:1.5em}.stalux-post-list-container{width:100%;height:auto;margin:5px 0}.stalux-post-list-container ul{flex-wrap:wrap;gap:2rem;margin:3em;padding:0;list-style-type:none;display:flex}.stalux-post-list-container ul>li{flex:min(22rem,100%);min-width:0;margin:0}.stalux-card-post-title a{color:inherit;text-decoration:none}.stalux-post-card>a:first-child{width:100%;min-width:0;display:block}.stalux-card-post-cover img{object-fit:cover;width:100%;max-width:100%;height:100%;transition:transform var(--transition-fast)}.stalux-card-post-date,.stalux-card-post-updated{color:#e8f2ff;border-radius:10px;align-items:center;gap:.35rem;width:fit-content;padding:.28rem .6rem;font-size:.9rem;line-height:1.1;display:inline-flex}.stalux-card-post-date{background:var(--date-bg);border:1px solid var(--date-border);color:#e8f2ff}.stalux-card-post-updated{background:var(--updated-bg);border:1px solid var(--updated-border);color:#fff7de}.stalux-card-post-tags a,.stalux-card-post-categories a{text-decoration:none}.stalux-card-post-tags a:focus-visible .stalux-card-post-tag{background:var(--tag-bg-hover)}.stalux-card-post-categories a:focus-visible .stalux-card-post-category{background:var(--category-bg-hover)}.stalux-social{margin-top:3em}.stalux-social ul{flex-wrap:wrap;justify-content:center;gap:1em;margin:0;padding:0;display:flex}.stalux-social ul li{box-sizing:border-box;text-align:center;background-color:var(--white-15p);border-radius:9999px;justify-content:center;align-items:center;width:2.5em;height:2.5em;font-size:large;display:inline-flex;overflow:hidden}.stalux-social ul a,.stalux-social ul .stalux-social-icon-container,.stalux-social ul .stalux-social-custom-icon{justify-content:center;align-items:center;width:100%;height:100%;line-height:1;display:inline-flex}.stalux-social[data-stalux-social-animate=true] li{animation:.28s cubic-bezier(.2,.8,.2,1) both stalux-social-stalux-social-arrive}.stalux-social[data-stalux-social-animate=true] li:nth-child(2){animation-delay:30ms}.stalux-social[data-stalux-social-animate=true] li:nth-child(3){animation-delay:60ms}.stalux-social[data-stalux-social-animate=true] li:nth-child(4){animation-delay:90ms}.stalux-social[data-stalux-social-animate=true] li:nth-child(5){animation-delay:.12s}.stalux-social[data-stalux-social-animate=true] li:nth-child(6){animation-delay:.15s}.stalux-social[data-stalux-social-animate=true] li:nth-child(n+7){animation-delay:.18s}nav{width:100%;min-width:0;max-width:100%}html{scroll-padding-top:var(--stalux-nav-offset,var(--stalux-site-header-height))}.stalux-site-header{z-index:990;width:100%;min-height:var(--stalux-site-header-height);isolation:isolate;justify-content:center;align-items:center;display:flex;position:sticky;top:0}.stalux-nav-scroll-btn[data-visible]{pointer-events:auto;opacity:1}.stalux-nav-scroll-btn[data-side=left]{left:4px}.stalux-nav-scroll-btn[data-side=right]{right:4px}.stalux-nav-scroll-btn svg{stroke:currentColor;stroke-width:2px;fill:none;width:20px;height:20px}.stalux-nav-link,.stalux-nav-link:visited{cursor:pointer;width:100%;color:inherit;min-height:44px;font:inherit;background:0 0;border:none;align-items:center;gap:.5rem;padding:.5rem .75rem;text-decoration:none;display:flex}.stalux-nav-link .nav-icon{stroke:var(--white-full)}.stalux-nav-toggle svg{width:32px;height:32px}.stalux-nav-overlay[data-state=show]{pointer-events:auto;opacity:1;display:block}#stalux-to-archive-archs{margin-top:2em}#stalux-date-date-time{text-shadow:var(--stalux-text-shadow);color:var(--white-full);flex-direction:column;align-items:center;margin-top:2em;display:flex}#stalux-date-date-time #stalux-date-date{min-height:1.25em;margin-bottom:.5em;font-size:2em;line-height:1.25}#stalux-date-date-time #stalux-date-time{font-variant-numeric:tabular-nums;min-height:1.25em;font-size:3em;line-height:1.25}.stalux-author-figure{justify-content:center;align-items:center;display:flex}.stalux-author-figure img{box-shadow:0 0 10px var(--stalux-accent-color);border-radius:9999px;transition:transform .65s ease-in-out}.stalux-author-figure figcaption{text-shadow:var(--stalux-text-shadow);color:var(--white-full);margin-left:1em;font-size:2.5em;font-weight:700}.stalux-author-figure-column figcaption{text-align:center;margin-top:.5em;margin-left:0}.agent-home-summary{clip-path:inset(50%);white-space:normal;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.stalux-404-error-content h1{color:var(--white-90p);margin:0;font-size:6rem;font-weight:700}.stalux-404-error-content p{color:var(--white-70p);margin:1rem 0 2rem;font-size:1.5rem}.stalux-404-countdown-text{color:var(--white-50p)!important;margin:-.5rem 0 1.5rem!important;font-size:.95rem!important}.agent-recovery{max-width:42rem;line-height:1.7;margin:0 auto 1.5rem!important;font-size:1rem!important}.agent-recovery a{color:inherit;text-decoration-line:underline}.stalux-theme-info span,.stalux-copyright span{margin:0}.stalux-theme-info a{color:#fffc;margin:0 .2em;text-decoration:none;transition:color .3s}.stalux-beian-beian-info a{color:#ffffffb3;font-size:.9rem;text-decoration:none;transition:color .3s}.stalux-beian-public-security-beian img{width:15px;height:15px;display:inline-block}.stalux-badge-group-summary::-webkit-details-marker,.stalux-badge-group[open] .stalux-badge-group-hint[data-hint=collapsed],.stalux-badge-group:not([open]) .stalux-badge-group-hint[data-hint=expanded]{display:none}.stalux-badge-group[open] .stalux-badge-group-arrow{transform:rotate(90deg)}@media (hover:hover) and (pointer:fine){.stalux-card-post-tags a:hover .stalux-card-post-tag{background:var(--tag-bg-hover)}.stalux-card-post-categories a:hover .stalux-card-post-category{background:var(--category-bg-hover)}.stalux-post-card-shell:hover .stalux-post-card .stalux-card-post-cover img{transform:scale(1.025)}.stalux-post-card-shell:hover .stalux-post-card{box-shadow:var(--card-box-shadow-hover)}.stalux-nav-scroll-btn:hover{background:0 0}.stalux-nav-container:hover .stalux-nav-scroll-btn[data-visible]{opacity:1}.stalux-nav-link:hover .nav-icon,.stalux-nav-link:hover .stalux-nav-text{stroke:var(--stalux-accent-color);color:var(--stalux-accent-color)}.stalux-author-figure>a:hover img{animation:.65s ease-in-out stalux-link-avatar-spin}.stalux-404-home-btn:hover{background:var(--accent-20p);box-shadow:0 4px 12px var(--shadow-dark)}.stalux-theme-info a:hover{color:#fff;text-decoration:none}.stalux-beian-beian-info a:hover,.stalux-beian-public-security-beian:hover{color:#ffffffe6;text-decoration:none}.stalux-badge-group-summary:hover{color:var(--white-70p)}}@media (width>=601px){.stalux-site-nav{isolation:isolate;border-radius:0 0 16px 16px;transition:background-color .18s,box-shadow .18s}.stalux-site-nav[data-scrolled]{backdrop-filter:blur(20px)saturate(140%);box-shadow:0 1px 0 var(--white-10p), 0 8px 24px #0000001f;background:#181818c7}}@media (width<=1100px){.stalux-nav-list{gap:1rem}.stalux-nav-item{margin-left:.6em;margin-right:.6em;font-size:1em}}@media (width<=900px){.stalux-nav-item{margin-left:.25em;margin-right:.25em;font-size:.95em}.stalux-nav-list{gap:.5rem}}@media (width<=768px){.stalux-home-body{box-sizing:border-box;width:100%;max-width:95vw;height:auto;padding:2rem .5rem 1.5rem}.stalux-home-title{word-break:break-all;margin-top:1em;font-size:2em}#stalux-home-show-post-list{margin-top:2em;font-size:1.1em}.stalux-post-list-container ul{margin:1rem}.stalux-footer{padding:1.2rem 0;font-size:.8rem}.stalux-footer-content{gap:.6rem;padding:0 .8rem}.stalux-author{box-sizing:border-box;width:100%;max-width:95vw;margin-top:2em;padding:1em .5em}.stalux-author-figure{gap:.5em;flex-direction:column!important}.stalux-author-figure img{max-width:20vw;max-height:20vw;width:64px!important;height:64px!important}.stalux-author-figure figcaption{text-align:center;word-break:break-all;overflow-wrap:break-word;white-space:normal;max-width:90vw;margin-top:.5em;margin-left:0;font-size:1.5em}.stalux-404-error-content h1{font-size:4rem}.stalux-404-error-content p{font-size:1.2rem}.stalux-badges{gap:.3rem}.stalux-badge{width:auto}}@media (width<=600px){html{--stalux-site-header-height:4rem}.stalux-nav-toggle[data-state=open]{visibility:hidden;pointer-events:none}.stalux-nav-toggle[data-scrolled]{backdrop-filter:blur(20px)saturate(140%);box-shadow:0 1px 0 var(--white-10p), 0 8px 24px #0000001f;background:#181818c7;border-radius:12px}.stalux-nav-toggle{display:block;position:fixed;top:.75rem;left:.75rem}.stalux-nav-container{overflow:visible}nav{width:auto}.stalux-nav-list{pointer-events:none;z-index:1000;background:var(--black-20p);backdrop-filter:blur(20px);flex-direction:column;justify-content:flex-start;align-items:flex-start;gap:0;width:min(220px,100vw - 1rem);height:100vh;padding:.5rem 1rem 2rem;position:fixed;top:0;left:0;right:auto;overflow-y:auto;transform:translate(-100%)}.stalux-nav-list[data-state=open]{pointer-events:auto;transform:translate(0)}.stalux-nav-item{border-bottom:1px solid var(--white-10p);flex-shrink:0;width:100%;margin:0;font-size:.9em}.stalux-nav-text{display:inline}.stalux-nav-link{width:100%;min-height:44px;font-size:inherit;padding:.45rem .75rem}.stalux-nav-link .nav-icon{width:18px;height:18px}}@media (width<=480px){.stalux-footer{padding:1rem 0;font-size:.8rem}.stalux-footer-content{gap:.6rem;padding:0 .8rem}}@media (prefers-reduced-motion:reduce){.stalux-social[data-stalux-social-animate=true] li{animation:none}}.stalux-main,.stalux-post-page,.stalux-post-layout>*,.stalux-link-card-content,.stalux-word-list-item,.stalux-word-card{box-sizing:border-box;min-width:0;max-width:100%}.stalux-main{overflow-wrap:anywhere}.stalux-link-shell{min-width:0;max-width:100%;display:block}.stalux-link-card{box-sizing:border-box;width:100%;max-width:100%}.stalux-category-shell{width:100%;min-width:0}.stalux-author-figure>a{flex-shrink:0;display:inline-block}.stalux-author-figure img{display:block}.stalux-post-card-shell,.stalux-category-shell,.stalux-link-shell{position:relative}.stalux-post-card,.stalux-category-card,.stalux-link-card,.stalux-word-card{transition:transform .2s,background-color .2s,border-color .2s,box-shadow .2s}:is(.stalux-post-card-shell,.stalux-category-shell):focus-within>*,.stalux-link-shell:focus-visible>*{box-shadow:var(--card-box-shadow-hover)}:is(button,summary,[role=button]):focus-visible{outline:2px solid var(--stalux-accent-color);outline-offset:3px}@media (prefers-reduced-motion:reduce){.stalux-main *,.stalux-main :before,.stalux-main :after{transition-duration:0s!important;animation:none!important}.stalux-post-card,.stalux-category-card,.stalux-link-card,.stalux-link-card-content,.stalux-card-post-cover img,.stalux-category-icon,.stalux-author-figure img,.stalux-link-card-avatar img{transform:none!important}}@keyframes stalux-social-stalux-social-arrive{0%{opacity:0;transform:translateY(.75rem)rotate(-12deg)}to{opacity:1;transform:translateY(0)rotate(0)}}@keyframes stalux-random-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes stalux-link-avatar-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes stalux-word-word-glow{0%{box-shadow:0 0 30px var(--accent-50p), 0 0 80px var(--accent-30p), var(--shadow-lg);transform:scale(1.02)}to{box-shadow:0 0 20px var(--accent-40p), 0 0 60px var(--accent-20p), var(--shadow-lg);transform:scale(1)}}}@layer utilities{.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.visible{visibility:visible}.absolute{position:absolute}.static{position:static}.grid{display:grid}.block{display:block}.inline-block{display:inline-block}.hidden{display:none}.h-full{height:100%}.flex{display:flex}.flex-shrink{flex-shrink:1}.flex-wrap{flex-wrap:wrap}.transform{transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.b,.border{border-width:1px}.text-inherit{color:inherit}.no-underline{text-decoration:none}.outline{outline-style:solid}}@layer theme;@layer base{html,body{color:#fff;width:100%;height:100%;margin:0;& main{flex:1}scrollbar-color:#4a4a4a #2a2a2a;font-family:var(--font-body), "Noto Sans SC", "Noto Sans CJK SC", system-ui, -apple-system, sans-serif;text-rendering:optimizelegibility;line-height:1.25;display:block}html{scrollbar-gutter:stable;background-color:var(--stalux-bg-color,#202020)}html[data-clarity-id]{opacity:1!important}a{color:inherit;cursor:pointer;text-decoration-skip-ink:auto;background-color:#0000;text-decoration:none;transition:color .2s,text-shadow .2s;position:relative}.a-none{cursor:pointer;text-decoration-skip-ink:auto;background-color:#0000;color:inherit!important;text-decoration:none!important}.a-none:after{display:none!important}a:not(.a-none):not([data-stalux-card]):not(.stalux-nav-link):after{content:"";background:linear-gradient(90deg, var(--stalux-accent-color), var(--accent-50p));transform-origin:0;pointer-events:none;width:100%;height:1px;transition:transform .25s cubic-bezier(.25,.9,.2,1);position:absolute;bottom:-2px;left:0;transform:scaleX(0)}a:not(.a-none):not([data-stalux-card]):not(.stalux-nav-link):focus-visible:after,a:not(.a-none):not([data-stalux-card]):not(.stalux-nav-link):active:after{transform:scaleX(1)}@media (hover:hover) and (pointer:fine){a:not(.a-none):not([data-stalux-card]):not(.stalux-nav-link):hover:after{transform:scaleX(1)}}a:active,a:focus-visible{text-decoration:none}@media (hover:hover) and (pointer:fine){a:hover{text-decoration:none}}a:focus{outline:none}a:focus-visible{outline:2px solid var(--stalux-accent-color);outline-offset:2px}ul{margin:0;padding:0;list-style:none}.none{display:none}.stalux-root{color:#fff;min-height:100vh}.stalux-main{min-height:calc(100vh - var(--stalux-site-header-height,3rem))}:root{--stalux-bg-color:#202020;--stalux-bg-filter:none;--stalux-site-header-height:3.75rem;--stalux-text-shadow:var(--stalux-accent-color) .08rem .08rem .18rem;--stalux-accent-color:#eab308;--stalux-accent-rgb:234 179 8;--surface-glass:var(--black-05p);--surface-glass-shadow:var(--shadow-sidebar);--card-bg:var(--surface-glass);--card-border:#ffffff1a;--card-box-shadow:0 10px 24px #00000014;--card-box-shadow-hover:0 14px 28px #0000001f;--tag-bg:#ffffff1f;--tag-bg-hover:#ffffff2e;--category-bg:#ffffff14;--category-bg-hover:#ffffff24;--date-bg:#42a0ff2e;--date-border:#42a0ff40;--updated-bg:#ffc94733;--updated-border:#ffc9474d;--white-full:#fff;--white-95p:#fffffff2;--white-90p:#ffffffe6;--white-85p:#ffffffd9;--white-80p:#ffffffe6;--white-78p:#ffffffc7;--white-75p:#ffffffbf;--white-70p:#ffffffdb;--white-60p:#fff9;--white-50p:#ffffff80;--white-30p:#ffffff4d;--white-20p:#fff3;--white-15p:#ffffff26;--white-10p:#ffffff1a;--white-05p:#ffffff0d;--black-30p:#0000004d;--black-20p:#0003;--black-15p:#00000026;--black-10p:#0000001a;--black-05p:#0000000d;--accent-90p:rgb(var(--stalux-accent-rgb) / .9);--accent-85p:rgb(var(--stalux-accent-rgb) / .85);--accent-80p:rgb(var(--stalux-accent-rgb) / .8);--accent-70p:rgb(var(--stalux-accent-rgb) / .7);--accent-60p:rgb(var(--stalux-accent-rgb) / .6);--accent-50p:rgb(var(--stalux-accent-rgb) / .5);--accent-40p:rgb(var(--stalux-accent-rgb) / .4);--accent-30p:rgb(var(--stalux-accent-rgb) / .3);--accent-20p:rgb(var(--stalux-accent-rgb) / .2);--transition-fast:.18s ease;--transition-medium:.2s ease;--transition-normal:.25s ease;--transition-slow:.3s ease;--transition-slower:.5s ease;--transition-slowest:.6s ease;--easing-bounce:cubic-bezier(.175, .885, .32, 1.275);--space-2xs:.25rem;--space-xs:.75rem;--space-sm:.5rem;--space-md:1rem;--space-lg:1.5rem;--space-xl:2rem;--space-2xl:3rem;--space-3xl:4rem;--radius-sm:4px;--radius-md:6px;--radius-lg:8px;--radius-full:9999px;--shadow-sm:0 2px 5px #0000001a;--shadow-md:0 6px 16px #0003;--shadow-lg:0 8px 20px #0000004d;--shadow-xl:0 12px 26px #00000047;--shadow-sidebar:0 16px 20px -12px #000000d6, 10px 4px 16px -12px #00000094, -10px 4px 16px -12px #00000094;--shadow-raised-hover:0 20px 24px -13px #000000e6, 12px 5px 18px -13px #000000ad, -12px 5px 18px -13px #000000ad;--shadow-dark:#000000c0;--muted-text:#bbb;--font-body:"Noto Sans SC", "Noto Sans CJK SC", system-ui, sans-serif;--font-size-subtitle:1.35rem;--font-size-base:1.1rem;--font-size-small:.95rem;--font-size-smaller:.9rem;--font-size-tiny:.85rem;--border-thin:1px;--border-medium:2px;--border-thick:3px}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:#2a2a2a;border-radius:4px}::-webkit-scrollbar-thumb{background:#4a4a4a;border-radius:4px;transition:background .3s ease-out}@media (hover:hover) and (pointer:fine){::-webkit-scrollbar-thumb:hover{background:#5a5a5a}}::-webkit-scrollbar-corner{background:#2a2a2a}.bg-layer{z-index:-10;background-position:50%;background-repeat:repeat;background-size:auto;background-color:var(--stalux-bg-color,transparent);filter:var(--stalux-bg-filter,none);pointer-events:none;opacity:0;forced-color-adjust:none;color-scheme:light only;transition:opacity .65s ease-in-out;position:fixed;inset:0}@media (prefers-reduced-motion:reduce){.bg-layer{transition-duration:0s}}footer{padding:var(--space-lg) var(--space-md);text-align:center;color:var(--muted-text);border-top:1px solid var(--white-10p);backdrop-filter:blur(16px);background:linear-gradient(#0c0e122e,#0c0e12b8)}}@media print{[data-stalux-offscreen-code],[data-stalux-offscreen-svg]{content-visibility:visible!important;contain-intrinsic-block-size:none!important}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.stagger-children>:first-child{animation-delay:.1s}.stagger-children>:nth-child(2){animation-delay:.15s}.stagger-children>:nth-child(3){animation-delay:.2s}.stagger-children>:nth-child(4){animation-delay:.25s}.stagger-children>:nth-child(5){animation-delay:.3s}.stagger-children>:nth-child(n+6){animation-delay:.35s}@keyframes stalux-page-exit{to{opacity:0}}@keyframes stalux-page-enter{0%{opacity:0;transform:translateY(9px)}to{opacity:1;transform:translateY(0)}}@keyframes stalux-page-enter-back{0%{opacity:0;transform:translateY(-9px)}to{opacity:1;transform:translateY(0)}}@keyframes stalux-taxonomy-enter{0%{opacity:0;transform:translate(12px)}to{opacity:1;transform:translate(0)}}@keyframes stalux-taxonomy-enter-back{0%{opacity:0;transform:translate(-12px)}to{opacity:1;transform:translate(0)}}@keyframes stalux-article-enter{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes stalux-article-enter-back{0%{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}@keyframes stalux-sidebar-left-in{0%{opacity:0;transform:translate(-14px)}to{opacity:1;transform:translate(0)}}@keyframes stalux-sidebar-left-out{to{opacity:0;transform:translate(-10px)}}@keyframes stalux-sidebar-left-back-in{0%{opacity:0;transform:translate(14px)}to{opacity:1;transform:translate(0)}}@keyframes stalux-sidebar-left-back-out{to{opacity:0;transform:translate(10px)}}@keyframes stalux-sidebar-right-in{0%{opacity:0;transform:translate(14px)}to{opacity:1;transform:translate(0)}}@keyframes stalux-sidebar-right-out{to{opacity:0;transform:translate(10px)}}@keyframes stalux-sidebar-right-back-in{0%{opacity:0;transform:translate(-14px)}to{opacity:1;transform:translate(0)}}@keyframes stalux-sidebar-right-back-out{to{opacity:0;transform:translate(-10px)}}::view-transition-group(stalux-page){z-index:1}::view-transition-group(stalux-article-page){z-index:1;animation:none}::view-transition-old(stalux-article-page),::view-transition-new(stalux-article-page){animation:none}html[data-stalux-vt-from=article][data-stalux-vt-to=article]::view-transition-group(left-sidebar),html[data-stalux-vt-from=article][data-stalux-vt-to=article]::view-transition-group(right-sidebar),html[data-stalux-vt-from=article][data-stalux-vt-to=article]::view-transition-old(left-sidebar),html[data-stalux-vt-from=article][data-stalux-vt-to=article]::view-transition-new(left-sidebar),html[data-stalux-vt-from=article][data-stalux-vt-to=article]::view-transition-old(right-sidebar),html[data-stalux-vt-from=article][data-stalux-vt-to=article]::view-transition-new(right-sidebar){animation:none!important}::view-transition-old(stalux-page),::view-transition-new(stalux-page){transform-origin:top}::view-transition-group(*){animation-duration:.24s;animation-timing-function:cubic-bezier(.22,.72,.22,1)}[data-astro-transition-persist=stalux-site-header]{view-transition-name:stalux-site-header}::view-transition-group(stalux-site-header){z-index:990;animation:none}::view-transition-old(stalux-site-header),::view-transition-new(stalux-site-header){animation:none}[data-astro-transition-persist=stalux-site-footer]{view-transition-name:stalux-site-footer}::view-transition-group(stalux-site-footer),::view-transition-old(stalux-site-footer),::view-transition-new(stalux-site-footer){animation:none}@media (prefers-reduced-motion:reduce){::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation-duration:1ms!important;animation-delay:0s!important}.stalux-main,.stalux-main *,.postLayout *{scroll-behavior:auto!important;transition-duration:1ms!important;animation-duration:1ms!important;animation-iteration-count:1!important}}
|
|
2
|
+
@layer components{.stalux-404-home-btn{background:var(--black-20p);border:var(--border-thin) solid var(--white-20p);transition:background-color var(--transition-normal), transform var(--transition-normal), box-shadow var(--transition-normal);border-radius:var(--radius-md);padding:var(--space-md) var(--space-lg);color:var(--white-90p);font-size:var(--font-size-base);text-decoration:none;display:inline-block}.stalux-ai-prompt{clip-path:inset(50%);white-space:pre-wrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.stalux-badge-group{border:none}.stalux-badge-group-arrow{font-size:.65rem;transition:transform .2s;display:inline-block}.stalux-badge-group-summary{user-select:none;cursor:pointer;color:var(--white-70p);gap:.4rem;padding:.2rem 0;font-size:.85rem;list-style-type:none;transition:color .2s}.stalux-beian-public-security-beian{color:#ffffffb3;gap:5px;font-size:.9rem;text-decoration:none;transition:color .3s;display:inline-flex}.stalux-card-post-categories,.stalux-card-post-tags{gap:.4rem}.stalux-card-post-category{background:var(--category-bg);color:#fff;border-radius:6px;padding:.18rem .5rem;font-size:.84rem;line-height:1;display:inline-block}.stalux-card-post-description{overflow-wrap:anywhere;color:var(--white-70p);line-height:1.6}.stalux-card-post-meta{gap:.6rem}.stalux-card-post-tag{background:var(--tag-bg);color:#fff;border-radius:9999px;padding:.22rem .7rem;font-size:.85rem;line-height:1;display:inline-block}.stalux-card-post-title{overflow-wrap:anywhere;margin:0;line-height:1.35}.stalux-card-read-more{align-self:flex-start;margin-top:.6rem}.stalux-card-time{gap:.45rem;display:inline-flex}.stalux-copyright{color:var(--white-70p);gap:.3em;font-weight:500}.stalux-footer{backdrop-filter:blur(10px);color:var(--white-full);background-color:#0000001a;margin-top:auto;padding:1.5rem 0;font-size:.9rem}.stalux-footer-content{gap:.8rem;max-width:1200px;margin:0 auto;padding:0 1rem}.stalux-nav-list{transform:scale(var(--nav-scale,1));transform-origin:50%;box-sizing:border-box;gap:2rem;max-width:100%;transition:transform .22s cubic-bezier(.22,.72,.22,1);overflow:visible}.stalux-nav-overlay{pointer-events:none;z-index:999;opacity:0;background:#0009;height:100%;transition:opacity .3s;display:none;position:fixed;top:0;left:0}.stalux-nav-scroll-btn{background:var(--black-30p);backdrop-filter:blur(8px);box-shadow:var(--shadow-md);pointer-events:none;z-index:10;cursor:pointer;width:36px;height:36px;color:var(--white-full);opacity:0;border:none;border-radius:9999px;padding:0;transition:opacity .25s;display:none;position:absolute;top:50%;transform:translateY(-50%)}.stalux-nav-toggle{z-index:998;cursor:pointer;min-width:48px;min-height:48px;color:inherit;background:0 0;border:none;padding:.75rem;display:none}.stalux-post-card{box-sizing:border-box;cursor:pointer;gap:var(--space-lg);border-radius:var(--radius-lg);background-color:var(--card-bg);height:100%;padding:var(--space-lg);box-shadow:var(--card-box-shadow);transition:transform .22s cubic-bezier(.22,.72,.22,1)}.stalux-stats-site-build-time{color:#fffc;margin-top:.5rem;font-size:.9rem}.stalux-stats-stats-separator{color:#ffffff80}.stalux-theme-info{color:var(--white-70p);gap:.3em;font-size:.85rem}.stalux-home-body{min-height:calc(100vh - var(--stalux-site-header-height));padding-bottom:var(--space-3xl);position:relative}.stalux-nav-container{box-sizing:border-box;max-width:100%;position:relative;overflow:hidden}.stalux-author{margin-top:4em}.stalux-card-post-cover{border-radius:var(--radius-md);flex-shrink:0;height:180px;margin-bottom:.5rem;overflow:hidden}.stalux-home-title{color:var(--white-full);text-shadow:var(--stalux-text-shadow);margin-top:1.5em;font-size:4em}.stalux-nav-item{text-shadow:var(--stalux-text-shadow);flex-shrink:0;margin-left:1em;margin-right:1em;font-size:1.3em}.stalux-page-description{color:var(--white-60p);margin-bottom:1.5em;font-size:1.2em}.stalux-page-title{text-shadow:var(--stalux-text-shadow);margin-top:1.5em;font-size:2.5em}.stalux-typewriter{min-height:2em;text-shadow:var(--stalux-text-shadow);margin-top:1.5em;font-size:2.5em}.stalux-404-error-container{min-height:60vh;padding:2rem}.stalux-badge,.stalux-badges-wrapper .stalux-badge{width:auto}.stalux-u-min-w-0{min-width:0}.stalux-u-w-full{width:100%}.stalux-u-flex{display:flex}.stalux-u-flex-col{flex-direction:column}.stalux-u-flex-wrap{flex-wrap:wrap}.stalux-u-items-center{align-items:center}.stalux-u-justify-center{justify-content:center}.stalux-badges,.stalux-badges-wrapper{gap:.5rem}.stalux-beian-beian-info{gap:1rem}.stalux-stats-site-stats{gap:.5rem;font-size:.9rem}.stalux-nav-text{white-space:nowrap;color:var(--white-full)}.stalux-badge-group-items{padding-top:.35rem}.stalux-u-text-center{text-align:center}.stalux-badge-group-hint{color:var(--white-70p);font-size:.7rem}.stalux-badge-group-title{color:var(--white-80p)}#stalux-home-show-post-list{cursor:pointer;text-shadow:var(--stalux-text-shadow);margin-top:3em;font-size:1.5em}.stalux-post-list-container{width:100%;height:auto;margin:5px 0}.stalux-post-list-container ul{flex-wrap:wrap;gap:2rem;margin:3em;padding:0;list-style-type:none;display:flex}.stalux-post-list-container ul>li{flex:min(22rem,100%);min-width:0;margin:0}.stalux-card-post-title a{color:inherit;text-decoration:none}.stalux-post-card>a:first-child{width:100%;min-width:0;display:block}.stalux-card-post-cover img{object-fit:cover;width:100%;max-width:100%;height:100%;transition:transform var(--transition-fast)}.stalux-card-post-date,.stalux-card-post-updated{color:#e8f2ff;border-radius:10px;align-items:center;gap:.35rem;width:fit-content;padding:.28rem .6rem;font-size:.9rem;line-height:1.1;display:inline-flex}.stalux-card-post-date{background:var(--date-bg);border:1px solid var(--date-border);color:#e8f2ff}.stalux-card-post-updated{background:var(--updated-bg);border:1px solid var(--updated-border);color:#fff7de}.stalux-card-post-tags a,.stalux-card-post-categories a{text-decoration:none}.stalux-card-post-tags a:focus-visible .stalux-card-post-tag{background:var(--tag-bg-hover)}.stalux-card-post-categories a:focus-visible .stalux-card-post-category{background:var(--category-bg-hover)}.stalux-social{margin-top:3em}.stalux-social ul{flex-wrap:wrap;justify-content:center;gap:1em;margin:0;padding:0;display:flex}.stalux-social ul li{box-sizing:border-box;text-align:center;background-color:var(--white-15p);border-radius:9999px;justify-content:center;align-items:center;width:2.5em;height:2.5em;font-size:large;display:inline-flex;overflow:hidden}.stalux-social ul a,.stalux-social ul .stalux-social-icon-container,.stalux-social ul .stalux-social-custom-icon{justify-content:center;align-items:center;width:100%;height:100%;line-height:1;display:inline-flex}.stalux-social[data-stalux-social-animate=true] li{animation:.28s cubic-bezier(.2,.8,.2,1) both stalux-social-stalux-social-arrive}.stalux-social[data-stalux-social-animate=true] li:nth-child(2){animation-delay:30ms}.stalux-social[data-stalux-social-animate=true] li:nth-child(3){animation-delay:60ms}.stalux-social[data-stalux-social-animate=true] li:nth-child(4){animation-delay:90ms}.stalux-social[data-stalux-social-animate=true] li:nth-child(5){animation-delay:.12s}.stalux-social[data-stalux-social-animate=true] li:nth-child(6){animation-delay:.15s}.stalux-social[data-stalux-social-animate=true] li:nth-child(n+7){animation-delay:.18s}nav{width:100%;min-width:0;max-width:100%}html{scroll-padding-top:var(--stalux-nav-offset,var(--stalux-site-header-height))}.stalux-site-header{z-index:990;width:100%;min-height:var(--stalux-site-header-height);isolation:isolate;justify-content:center;align-items:center;display:flex;position:sticky;top:0}.stalux-nav-scroll-btn[data-visible]{pointer-events:auto;opacity:1}.stalux-nav-scroll-btn[data-side=left]{left:4px}.stalux-nav-scroll-btn[data-side=right]{right:4px}.stalux-nav-scroll-btn svg{stroke:currentColor;stroke-width:2px;fill:none;width:20px;height:20px}.stalux-nav-link,.stalux-nav-link:visited{cursor:pointer;width:100%;color:inherit;min-height:44px;font:inherit;background:0 0;border:none;align-items:center;gap:.5rem;padding:.5rem .75rem;text-decoration:none;display:flex}.stalux-nav-link .nav-icon{stroke:var(--white-full)}.stalux-nav-toggle svg{width:32px;height:32px}.stalux-nav-overlay[data-state=show]{pointer-events:auto;opacity:1;display:block}#stalux-to-archive-archs{margin-top:2em}#stalux-date-date-time{text-shadow:var(--stalux-text-shadow);color:var(--white-full);flex-direction:column;align-items:center;margin-top:2em;display:flex}#stalux-date-date-time #stalux-date-date{min-height:1.25em;margin-bottom:.5em;font-size:2em;line-height:1.25}#stalux-date-date-time #stalux-date-time{font-variant-numeric:tabular-nums;min-height:1.25em;font-size:3em;line-height:1.25}.stalux-author-figure{justify-content:center;align-items:center;display:flex}.stalux-author-figure img{box-shadow:0 0 10px var(--stalux-accent-color);border-radius:9999px;transition:transform .65s ease-in-out}.stalux-author-figure figcaption{text-shadow:var(--stalux-text-shadow);color:var(--white-full);margin-left:1em;font-size:2.5em;font-weight:700}.stalux-author-figure-column figcaption{text-align:center;margin-top:.5em;margin-left:0}.agent-home-summary{clip-path:inset(50%);white-space:normal;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.stalux-404-error-content h1{color:var(--white-90p);margin:0;font-size:6rem;font-weight:700}.stalux-404-error-content p{color:var(--white-70p);margin:1rem 0 2rem;font-size:1.5rem}.stalux-404-countdown-text{color:var(--white-50p)!important;margin:-.5rem 0 1.5rem!important;font-size:.95rem!important}.agent-recovery{max-width:42rem;line-height:1.7;margin:0 auto 1.5rem!important;font-size:1rem!important}.agent-recovery a{color:inherit;text-decoration-line:underline}.stalux-theme-info span,.stalux-copyright span{margin:0}.stalux-theme-info a{color:#fffc;margin:0 .2em;text-decoration:none;transition:color .3s}.stalux-beian-beian-info a{color:#ffffffb3;font-size:.9rem;text-decoration:none;transition:color .3s}.stalux-beian-public-security-beian img{width:15px;height:15px;display:inline-block}.stalux-badge-group-summary::-webkit-details-marker,.stalux-badge-group[open] .stalux-badge-group-hint[data-hint=collapsed],.stalux-badge-group:not([open]) .stalux-badge-group-hint[data-hint=expanded]{display:none}.stalux-badge-group[open] .stalux-badge-group-arrow{transform:rotate(90deg)}@media (hover:hover) and (pointer:fine){.stalux-card-post-tags a:hover .stalux-card-post-tag{background:var(--tag-bg-hover)}.stalux-card-post-categories a:hover .stalux-card-post-category{background:var(--category-bg-hover)}.stalux-post-card-shell:hover .stalux-post-card .stalux-card-post-cover img{transform:scale(1.025)}.stalux-post-card-shell:hover .stalux-post-card{box-shadow:var(--card-box-shadow-hover)}.stalux-nav-scroll-btn:hover{background:0 0}.stalux-nav-container:hover .stalux-nav-scroll-btn[data-visible]{opacity:1}.stalux-nav-link:hover .nav-icon,.stalux-nav-link:hover .stalux-nav-text{stroke:var(--stalux-accent-color);color:var(--stalux-accent-color)}.stalux-author-figure>a:hover img{animation:.65s ease-in-out stalux-link-avatar-spin}.stalux-404-home-btn:hover{background:var(--accent-20p);box-shadow:0 4px 12px var(--shadow-dark)}.stalux-theme-info a:hover{color:#fff;text-decoration:none}.stalux-beian-beian-info a:hover,.stalux-beian-public-security-beian:hover{color:#ffffffe6;text-decoration:none}.stalux-badge-group-summary:hover{color:var(--white-70p)}}@media (width>=601px){.stalux-site-nav{isolation:isolate;border-radius:0 0 16px 16px;transition:background-color .18s,box-shadow .18s}.stalux-site-nav[data-scrolled]{backdrop-filter:blur(20px)saturate(140%);box-shadow:0 1px 0 var(--white-10p), 0 8px 24px #0000001f;background:#181818c7}}@media (width<=1100px){.stalux-nav-list{gap:1rem}.stalux-nav-item{margin-left:.6em;margin-right:.6em;font-size:1em}}@media (width<=900px){.stalux-nav-item{margin-left:.25em;margin-right:.25em;font-size:.95em}.stalux-nav-list{gap:.5rem}}@media (width<=768px){.stalux-home-body{box-sizing:border-box;width:100%;max-width:95vw;height:auto;padding:2rem .5rem 1.5rem}.stalux-home-title{word-break:break-all;margin-top:1em;font-size:2em}#stalux-home-show-post-list{margin-top:2em;font-size:1.1em}.stalux-post-list-container ul{margin:1rem}.stalux-footer{padding:1.2rem 0;font-size:.8rem}.stalux-footer-content{gap:.6rem;padding:0 .8rem}.stalux-author{box-sizing:border-box;width:100%;max-width:95vw;margin-top:2em;padding:1em .5em}.stalux-author-figure{gap:.5em;flex-direction:column!important}.stalux-author-figure img{max-width:20vw;max-height:20vw;width:64px!important;height:64px!important}.stalux-author-figure figcaption{text-align:center;word-break:break-all;overflow-wrap:break-word;white-space:normal;max-width:90vw;margin-top:.5em;margin-left:0;font-size:1.5em}.stalux-404-error-content h1{font-size:4rem}.stalux-404-error-content p{font-size:1.2rem}.stalux-badges{gap:.3rem}.stalux-badge{width:auto}}@media (width<=600px){html{--stalux-site-header-height:4rem}.stalux-nav-toggle[data-state=open]{visibility:hidden;pointer-events:none}.stalux-nav-toggle[data-scrolled]{backdrop-filter:blur(20px)saturate(140%);box-shadow:0 1px 0 var(--white-10p), 0 8px 24px #0000001f;background:#181818c7;border-radius:12px}.stalux-nav-toggle{display:block;position:fixed;top:.75rem;left:.75rem}.stalux-nav-container{overflow:visible}nav{width:auto}.stalux-nav-list{pointer-events:none;z-index:1000;background:var(--black-20p);backdrop-filter:blur(20px);flex-direction:column;justify-content:flex-start;align-items:flex-start;gap:0;width:min(220px,100vw - 1rem);height:100vh;padding:.5rem 1rem 2rem;position:fixed;top:0;left:0;right:auto;overflow-y:auto;transform:translate(-100%)}.stalux-nav-list[data-state=open]{pointer-events:auto;transform:translate(0)}.stalux-nav-item{border-bottom:1px solid var(--white-10p);flex-shrink:0;width:100%;margin:0;font-size:.9em}.stalux-nav-text{display:inline}.stalux-nav-link{width:100%;min-height:44px;font-size:inherit;padding:.45rem .75rem}.stalux-nav-link .nav-icon{width:18px;height:18px}}@media (width<=480px){.stalux-footer{padding:1rem 0;font-size:.8rem}.stalux-footer-content{gap:.6rem;padding:0 .8rem}}@media (prefers-reduced-motion:reduce){.stalux-social[data-stalux-social-animate=true] li{animation:none}}.stalux-main,.stalux-post-page,.stalux-post-layout>*,.stalux-link-card-content,.stalux-word-list-item,.stalux-word-card{box-sizing:border-box;min-width:0;max-width:100%}.stalux-main{overflow-wrap:anywhere}.stalux-link-shell{min-width:0;max-width:100%;display:block}.stalux-link-card{box-sizing:border-box;width:100%;max-width:100%}.stalux-category-shell{width:100%;min-width:0}.stalux-author-figure>a{flex-shrink:0;display:inline-block}.stalux-author-figure img{display:block}.stalux-post-card-shell,.stalux-category-shell,.stalux-link-shell{position:relative}.stalux-post-card,.stalux-category-card,.stalux-link-card,.stalux-word-card{transition:transform .2s,background-color .2s,border-color .2s,box-shadow .2s}:is(.stalux-post-card-shell,.stalux-category-shell):focus-within>*,.stalux-link-shell:focus-visible>*{box-shadow:var(--card-box-shadow-hover)}:is(button,summary,[role=button]):focus-visible{outline:2px solid var(--stalux-accent-color);outline-offset:3px}@media (prefers-reduced-motion:reduce){.stalux-main *,.stalux-main :before,.stalux-main :after{transition-duration:0s!important;animation:none!important}.stalux-post-card,.stalux-category-card,.stalux-link-card,.stalux-link-card-content,.stalux-card-post-cover img,.stalux-category-icon,.stalux-author-figure img,.stalux-link-card-avatar img{transform:none!important}}@keyframes stalux-social-stalux-social-arrive{0%{opacity:0;transform:translateY(.75rem)rotate(-12deg)}to{opacity:1;transform:translateY(0)rotate(0)}}@keyframes stalux-random-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes stalux-link-avatar-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes stalux-word-word-glow{0%{box-shadow:0 0 30px var(--accent-50p), 0 0 80px var(--accent-30p), var(--shadow-lg);transform:scale(1.02)}to{box-shadow:0 0 20px var(--accent-40p), 0 0 60px var(--accent-20p), var(--shadow-lg);transform:scale(1)}}}@layer utilities{.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.static{position:static}.grid{display:grid}.block{display:block}.inline-block{display:inline-block}.hidden{display:none}.h-full{height:100%}.flex{display:flex}.flex-shrink{flex-shrink:1}.flex-wrap{flex-wrap:wrap}.transform{transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.b,.border{border-width:1px}.text-inherit{color:inherit}.no-underline{text-decoration:none}.outline{outline-style:solid}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}}@layer theme;@layer base{html,body{color:#fff;width:100%;height:100%;margin:0;& main{flex:1}scrollbar-color:#4a4a4a #2a2a2a;font-family:var(--font-body), "Noto Sans SC", "Noto Sans CJK SC", system-ui, -apple-system, sans-serif;text-rendering:optimizelegibility;line-height:1.25;display:block}body{height:auto;min-height:100%}html{scrollbar-gutter:stable;background-color:var(--stalux-bg-color,#202020)}html[data-clarity-id]{opacity:1!important}a{color:inherit;cursor:pointer;text-decoration-skip-ink:auto;background-color:#0000;text-decoration:none;transition:color .2s,text-shadow .2s;position:relative}.a-none{cursor:pointer;text-decoration-skip-ink:auto;background-color:#0000;color:inherit!important;text-decoration:none!important}.a-none:after{display:none!important}a:not(.a-none):not([data-stalux-card]):not(.stalux-nav-link):after{content:"";background:linear-gradient(90deg, var(--stalux-accent-color), var(--accent-50p));transform-origin:0;pointer-events:none;width:100%;height:1px;transition:transform .25s cubic-bezier(.25,.9,.2,1);position:absolute;bottom:-2px;left:0;transform:scaleX(0)}a:not(.a-none):not([data-stalux-card]):not(.stalux-nav-link):focus-visible:after,a:not(.a-none):not([data-stalux-card]):not(.stalux-nav-link):active:after{transform:scaleX(1)}@media (hover:hover) and (pointer:fine){a:not(.a-none):not([data-stalux-card]):not(.stalux-nav-link):hover:after{transform:scaleX(1)}}a:active,a:focus-visible{text-decoration:none}@media (hover:hover) and (pointer:fine){a:hover{text-decoration:none}}a:focus{outline:none}a:focus-visible{outline:2px solid var(--stalux-accent-color);outline-offset:2px}ul{margin:0;padding:0;list-style:none}.none{display:none}.stalux-root{color:#fff;min-height:100vh}.stalux-main{min-height:calc(100vh - var(--stalux-site-header-height,3rem))}:root{--stalux-bg-color:#202020;--stalux-bg-filter:none;--stalux-site-header-height:3.75rem;--stalux-text-shadow:var(--stalux-accent-color) .08rem .08rem .18rem;--stalux-accent-color:#eab308;--stalux-accent-rgb:234 179 8;--surface-glass:var(--black-05p);--surface-glass-shadow:var(--shadow-sidebar);--card-bg:var(--surface-glass);--card-border:#ffffff1a;--card-box-shadow:0 10px 24px #00000014;--card-box-shadow-hover:0 14px 28px #0000001f;--tag-bg:#ffffff1f;--tag-bg-hover:#ffffff2e;--category-bg:#ffffff14;--category-bg-hover:#ffffff24;--date-bg:#42a0ff2e;--date-border:#42a0ff40;--updated-bg:#ffc94733;--updated-border:#ffc9474d;--white-full:#fff;--white-95p:#fffffff2;--white-90p:#ffffffe6;--white-85p:#ffffffd9;--white-80p:#ffffffe6;--white-78p:#ffffffc7;--white-75p:#ffffffbf;--white-70p:#ffffffdb;--white-60p:#fff9;--white-50p:#ffffff80;--white-30p:#ffffff4d;--white-20p:#fff3;--white-15p:#ffffff26;--white-10p:#ffffff1a;--white-05p:#ffffff0d;--black-30p:#0000004d;--black-20p:#0003;--black-15p:#00000026;--black-10p:#0000001a;--black-05p:#0000000d;--accent-90p:rgb(var(--stalux-accent-rgb) / .9);--accent-85p:rgb(var(--stalux-accent-rgb) / .85);--accent-80p:rgb(var(--stalux-accent-rgb) / .8);--accent-70p:rgb(var(--stalux-accent-rgb) / .7);--accent-60p:rgb(var(--stalux-accent-rgb) / .6);--accent-50p:rgb(var(--stalux-accent-rgb) / .5);--accent-40p:rgb(var(--stalux-accent-rgb) / .4);--accent-30p:rgb(var(--stalux-accent-rgb) / .3);--accent-20p:rgb(var(--stalux-accent-rgb) / .2);--transition-fast:.18s ease;--transition-medium:.2s ease;--transition-normal:.25s ease;--transition-slow:.3s ease;--transition-slower:.5s ease;--transition-slowest:.6s ease;--easing-bounce:cubic-bezier(.175, .885, .32, 1.275);--space-2xs:.25rem;--space-xs:.75rem;--space-sm:.5rem;--space-md:1rem;--space-lg:1.5rem;--space-xl:2rem;--space-2xl:3rem;--space-3xl:4rem;--radius-sm:4px;--radius-md:6px;--radius-lg:8px;--radius-full:9999px;--shadow-sm:0 2px 5px #0000001a;--shadow-md:0 6px 16px #0003;--shadow-lg:0 8px 20px #0000004d;--shadow-xl:0 12px 26px #00000047;--shadow-sidebar:0 16px 20px -12px #000000d6, 10px 4px 16px -12px #00000094, -10px 4px 16px -12px #00000094;--shadow-raised-hover:0 20px 24px -13px #000000e6, 12px 5px 18px -13px #000000ad, -12px 5px 18px -13px #000000ad;--shadow-dark:#000000c0;--muted-text:#bbb;--font-body:"Noto Sans SC", "Noto Sans CJK SC", system-ui, sans-serif;--font-size-subtitle:1.35rem;--font-size-base:1.1rem;--font-size-small:.95rem;--font-size-smaller:.9rem;--font-size-tiny:.85rem;--border-thin:1px;--border-medium:2px;--border-thick:3px}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:#2a2a2a;border-radius:4px}::-webkit-scrollbar-thumb{background:#4a4a4a;border-radius:4px;transition:background .3s ease-out}@media (hover:hover) and (pointer:fine){::-webkit-scrollbar-thumb:hover{background:#5a5a5a}}::-webkit-scrollbar-corner{background:#2a2a2a}.bg-layer{z-index:-10;background-position:50%;background-repeat:repeat;background-size:auto;background-color:var(--stalux-bg-color,transparent);filter:var(--stalux-bg-filter,none);pointer-events:none;opacity:0;forced-color-adjust:none;color-scheme:light only;transition:opacity .65s ease-in-out;position:fixed;inset:0}@media (prefers-reduced-motion:reduce){.bg-layer{transition-duration:0s}}footer{padding:var(--space-lg) var(--space-md);text-align:center;color:var(--muted-text);border-top:1px solid var(--white-10p);backdrop-filter:blur(16px);background:linear-gradient(#0c0e122e,#0c0e12b8)}}@media print{[data-stalux-offscreen-code],[data-stalux-offscreen-svg]{content-visibility:visible!important;contain-intrinsic-block-size:none!important}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.stagger-children>:first-child{animation-delay:.1s}.stagger-children>:nth-child(2){animation-delay:.15s}.stagger-children>:nth-child(3){animation-delay:.2s}.stagger-children>:nth-child(4){animation-delay:.25s}.stagger-children>:nth-child(5){animation-delay:.3s}.stagger-children>:nth-child(n+6){animation-delay:.35s}@keyframes stalux-page-exit{to{opacity:0}}@keyframes stalux-page-enter{0%{opacity:0;transform:translateY(9px)}to{opacity:1;transform:translateY(0)}}@keyframes stalux-page-enter-back{0%{opacity:0;transform:translateY(-9px)}to{opacity:1;transform:translateY(0)}}@keyframes stalux-taxonomy-enter{0%{opacity:0;transform:translate(12px)}to{opacity:1;transform:translate(0)}}@keyframes stalux-taxonomy-enter-back{0%{opacity:0;transform:translate(-12px)}to{opacity:1;transform:translate(0)}}@keyframes stalux-article-enter{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes stalux-article-enter-back{0%{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}@keyframes stalux-sidebar-left-in{0%{opacity:0;transform:translate(-14px)}to{opacity:1;transform:translate(0)}}@keyframes stalux-sidebar-left-out{to{opacity:0;transform:translate(-10px)}}@keyframes stalux-sidebar-left-back-in{0%{opacity:0;transform:translate(14px)}to{opacity:1;transform:translate(0)}}@keyframes stalux-sidebar-left-back-out{to{opacity:0;transform:translate(10px)}}@keyframes stalux-sidebar-right-in{0%{opacity:0;transform:translate(14px)}to{opacity:1;transform:translate(0)}}@keyframes stalux-sidebar-right-out{to{opacity:0;transform:translate(10px)}}@keyframes stalux-sidebar-right-back-in{0%{opacity:0;transform:translate(-14px)}to{opacity:1;transform:translate(0)}}@keyframes stalux-sidebar-right-back-out{to{opacity:0;transform:translate(-10px)}}.stalux-main *{view-transition-name:none!important}@keyframes stalux-route-fade-out{to{opacity:0}}@keyframes stalux-route-fade-in{0%{opacity:0}to{opacity:1}}::view-transition-old(stalux-page){animation:.1s ease-out both stalux-route-fade-out!important}::view-transition-new(stalux-page){animation:.16s ease-out both stalux-route-fade-in!important}::view-transition-group(stalux-page){z-index:1}::view-transition-group(stalux-article-page){z-index:1;animation:none}::view-transition-old(stalux-article-page),::view-transition-new(stalux-article-page){animation:none}html[data-stalux-vt-from=article][data-stalux-vt-to=article]::view-transition-group(left-sidebar),html[data-stalux-vt-from=article][data-stalux-vt-to=article]::view-transition-group(right-sidebar),html[data-stalux-vt-from=article][data-stalux-vt-to=article]::view-transition-old(left-sidebar),html[data-stalux-vt-from=article][data-stalux-vt-to=article]::view-transition-new(left-sidebar),html[data-stalux-vt-from=article][data-stalux-vt-to=article]::view-transition-old(right-sidebar),html[data-stalux-vt-from=article][data-stalux-vt-to=article]::view-transition-new(right-sidebar){animation:none!important}::view-transition-old(stalux-page),::view-transition-new(stalux-page){transform-origin:top}::view-transition-group(*){animation-duration:.24s;animation-timing-function:cubic-bezier(.22,.72,.22,1)}[data-astro-transition-persist=stalux-site-header]{view-transition-name:stalux-site-header}::view-transition-group(stalux-site-header){z-index:990;animation:none}::view-transition-old(stalux-site-header),::view-transition-new(stalux-site-header){animation:none}[data-astro-transition-persist=stalux-site-footer]{view-transition-name:stalux-site-footer}::view-transition-group(stalux-site-footer),::view-transition-old(stalux-site-footer),::view-transition-new(stalux-site-footer){animation:none}@media (prefers-reduced-motion:reduce){::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation-duration:1ms!important;animation-delay:0s!important}.stalux-main,.stalux-main *,.postLayout *{scroll-behavior:auto!important;transition-duration:1ms!important;animation-duration:1ms!important;animation-iteration-count:1!important}}
|
|
3
3
|
/*$vite$:1*/
|
package/src/styles/motion.css
CHANGED
|
@@ -173,6 +173,33 @@
|
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
+
/* One content snapshot per route. Nested titles, cards, sidebars and long
|
|
177
|
+
article blocks otherwise become dozens of individually rasterized surfaces.
|
|
178
|
+
Components used outside the shared shell retain their own transition metadata. */
|
|
179
|
+
.stalux-main * {
|
|
180
|
+
view-transition-name: none !important;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
@keyframes stalux-route-fade-out {
|
|
184
|
+
to {
|
|
185
|
+
opacity: 0;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
@keyframes stalux-route-fade-in {
|
|
189
|
+
from {
|
|
190
|
+
opacity: 0;
|
|
191
|
+
}
|
|
192
|
+
to {
|
|
193
|
+
opacity: 1;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
::view-transition-old(stalux-page) {
|
|
197
|
+
animation: stalux-route-fade-out 100ms ease-out both !important;
|
|
198
|
+
}
|
|
199
|
+
::view-transition-new(stalux-page) {
|
|
200
|
+
animation: stalux-route-fade-in 160ms ease-out both !important;
|
|
201
|
+
}
|
|
202
|
+
|
|
176
203
|
::view-transition-group(stalux-page) {
|
|
177
204
|
z-index: 1;
|
|
178
205
|
}
|