@xingwangzhe/stalux 1.32.0 → 1.34.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/archives/archivesList.astro +18 -0
- package/src/components/stalux/common/Weather.astro +140 -0
- package/src/components/stalux/layout/footer.astro +3 -0
- package/src/components/stalux/posts/postRight.astro +2 -0
- package/src/schemas/config.ts +1 -0
- package/src/scripts/archive-descriptions.ts +139 -0
- package/src/scripts/archive-reveal.ts +76 -0
- package/src/scripts/weather.ts +307 -0
- package/src/styles/generated-archives.css +1 -1
- package/src/styles/generated-article.css +1 -1
- package/src/styles/generated.css +1 -1
- package/src/utils/config-utils.ts +5 -1
package/README.md
CHANGED
|
@@ -297,3 +297,7 @@ Wide article pages use 280px sidebars within a layout up to 1920px wide, with 16
|
|
|
297
297
|
The friend links list is up to 1600px wide with 16px horizontal padding. Cards fill their grid columns, with one to five columns depending on the viewport.
|
|
298
298
|
|
|
299
299
|
Article bodies and summary cards are up to 840px wide. Summaries use the existing post `desc` and are omitted when empty. Markdown blockquotes appear as callout cards without new configuration or syntax.
|
|
300
|
+
|
|
301
|
+
Visitor weather is optional: set `weather: { enabled: true }` in `stalux/config/site.yml` to show it as plain text in the footer (with visitor IP and approximate location) and below the desktop article clock. Omitted or `false` disables it. It automatically requests an approximate city from IP.SB (with IPinfo as fallback) and weather from Open-Meteo, only while visible; no browser GPS permission is requested. These external services receive the visitor IP, and Open-Meteo receives rounded coordinates. A 20-minute session cache stores the city, visitor IP and weather, without coordinates. Visitors behind VPNs may see the exit city. Hidden tabs, offscreen cards and Astro navigation stop work; unavailable services show a retry action and retain previous weather. Open-Meteo's free endpoint is for non-commercial use subject to its limits; the card links to its attribution licence. No server endpoint or extra package is needed.
|
|
302
|
+
|
|
303
|
+
Archives keep a transparent, single-column year/month timeline with all articles expanded. Each month gently fades and moves into place once when it enters the viewport (280ms), using native browser APIs without extra dependencies. Reduced motion, printing, missing browser APIs and disabled JavaScript retain the complete static list. Mobile dates sit above wrapping article titles. No new configuration is required. Article titles retain a single hover underline; hovering or keyboard-focusing a title previews its existing `desc` on the right, falling below near viewport edges. Empty descriptions show no preview, and touch navigation stays direct. The preview uses the browser top layer (with a high stacking-level fallback) to avoid clipping or overlap.
|
package/package.json
CHANGED
|
@@ -68,6 +68,7 @@ const archiveYears = [...archivesByYearMonth.entries()]
|
|
|
68
68
|
{archiveYear.months.map(({ month, posts: monthPosts }) => (
|
|
69
69
|
<div
|
|
70
70
|
class="stalux-archive-month-section"
|
|
71
|
+
data-archive-month
|
|
71
72
|
style={{
|
|
72
73
|
"--archive-estimate": `${Math.ceil(monthPosts.length / 12) * 12 * 48 + 40}px`,
|
|
73
74
|
}}
|
|
@@ -91,6 +92,7 @@ const archiveYears = [...archivesByYearMonth.entries()]
|
|
|
91
92
|
<a
|
|
92
93
|
href={`/posts/${post.data.abbrlink}/`}
|
|
93
94
|
class="stalux-archive-post-link"
|
|
95
|
+
data-archive-description={post.data.desc || ""}
|
|
94
96
|
data-astro-prefetch="viewport"
|
|
95
97
|
>
|
|
96
98
|
{post.data.title}
|
|
@@ -111,3 +113,19 @@ const archiveYears = [...archivesByYearMonth.entries()]
|
|
|
111
113
|
<slot name="main" />
|
|
112
114
|
</div>
|
|
113
115
|
</section>
|
|
116
|
+
<div
|
|
117
|
+
id="stalux-archive-description"
|
|
118
|
+
class="stalux-archive-description"
|
|
119
|
+
data-archive-tooltip
|
|
120
|
+
role="tooltip"
|
|
121
|
+
hidden
|
|
122
|
+
></div>
|
|
123
|
+
|
|
124
|
+
<script>
|
|
125
|
+
import { mountArchiveDescriptions } from "../../../scripts/archive-descriptions";
|
|
126
|
+
import { mountArchiveReveal } from "../../../scripts/archive-reveal";
|
|
127
|
+
import { registerPageLifecycle } from "../../../scripts/page-runtime";
|
|
128
|
+
|
|
129
|
+
registerPageLifecycle("archive-reveal", mountArchiveReveal);
|
|
130
|
+
registerPageLifecycle("archive-descriptions", mountArchiveDescriptions);
|
|
131
|
+
</script>
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { getCollection } from "astro:content";
|
|
3
|
+
import { CloudSun } from "@lucide/astro";
|
|
4
|
+
import { getSiteData } from "@utils/config-utils";
|
|
5
|
+
|
|
6
|
+
const site = getSiteData(await getCollection("config"));
|
|
7
|
+
interface Props {
|
|
8
|
+
showIp?: boolean;
|
|
9
|
+
}
|
|
10
|
+
const { showIp = false } = Astro.props;
|
|
11
|
+
const zh = (site.lang || "zh-CN").startsWith("zh");
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
{site.weather?.enabled && (
|
|
15
|
+
<section
|
|
16
|
+
class:list={["stalux-weather", { "stalux-weather-footer": showIp }]}
|
|
17
|
+
data-weather-placement={showIp ? "footer" : "sidebar"}
|
|
18
|
+
data-stalux-weather
|
|
19
|
+
data-lang={site.lang || "zh-CN"}
|
|
20
|
+
aria-label={zh ? "附近城市天气" : "Nearby weather"}
|
|
21
|
+
>
|
|
22
|
+
<div class="stalux-weather-heading">
|
|
23
|
+
<CloudSun size={18} aria-hidden="true" />
|
|
24
|
+
<span>{zh ? "附近天气" : "Nearby weather"}</span>
|
|
25
|
+
</div>
|
|
26
|
+
<p class="stalux-weather-main" data-weather-output role="status">
|
|
27
|
+
{zh ? "正在获取附近城市天气…" : "Loading nearby weather…"}
|
|
28
|
+
</p>
|
|
29
|
+
{showIp && (
|
|
30
|
+
<p class="stalux-weather-location" data-weather-location>
|
|
31
|
+
{zh ? "访客 IP 与位置加载中…" : "Loading visitor IP and location…"}
|
|
32
|
+
</p>
|
|
33
|
+
)}
|
|
34
|
+
<p class="stalux-weather-status" data-weather-status></p>
|
|
35
|
+
<button type="button" data-weather-retry hidden>
|
|
36
|
+
{zh ? "重试" : "Retry"}
|
|
37
|
+
</button>
|
|
38
|
+
<p class="stalux-weather-source">
|
|
39
|
+
{zh ? "IP 近似位置" : "Approximate IP location"} ·{" "}
|
|
40
|
+
<a href="https://open-meteo.com/en/licence" target="_blank" rel="noopener noreferrer">
|
|
41
|
+
Open-Meteo
|
|
42
|
+
</a>
|
|
43
|
+
</p>
|
|
44
|
+
<noscript>
|
|
45
|
+
<p>{zh ? "启用 JavaScript 后可显示天气。" : "Enable JavaScript to load weather."}</p>
|
|
46
|
+
</noscript>
|
|
47
|
+
</section>
|
|
48
|
+
)}
|
|
49
|
+
<script>
|
|
50
|
+
import { registerPageLifecycle } from "../../../scripts/page-runtime";
|
|
51
|
+
import { mountWeather } from "../../../scripts/weather";
|
|
52
|
+
|
|
53
|
+
registerPageLifecycle("weather", mountWeather);
|
|
54
|
+
</script>
|
|
55
|
+
<style>
|
|
56
|
+
.stalux-weather {
|
|
57
|
+
box-sizing: border-box;
|
|
58
|
+
width: 100%;
|
|
59
|
+
max-width: 360px;
|
|
60
|
+
margin: 1rem auto;
|
|
61
|
+
padding: 1rem;
|
|
62
|
+
border: 1px solid var(--white-10p);
|
|
63
|
+
border-radius: 12px;
|
|
64
|
+
background: var(--surface-glass);
|
|
65
|
+
overflow-wrap: anywhere;
|
|
66
|
+
text-align: left;
|
|
67
|
+
}
|
|
68
|
+
.stalux-weather-heading {
|
|
69
|
+
display: flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
gap: 0.5rem;
|
|
72
|
+
color: var(--accent-90p);
|
|
73
|
+
font-size: 0.85rem;
|
|
74
|
+
}
|
|
75
|
+
.stalux-weather-main {
|
|
76
|
+
margin: 0.75rem 0 0.4rem;
|
|
77
|
+
color: var(--white-95p);
|
|
78
|
+
font-size: 1rem;
|
|
79
|
+
line-height: 1.5;
|
|
80
|
+
}
|
|
81
|
+
.stalux-weather-location,
|
|
82
|
+
.stalux-weather-status,
|
|
83
|
+
.stalux-weather-source {
|
|
84
|
+
margin: 0.4rem 0 0;
|
|
85
|
+
color: var(--white-60p);
|
|
86
|
+
font-size: 0.75rem;
|
|
87
|
+
line-height: 1.5;
|
|
88
|
+
}
|
|
89
|
+
.stalux-weather-source a {
|
|
90
|
+
color: inherit;
|
|
91
|
+
}
|
|
92
|
+
.stalux-weather button {
|
|
93
|
+
margin-top: 0.5rem;
|
|
94
|
+
color: var(--accent-90p);
|
|
95
|
+
border: 1px solid var(--white-20p);
|
|
96
|
+
background: var(--white-05p);
|
|
97
|
+
border-radius: 6px;
|
|
98
|
+
padding: 0.3rem 0.6rem;
|
|
99
|
+
cursor: pointer;
|
|
100
|
+
}
|
|
101
|
+
.stalux-weather button[hidden] {
|
|
102
|
+
display: none;
|
|
103
|
+
}
|
|
104
|
+
.stalux-weather-footer {
|
|
105
|
+
max-width: 100%;
|
|
106
|
+
width: auto;
|
|
107
|
+
padding: 0;
|
|
108
|
+
margin: 0 auto;
|
|
109
|
+
border: 0;
|
|
110
|
+
border-radius: 0;
|
|
111
|
+
background: transparent;
|
|
112
|
+
text-align: center;
|
|
113
|
+
font-size: inherit;
|
|
114
|
+
line-height: 1.6;
|
|
115
|
+
display: flex;
|
|
116
|
+
flex-wrap: wrap;
|
|
117
|
+
justify-content: center;
|
|
118
|
+
gap: 0.3rem 0.75rem;
|
|
119
|
+
}
|
|
120
|
+
.stalux-weather-footer .stalux-weather-heading {
|
|
121
|
+
display: none;
|
|
122
|
+
}
|
|
123
|
+
.stalux-weather-footer .stalux-weather-main {
|
|
124
|
+
margin: 0;
|
|
125
|
+
font-size: inherit;
|
|
126
|
+
color: var(--white-80p);
|
|
127
|
+
}
|
|
128
|
+
.stalux-weather-footer .stalux-weather-location,
|
|
129
|
+
.stalux-weather-footer .stalux-weather-status,
|
|
130
|
+
.stalux-weather-footer .stalux-weather-source {
|
|
131
|
+
margin: 0;
|
|
132
|
+
color: var(--white-70p);
|
|
133
|
+
font-size: 0.8rem;
|
|
134
|
+
}
|
|
135
|
+
@media print {
|
|
136
|
+
.stalux-weather {
|
|
137
|
+
display: none;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
</style>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { getCollection } from "astro:content";
|
|
3
|
+
import Weather from "@components/stalux/common/Weather.astro";
|
|
3
4
|
import FooterBadges from "@components/stalux/footer/FooterBadges.astro";
|
|
4
5
|
import FooterBeian from "@components/stalux/footer/FooterBeian.astro";
|
|
5
6
|
import FooterCopyright from "@components/stalux/footer/FooterCopyright.astro";
|
|
@@ -76,6 +77,8 @@ const formattedWordCount = formatWordCount(totalWordCount, siteConfig.lang || "z
|
|
|
76
77
|
<!-- 站点统计 -->
|
|
77
78
|
<FooterStats wordCount={formattedWordCount} buildtime={footerConfig?.buildtime} />
|
|
78
79
|
|
|
80
|
+
<Weather showIp />
|
|
81
|
+
|
|
79
82
|
<!-- 自定义内容 -->
|
|
80
83
|
{footerConfig?.custom && <Fragment set:html={footerConfig.custom} />}
|
|
81
84
|
<BackToTop lang={siteConfig.lang || "zh-CN"} />
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
import "../../../styles/generated-article.css";
|
|
3
3
|
import PostDate from "@components/stalux/common/date.astro";
|
|
4
|
+
import Weather from "@components/stalux/common/Weather.astro";
|
|
4
5
|
import PostTaxonomy from "@components/stalux/posts/PostTaxonomy.astro";
|
|
5
6
|
import PostToc from "@components/stalux/posts/postToc.astro";
|
|
6
7
|
|
|
@@ -22,6 +23,7 @@ const { headings = [], tags = [], categories = [] } = Astro.props;
|
|
|
22
23
|
>
|
|
23
24
|
<div class="stalux-sidebar-container">
|
|
24
25
|
<PostDate />
|
|
26
|
+
<Weather />
|
|
25
27
|
</div>
|
|
26
28
|
<div class="stalux-sidebar-container">
|
|
27
29
|
<PostToc headings={headings} />
|
package/src/schemas/config.ts
CHANGED
|
@@ -23,6 +23,7 @@ export const siteSchema = z.object({
|
|
|
23
23
|
.default("#EAB308"),
|
|
24
24
|
seoTitle: z.string().min(1).optional(),
|
|
25
25
|
timezone: z.string().optional().default("Asia/Shanghai"),
|
|
26
|
+
weather: z.object({ enabled: z.boolean().optional().default(false) }).optional(),
|
|
26
27
|
canonical: z.url("site.canonical must be a valid URL").optional(),
|
|
27
28
|
twitterSite: z.string().optional(),
|
|
28
29
|
noindex: z.boolean().optional().default(false),
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
interface AnchorRect {
|
|
2
|
+
left: number;
|
|
3
|
+
right: number;
|
|
4
|
+
top: number;
|
|
5
|
+
bottom: number;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/** Prefer the title's right side, falling below it when that side has no room. */
|
|
9
|
+
export function getArchiveDescriptionPosition(
|
|
10
|
+
anchor: AnchorRect,
|
|
11
|
+
width: number,
|
|
12
|
+
height: number,
|
|
13
|
+
viewportWidth: number,
|
|
14
|
+
viewportHeight: number,
|
|
15
|
+
) {
|
|
16
|
+
const fitsRight = anchor.right + 12 + width <= viewportWidth - 16;
|
|
17
|
+
const left = fitsRight ? anchor.right + 12 : anchor.left;
|
|
18
|
+
const top = fitsRight ? anchor.top : anchor.bottom + 8;
|
|
19
|
+
return {
|
|
20
|
+
left: Math.max(16, Math.min(left, viewportWidth - width - 16)),
|
|
21
|
+
top: Math.max(16, Math.min(top, viewportHeight - height - 16)),
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function mountArchiveDescriptions() {
|
|
26
|
+
const root = document.querySelector<HTMLElement>(".stalux-archive-container");
|
|
27
|
+
const tooltip = document.querySelector<HTMLElement>("[data-archive-tooltip]");
|
|
28
|
+
if (!root || !tooltip) return;
|
|
29
|
+
const usePopover =
|
|
30
|
+
typeof tooltip.showPopover === "function" && typeof tooltip.hidePopover === "function";
|
|
31
|
+
if (usePopover) tooltip.setAttribute("popover", "manual");
|
|
32
|
+
let popoverOpen = false;
|
|
33
|
+
const hover = window.matchMedia("(hover: hover) and (pointer: fine)");
|
|
34
|
+
let active: HTMLAnchorElement | undefined;
|
|
35
|
+
let previousDescription: string | null = null;
|
|
36
|
+
let closeTimer: ReturnType<typeof setTimeout> | undefined;
|
|
37
|
+
const clearClose = () => {
|
|
38
|
+
clearTimeout(closeTimer);
|
|
39
|
+
closeTimer = undefined;
|
|
40
|
+
};
|
|
41
|
+
const hide = () => {
|
|
42
|
+
clearClose();
|
|
43
|
+
if (active) {
|
|
44
|
+
if (previousDescription === null) active.removeAttribute("aria-describedby");
|
|
45
|
+
else active.setAttribute("aria-describedby", previousDescription);
|
|
46
|
+
}
|
|
47
|
+
active = undefined;
|
|
48
|
+
if (popoverOpen) {
|
|
49
|
+
tooltip.hidePopover();
|
|
50
|
+
popoverOpen = false;
|
|
51
|
+
}
|
|
52
|
+
tooltip.hidden = true;
|
|
53
|
+
tooltip.textContent = "";
|
|
54
|
+
};
|
|
55
|
+
const show = (link: HTMLAnchorElement) => {
|
|
56
|
+
const description = link.dataset.archiveDescription?.trim();
|
|
57
|
+
if (!description) return;
|
|
58
|
+
clearClose();
|
|
59
|
+
if (active !== link) {
|
|
60
|
+
hide();
|
|
61
|
+
active = link;
|
|
62
|
+
previousDescription = link.getAttribute("aria-describedby");
|
|
63
|
+
link.setAttribute(
|
|
64
|
+
"aria-describedby",
|
|
65
|
+
[previousDescription, tooltip.id].filter(Boolean).join(" "),
|
|
66
|
+
);
|
|
67
|
+
tooltip.textContent = description;
|
|
68
|
+
}
|
|
69
|
+
tooltip.hidden = false;
|
|
70
|
+
if (usePopover && !popoverOpen) {
|
|
71
|
+
tooltip.showPopover();
|
|
72
|
+
popoverOpen = true;
|
|
73
|
+
}
|
|
74
|
+
const { left, top } = getArchiveDescriptionPosition(
|
|
75
|
+
link.getBoundingClientRect(),
|
|
76
|
+
tooltip.offsetWidth,
|
|
77
|
+
tooltip.offsetHeight,
|
|
78
|
+
document.documentElement.clientWidth,
|
|
79
|
+
document.documentElement.clientHeight,
|
|
80
|
+
);
|
|
81
|
+
tooltip.style.left = `${left}px`;
|
|
82
|
+
tooltip.style.top = `${top}px`;
|
|
83
|
+
};
|
|
84
|
+
const linkFrom = (target: EventTarget | null) =>
|
|
85
|
+
target instanceof Element
|
|
86
|
+
? target.closest<HTMLAnchorElement>(".stalux-archive-post-link")
|
|
87
|
+
: null;
|
|
88
|
+
const enter = (event: Event) => {
|
|
89
|
+
if (event.type === "pointerover" && !hover.matches) return;
|
|
90
|
+
const link = linkFrom(event.target);
|
|
91
|
+
if (link && root.contains(link)) show(link);
|
|
92
|
+
};
|
|
93
|
+
const leave = (event: Event) => {
|
|
94
|
+
const link = linkFrom(event.target);
|
|
95
|
+
if (link !== active) return;
|
|
96
|
+
const related = (event as FocusEvent).relatedTarget;
|
|
97
|
+
if (related instanceof Node && (active?.contains(related) || tooltip.contains(related)))
|
|
98
|
+
return;
|
|
99
|
+
clearClose();
|
|
100
|
+
closeTimer = setTimeout(hide, 120);
|
|
101
|
+
};
|
|
102
|
+
const handleEscape = (event: KeyboardEvent) => {
|
|
103
|
+
if (event.key === "Escape") hide();
|
|
104
|
+
};
|
|
105
|
+
const scroll = (event: Event) => {
|
|
106
|
+
if (event.target instanceof Node && tooltip.contains(event.target)) return;
|
|
107
|
+
hide();
|
|
108
|
+
};
|
|
109
|
+
const visibility = () => {
|
|
110
|
+
if (document.hidden) hide();
|
|
111
|
+
};
|
|
112
|
+
root.addEventListener("pointerover", enter);
|
|
113
|
+
root.addEventListener("pointerout", leave);
|
|
114
|
+
root.addEventListener("focusin", enter);
|
|
115
|
+
root.addEventListener("focusout", leave);
|
|
116
|
+
tooltip.addEventListener("pointerenter", clearClose);
|
|
117
|
+
tooltip.addEventListener("pointerleave", hide);
|
|
118
|
+
document.addEventListener("keydown", handleEscape);
|
|
119
|
+
document.addEventListener("scroll", scroll, { capture: true, passive: true });
|
|
120
|
+
document.addEventListener("visibilitychange", visibility);
|
|
121
|
+
window.addEventListener("resize", hide);
|
|
122
|
+
window.addEventListener("beforeprint", hide);
|
|
123
|
+
hover.addEventListener("change", hide);
|
|
124
|
+
return () => {
|
|
125
|
+
hide();
|
|
126
|
+
root.removeEventListener("pointerover", enter);
|
|
127
|
+
root.removeEventListener("pointerout", leave);
|
|
128
|
+
root.removeEventListener("focusin", enter);
|
|
129
|
+
root.removeEventListener("focusout", leave);
|
|
130
|
+
tooltip.removeEventListener("pointerenter", clearClose);
|
|
131
|
+
tooltip.removeEventListener("pointerleave", hide);
|
|
132
|
+
document.removeEventListener("keydown", handleEscape);
|
|
133
|
+
document.removeEventListener("scroll", scroll, true);
|
|
134
|
+
document.removeEventListener("visibilitychange", visibility);
|
|
135
|
+
window.removeEventListener("resize", hide);
|
|
136
|
+
window.removeEventListener("beforeprint", hide);
|
|
137
|
+
hover.removeEventListener("change", hide);
|
|
138
|
+
};
|
|
139
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/** Enhance visible static months; never hide or collapse archive content. */
|
|
2
|
+
export function mountArchiveReveal() {
|
|
3
|
+
const months = [...document.querySelectorAll<HTMLElement>("[data-archive-month]")];
|
|
4
|
+
if (
|
|
5
|
+
!months.length ||
|
|
6
|
+
typeof IntersectionObserver === "undefined" ||
|
|
7
|
+
typeof months[0]?.animate !== "function"
|
|
8
|
+
)
|
|
9
|
+
return;
|
|
10
|
+
|
|
11
|
+
const motion = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
12
|
+
const print = window.matchMedia("print");
|
|
13
|
+
const visible = new Set<HTMLElement>();
|
|
14
|
+
const played = new Set<HTMLElement>();
|
|
15
|
+
const animations = new Map<Animation, () => void>();
|
|
16
|
+
let disposed = false;
|
|
17
|
+
|
|
18
|
+
const cancelAnimations = () => {
|
|
19
|
+
for (const [animation, finish] of animations) {
|
|
20
|
+
animation.removeEventListener("finish", finish);
|
|
21
|
+
animation.cancel();
|
|
22
|
+
}
|
|
23
|
+
animations.clear();
|
|
24
|
+
};
|
|
25
|
+
const reveal = () => {
|
|
26
|
+
if (disposed || document.hidden) return;
|
|
27
|
+
for (const month of visible) {
|
|
28
|
+
if (played.has(month)) continue;
|
|
29
|
+
played.add(month);
|
|
30
|
+
observer.unobserve(month);
|
|
31
|
+
if (motion.matches || print.matches) continue;
|
|
32
|
+
const animation = month.animate(
|
|
33
|
+
[
|
|
34
|
+
{ opacity: 0, transform: "translateY(8px)" },
|
|
35
|
+
{ opacity: 1, transform: "translateY(0)" },
|
|
36
|
+
],
|
|
37
|
+
{ duration: 280, easing: "cubic-bezier(0.22, 1, 0.36, 1)" },
|
|
38
|
+
);
|
|
39
|
+
const finish = () => {
|
|
40
|
+
animation.removeEventListener("finish", finish);
|
|
41
|
+
animations.delete(animation);
|
|
42
|
+
animation.cancel();
|
|
43
|
+
};
|
|
44
|
+
animations.set(animation, finish);
|
|
45
|
+
animation.addEventListener("finish", finish);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const observer = new IntersectionObserver((entries) => {
|
|
49
|
+
if (disposed) return;
|
|
50
|
+
for (const entry of entries) {
|
|
51
|
+
const month = entry.target as HTMLElement;
|
|
52
|
+
if (entry.isIntersecting) visible.add(month);
|
|
53
|
+
else visible.delete(month);
|
|
54
|
+
}
|
|
55
|
+
reveal();
|
|
56
|
+
});
|
|
57
|
+
const update = () => {
|
|
58
|
+
if (document.hidden || motion.matches || print.matches) cancelAnimations();
|
|
59
|
+
reveal();
|
|
60
|
+
};
|
|
61
|
+
for (const month of months) observer.observe(month);
|
|
62
|
+
document.addEventListener("visibilitychange", update);
|
|
63
|
+
window.addEventListener("beforeprint", cancelAnimations);
|
|
64
|
+
motion.addEventListener("change", update);
|
|
65
|
+
print.addEventListener("change", update);
|
|
66
|
+
return () => {
|
|
67
|
+
disposed = true;
|
|
68
|
+
observer.disconnect();
|
|
69
|
+
cancelAnimations();
|
|
70
|
+
visible.clear();
|
|
71
|
+
document.removeEventListener("visibilitychange", update);
|
|
72
|
+
window.removeEventListener("beforeprint", cancelAnimations);
|
|
73
|
+
motion.removeEventListener("change", update);
|
|
74
|
+
print.removeEventListener("change", update);
|
|
75
|
+
};
|
|
76
|
+
}
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
export const WEATHER_TTL = 20 * 60 * 1000;
|
|
2
|
+
const CACHE_KEY = "stalux-weather-v1";
|
|
3
|
+
export interface WeatherData {
|
|
4
|
+
city: string;
|
|
5
|
+
ip?: string;
|
|
6
|
+
temperature: number;
|
|
7
|
+
apparent: number;
|
|
8
|
+
code: number;
|
|
9
|
+
updated: number;
|
|
10
|
+
}
|
|
11
|
+
export type WeatherState = { status: "loading" | "ready" | "error"; data?: WeatherData };
|
|
12
|
+
type Listener = (state: WeatherState) => void;
|
|
13
|
+
|
|
14
|
+
function validData(value: unknown): value is WeatherData {
|
|
15
|
+
if (!value || typeof value !== "object") return false;
|
|
16
|
+
const data = value as WeatherData;
|
|
17
|
+
return (
|
|
18
|
+
typeof data.city === "string" &&
|
|
19
|
+
data.city.length > 0 &&
|
|
20
|
+
data.city.length < 160 &&
|
|
21
|
+
(data.ip === undefined ||
|
|
22
|
+
(typeof data.ip === "string" &&
|
|
23
|
+
data.ip.length <= 45 &&
|
|
24
|
+
/^[0-9a-f:.]+$/i.test(data.ip))) &&
|
|
25
|
+
[data.temperature, data.apparent, data.code, data.updated].every(Number.isFinite)
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function createWeatherClient({
|
|
30
|
+
fetcher = fetch,
|
|
31
|
+
storage,
|
|
32
|
+
now = Date.now,
|
|
33
|
+
}: {
|
|
34
|
+
fetcher?: typeof fetch;
|
|
35
|
+
storage?: Pick<Storage, "getItem" | "setItem">;
|
|
36
|
+
now?: () => number;
|
|
37
|
+
} = {}) {
|
|
38
|
+
const listeners = new Set<Listener>();
|
|
39
|
+
let data: WeatherData | undefined;
|
|
40
|
+
let controller: AbortController | undefined;
|
|
41
|
+
let timer: ReturnType<typeof setTimeout> | undefined;
|
|
42
|
+
let generation = 0;
|
|
43
|
+
try {
|
|
44
|
+
const cached: unknown = JSON.parse(storage?.getItem(CACHE_KEY) ?? "null");
|
|
45
|
+
if (validData(cached) && cached.updated <= now()) data = cached;
|
|
46
|
+
} catch {
|
|
47
|
+
/* Storage is optional. */
|
|
48
|
+
}
|
|
49
|
+
const emit = (status: WeatherState["status"]) => {
|
|
50
|
+
for (const listener of listeners) listener({ status, data });
|
|
51
|
+
};
|
|
52
|
+
const stop = () => {
|
|
53
|
+
generation++;
|
|
54
|
+
controller?.abort();
|
|
55
|
+
controller = undefined;
|
|
56
|
+
clearTimeout(timer);
|
|
57
|
+
timer = undefined;
|
|
58
|
+
};
|
|
59
|
+
const refresh = async (force = false) => {
|
|
60
|
+
if (!listeners.size || controller) return;
|
|
61
|
+
clearTimeout(timer);
|
|
62
|
+
if (!force && data && now() - data.updated < WEATHER_TTL) {
|
|
63
|
+
emit("ready");
|
|
64
|
+
timer = setTimeout(() => void refresh(), WEATHER_TTL - (now() - data.updated));
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const token = ++generation;
|
|
68
|
+
const request = new AbortController();
|
|
69
|
+
controller = request;
|
|
70
|
+
const timeout = setTimeout(() => request.abort(), 10000);
|
|
71
|
+
timer = timeout;
|
|
72
|
+
emit("loading");
|
|
73
|
+
try {
|
|
74
|
+
const get = async (url: string) => {
|
|
75
|
+
if (request.signal.aborted) throw new Error("Request cancelled");
|
|
76
|
+
const response = await fetcher(url, {
|
|
77
|
+
signal: request.signal,
|
|
78
|
+
credentials: "omit",
|
|
79
|
+
referrerPolicy: "no-referrer",
|
|
80
|
+
});
|
|
81
|
+
if (request.signal.aborted || !response.ok)
|
|
82
|
+
throw new Error("Weather service unavailable");
|
|
83
|
+
return response.json();
|
|
84
|
+
};
|
|
85
|
+
const validateLocation = (location: {
|
|
86
|
+
city?: unknown;
|
|
87
|
+
latitude?: unknown;
|
|
88
|
+
longitude?: unknown;
|
|
89
|
+
ip?: unknown;
|
|
90
|
+
error?: unknown;
|
|
91
|
+
}) => {
|
|
92
|
+
const lat = location.latitude;
|
|
93
|
+
const lon = location.longitude;
|
|
94
|
+
if (
|
|
95
|
+
location.error ||
|
|
96
|
+
typeof location.city !== "string" ||
|
|
97
|
+
!location.city.trim() ||
|
|
98
|
+
typeof lat !== "number" ||
|
|
99
|
+
typeof lon !== "number" ||
|
|
100
|
+
!Number.isFinite(lat) ||
|
|
101
|
+
!Number.isFinite(lon) ||
|
|
102
|
+
Math.abs(lat) > 90 ||
|
|
103
|
+
Math.abs(lon) > 180
|
|
104
|
+
)
|
|
105
|
+
throw new Error("Invalid approximate location");
|
|
106
|
+
const ip =
|
|
107
|
+
typeof location.ip === "string" &&
|
|
108
|
+
location.ip.length <= 45 &&
|
|
109
|
+
/^[0-9a-f:.]+$/i.test(location.ip)
|
|
110
|
+
? location.ip
|
|
111
|
+
: undefined;
|
|
112
|
+
return { city: location.city.trim(), lat, lon, ip };
|
|
113
|
+
};
|
|
114
|
+
let location: ReturnType<typeof validateLocation>;
|
|
115
|
+
try {
|
|
116
|
+
location = validateLocation(await get("https://api.ip.sb/geoip"));
|
|
117
|
+
} catch {
|
|
118
|
+
const info = await get("https://ipinfo.io/json");
|
|
119
|
+
const coordinates = typeof info.loc === "string" ? info.loc.split(",") : [];
|
|
120
|
+
location = validateLocation({
|
|
121
|
+
city: info.city,
|
|
122
|
+
ip: info.ip,
|
|
123
|
+
latitude:
|
|
124
|
+
coordinates.length === 2 && coordinates[0]?.trim()
|
|
125
|
+
? Number(coordinates[0])
|
|
126
|
+
: undefined,
|
|
127
|
+
longitude:
|
|
128
|
+
coordinates.length === 2 && coordinates[1]?.trim()
|
|
129
|
+
? Number(coordinates[1])
|
|
130
|
+
: undefined,
|
|
131
|
+
error: info.error,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
const { lat, lon } = location;
|
|
135
|
+
const url = new URL("https://api.open-meteo.com/v1/forecast");
|
|
136
|
+
url.search = new URLSearchParams({
|
|
137
|
+
latitude: lat.toFixed(2),
|
|
138
|
+
longitude: lon.toFixed(2),
|
|
139
|
+
current: "temperature_2m,apparent_temperature,weather_code",
|
|
140
|
+
timezone: "auto",
|
|
141
|
+
forecast_days: "1",
|
|
142
|
+
}).toString();
|
|
143
|
+
const weather = await get(url.href);
|
|
144
|
+
const current = weather.current;
|
|
145
|
+
const next: WeatherData = {
|
|
146
|
+
city: location.city.trim(),
|
|
147
|
+
ip: location.ip,
|
|
148
|
+
temperature: current?.temperature_2m,
|
|
149
|
+
apparent: current?.apparent_temperature,
|
|
150
|
+
code: current?.weather_code,
|
|
151
|
+
updated: now(),
|
|
152
|
+
};
|
|
153
|
+
if (!validData(next)) throw new Error("Invalid weather response");
|
|
154
|
+
if (token !== generation || request.signal.aborted) return;
|
|
155
|
+
data = next;
|
|
156
|
+
try {
|
|
157
|
+
storage?.setItem(CACHE_KEY, JSON.stringify(data));
|
|
158
|
+
} catch {
|
|
159
|
+
/* Private browsing. */
|
|
160
|
+
}
|
|
161
|
+
emit("ready");
|
|
162
|
+
timer = setTimeout(() => void refresh(), WEATHER_TTL);
|
|
163
|
+
} catch {
|
|
164
|
+
if (token === generation) emit("error");
|
|
165
|
+
} finally {
|
|
166
|
+
clearTimeout(timeout);
|
|
167
|
+
if (token === generation) controller = undefined;
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
return {
|
|
171
|
+
subscribe(listener: Listener) {
|
|
172
|
+
listeners.add(listener);
|
|
173
|
+
void refresh();
|
|
174
|
+
return () => {
|
|
175
|
+
listeners.delete(listener);
|
|
176
|
+
if (!listeners.size) stop();
|
|
177
|
+
};
|
|
178
|
+
},
|
|
179
|
+
refresh: () => void refresh(true),
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export function weatherDescription(code: number, lang: string): string {
|
|
184
|
+
const zh = lang.startsWith("zh");
|
|
185
|
+
const labels = zh
|
|
186
|
+
? ["晴", "少云", "多云", "阴", "雾", "毛毛雨", "雨", "雪", "雷雨", "天气未知"]
|
|
187
|
+
: [
|
|
188
|
+
"Clear",
|
|
189
|
+
"Mostly clear",
|
|
190
|
+
"Partly cloudy",
|
|
191
|
+
"Overcast",
|
|
192
|
+
"Fog",
|
|
193
|
+
"Drizzle",
|
|
194
|
+
"Rain",
|
|
195
|
+
"Snow",
|
|
196
|
+
"Thunderstorm",
|
|
197
|
+
"Unknown",
|
|
198
|
+
];
|
|
199
|
+
const index =
|
|
200
|
+
code === 0
|
|
201
|
+
? 0
|
|
202
|
+
: code === 1
|
|
203
|
+
? 1
|
|
204
|
+
: code === 2
|
|
205
|
+
? 2
|
|
206
|
+
: code === 3
|
|
207
|
+
? 3
|
|
208
|
+
: [45, 48].includes(code)
|
|
209
|
+
? 4
|
|
210
|
+
: [51, 53, 55, 56, 57].includes(code)
|
|
211
|
+
? 5
|
|
212
|
+
: [61, 63, 65, 66, 67, 80, 81, 82].includes(code)
|
|
213
|
+
? 6
|
|
214
|
+
: [71, 73, 75, 77, 85, 86].includes(code)
|
|
215
|
+
? 7
|
|
216
|
+
: [95, 96, 99].includes(code)
|
|
217
|
+
? 8
|
|
218
|
+
: 9;
|
|
219
|
+
return labels[index] ?? labels[9] ?? "Unknown";
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
let client: ReturnType<typeof createWeatherClient> | undefined;
|
|
223
|
+
export function mountWeather() {
|
|
224
|
+
const elements = [...document.querySelectorAll<HTMLElement>("[data-stalux-weather]")];
|
|
225
|
+
if (!elements.length) return;
|
|
226
|
+
if (!client) {
|
|
227
|
+
let storage: Storage | undefined;
|
|
228
|
+
try {
|
|
229
|
+
storage = sessionStorage;
|
|
230
|
+
} catch {
|
|
231
|
+
/* Storage may be disabled. */
|
|
232
|
+
}
|
|
233
|
+
client = createWeatherClient({ storage });
|
|
234
|
+
}
|
|
235
|
+
const shared = client;
|
|
236
|
+
const cleanups = elements.map((element) => {
|
|
237
|
+
const output = element.querySelector<HTMLElement>("[data-weather-output]");
|
|
238
|
+
const locationOutput = element.querySelector<HTMLElement>("[data-weather-location]");
|
|
239
|
+
const status = element.querySelector<HTMLElement>("[data-weather-status]");
|
|
240
|
+
const retry = element.querySelector<HTMLButtonElement>("[data-weather-retry]");
|
|
241
|
+
if (!output || !status || !retry) return () => {};
|
|
242
|
+
const zh = (element.dataset.lang ?? "zh-CN").startsWith("zh");
|
|
243
|
+
let visible = !globalThis.IntersectionObserver;
|
|
244
|
+
let unsubscribe: (() => void) | undefined;
|
|
245
|
+
const render: Listener = ({ status: state, data }) => {
|
|
246
|
+
element.dataset.weatherState = state;
|
|
247
|
+
retry.hidden = state !== "error";
|
|
248
|
+
output.textContent = data
|
|
249
|
+
? `${locationOutput ? (zh ? "天气:" : "Weather: ") : ""}${data.city} · ${weatherDescription(data.code, element.dataset.lang ?? "zh-CN")} · ${Math.round(data.temperature)}°C`
|
|
250
|
+
: zh
|
|
251
|
+
? "正在获取附近城市天气…"
|
|
252
|
+
: "Loading nearby weather…";
|
|
253
|
+
if (locationOutput)
|
|
254
|
+
locationOutput.textContent = data
|
|
255
|
+
? `${zh ? "位置" : "Location"}:${data.city} · IP:${data.ip || (zh ? "暂不可用" : "Unavailable")}`
|
|
256
|
+
: zh
|
|
257
|
+
? "访客 IP 与位置暂不可用"
|
|
258
|
+
: "Visitor IP and location unavailable";
|
|
259
|
+
status.textContent =
|
|
260
|
+
state === "error"
|
|
261
|
+
? data
|
|
262
|
+
? zh
|
|
263
|
+
? "更新失败,显示上次天气"
|
|
264
|
+
: "Update failed; showing last weather"
|
|
265
|
+
: zh
|
|
266
|
+
? "请稍后重试"
|
|
267
|
+
: "Please try again later"
|
|
268
|
+
: state === "loading"
|
|
269
|
+
? zh
|
|
270
|
+
? "正在更新"
|
|
271
|
+
: "Updating"
|
|
272
|
+
: data
|
|
273
|
+
? `${zh ? "体感" : "Feels like"} ${Math.round(data.apparent)}°C · ${new Date(data.updated).toLocaleTimeString(zh ? "zh-CN" : "en", { hour: "2-digit", minute: "2-digit" })}`
|
|
274
|
+
: "";
|
|
275
|
+
if (state === "error" && !data)
|
|
276
|
+
output.textContent = zh ? "天气暂不可用" : "Weather unavailable";
|
|
277
|
+
};
|
|
278
|
+
const update = () => {
|
|
279
|
+
if (visible && !document.hidden) {
|
|
280
|
+
if (!unsubscribe) unsubscribe = shared.subscribe(render);
|
|
281
|
+
} else {
|
|
282
|
+
unsubscribe?.();
|
|
283
|
+
unsubscribe = undefined;
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
const observer = globalThis.IntersectionObserver
|
|
287
|
+
? new IntersectionObserver((entries) => {
|
|
288
|
+
visible = entries.some((entry) => entry.isIntersecting);
|
|
289
|
+
update();
|
|
290
|
+
})
|
|
291
|
+
: undefined;
|
|
292
|
+
observer?.observe(element);
|
|
293
|
+
const refresh = () => shared.refresh();
|
|
294
|
+
retry.addEventListener("click", refresh);
|
|
295
|
+
document.addEventListener("visibilitychange", update);
|
|
296
|
+
update();
|
|
297
|
+
return () => {
|
|
298
|
+
unsubscribe?.();
|
|
299
|
+
observer?.disconnect();
|
|
300
|
+
retry.removeEventListener("click", refresh);
|
|
301
|
+
document.removeEventListener("visibilitychange", update);
|
|
302
|
+
};
|
|
303
|
+
});
|
|
304
|
+
return () => {
|
|
305
|
+
for (const cleanup of cleanups) cleanup();
|
|
306
|
+
};
|
|
307
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
@layer theme, base, components, utilities;
|
|
2
|
-
@layer components{.stalux-archive-month-section{content-visibility:auto;contain-intrinsic-block-size:auto var(--archive-estimate,600px);margin-left:calc(-1 * var(--tl-pad));padding-left:var(--tl-pad);margin-bottom:
|
|
2
|
+
@layer components{.stalux-archive-month-section{content-visibility:auto;contain-intrinsic-block-size:auto var(--archive-estimate,600px);margin-left:calc(-1 * var(--tl-pad));padding-left:var(--tl-pad);margin-bottom:1.75rem;position:relative}.stalux-archive-post-list{content-visibility:auto;contain-intrinsic-block-size:auto var(--archive-group-estimate,576px);margin:0 0 0 calc(-1 * var(--tl-pad));padding:0 0 0 var(--tl-pad);list-style-type:none}.stalux-archive-year-section{margin-bottom:var(--space-2xl);position:relative}.stalux-archive-container{max-width:1000px;padding:var(--space-xl) var(--space-md);margin:0 auto}.stalux-archives-archives-container{max-width:1000px;margin:0 auto;padding:2rem 1rem}.stalux-archive-year-count{background-color:var(--accent-20p);color:var(--white-90p);border-radius:1rem;margin-left:1rem;padding:.3rem .8rem;font-size:.9rem}.stalux-archive-year-header{flex-wrap:wrap;align-items:center;row-gap:.5rem;margin-bottom:1.25rem;display:flex}.stalux-archive-no-posts{background-color:var(--black-10p);text-align:center;width:100%;color:var(--white-70p);border-radius:.5rem;padding:3rem 1rem;font-size:1.2rem}.stalux-archive-post-date{min-width:90px;color:var(--white-60p);font-size:.85rem}.stalux-archive-post-link{text-decoration:none}.stalux-archive-description{box-sizing:border-box;z-index:10000;overflow-wrap:anywhere;width:min(320px,100vw - 32px);max-height:min(320px,100vh - 32px);color:var(--white-90p);border:1px solid var(--accent-40p);box-shadow:var(--shadow-sidebar);background:#18181bf5;border-radius:.75rem;margin:0;padding:1rem;font-size:.9rem;line-height:1.65;position:fixed;inset:auto;overflow-y:auto}.stalux-archive-description[hidden]{display:none}.stalux-archive-timeline-container{padding-left:var(--tl-pad);--tl-line:3px;--tl-pad:var(--space-xl);position:relative}.stalux-archive-timeline-container:before{height:100%;width:var(--tl-line);border-radius:var(--border-medium);content:"";background:linear-gradient(to bottom, var(--accent-80p), var(--accent-40p), var(--white-20p));position:absolute;top:0;left:0}.stalux-archive-year-title{--dot:16px;color:var(--accent-90p);margin:0;font-size:1.8rem;line-height:1.35;position:relative}.stalux-archive-year-title:before{box-sizing:border-box;width:var(--dot);height:var(--dot);left:calc(var(--tl-line) / 2 - var(--tl-pad) - var(--dot) / 2);z-index:2;content:"";background-color:var(--accent-80p);border:3px solid var(--white-30p);border-radius:9999px;position:absolute;top:.675em;transform:translateY(-50%)}.stalux-archive-post-item{--dot:6px;grid-template-columns:100px minmax(0,1fr);align-items:flex-start;gap:.75rem;margin-bottom:.6rem;padding:.4rem 0;line-height:1.65;display:grid;position:relative}.stalux-archive-post-item:before{box-sizing:border-box;width:var(--dot);height:var(--dot);left:calc(var(--tl-line) / 2 - var(--tl-pad) - var(--dot) / 2);z-index:1;content:"";background-color:var(--white-60p);border-radius:9999px;position:absolute;top:1.225rem;transform:translateY(-50%)}.stalux-archive-month-title{--dot:10px;color:var(--white-90p);margin:0 0 .6rem;font-size:1.05rem;font-weight:600;line-height:1.5;position:relative}.stalux-archive-month-title:before{box-sizing:border-box;width:var(--dot);height:var(--dot);left:calc(var(--tl-line) / 2 - var(--tl-pad) - var(--dot) / 2);z-index:1;content:"";background-color:#fff9;border-radius:9999px;position:absolute;top:.75em;transform:translateY(-50%)}.stalux-archive-post-link{overflow-wrap:anywhere;border-radius:3px;justify-self:start;min-width:0;max-width:100%;transition:color .16s}.stalux-archive-post-link:focus-visible{outline:2px solid var(--accent-90p);outline-offset:4px}.stalux-archive-post-date{font-variant-numeric:tabular-nums;white-space:nowrap;line-height:1.65rem}@media (hover:hover) and (pointer:fine){.stalux-archive-post-link:hover{color:var(--accent-90p);text-underline-offset:4px;text-decoration:none}}@supports not (content-visibility:auto){.stalux-archive-month-section,.stalux-archive-post-list{contain-intrinsic-block-size:auto}}@media (width<=768px){.stalux-archive-container{padding:1.5rem .5rem 2rem 1.5rem}.stalux-archive-page-header,.stalux-archive-year-section{margin-bottom:2rem}.stalux-archive-timeline-container{--tl-pad:1.5rem}.stalux-archive-year-title{--dot:14px;font-size:1.6rem}.stalux-archive-month-title{font-size:1.2rem}}@media (width<=600px){.stalux-archive-post-item{grid-template-columns:minmax(0,1fr);gap:.1rem}}@media (width<=480px){.stalux-archive-container{padding:1.5rem .5rem 2rem 1.2rem}.stalux-archive-timeline-container{--tl-pad:1.2rem;--tl-line:3px}.stalux-archive-year-title{--dot:12px;font-size:1.4rem}.stalux-archive-month-title{font-size:1.1rem}}@media (prefers-reduced-motion:reduce){.stalux-archive-post-link{transition:none}}@media print{.stalux-archive-description{display:none}.stalux-archive-month-section,.stalux-archive-post-list{content-visibility:visible;contain-intrinsic-block-size:none}}}@layer utilities,theme,base;
|
|
3
3
|
/*$vite$:1*/
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
@layer theme, base, components, utilities;
|
|
2
|
-
@layer components{.stalux-article{box-shadow:var(--surface-glass-shadow);box-sizing:border-box;background:var(--surface-glass);border-radius:18px;flex-direction:column;flex:1;width:100%;min-width:0;max-width:100%;min-height:100vh;padding:clamp(1rem,2vw,2rem);display:flex}.stalux-byline-author-bio{border-top:var(--border-thin) solid var(--white-10p);margin:var(--space-md) 0 0;width:100%;padding-top:var(--space-md);text-align:center;color:var(--white-70p);line-height:1.6;font-size:var(--font-size-small)}.stalux-byline-author-card{background:var(--black-05p);border-radius:var(--radius-lg);padding:var(--space-md);box-shadow:var(--card-box-shadow);flex-direction:column;display:flex}.stalux-license-box{border:var(--border-thin) solid var(--white-20p);margin:var(--space-lg) auto;border-radius:var(--radius-md);background-color:var(--black-10p);max-width:80%;padding:var(--space-lg);position:relative;overflow:hidden}.stalux-license-watermark{opacity:.15;transition:opacity var(--transition-normal);pointer-events:none;z-index:1;position:absolute;bottom:.5rem;right:.5rem}.stalux-pagination{border-top:var(--border-thin) solid var(--white-20p);border-bottom:var(--border-thin) solid var(--white-20p);margin:var(--space-lg) 0;width:100%;padding-top:var(--space-lg);padding-bottom:var(--space-lg)}.stalux-pagination-arrow{color:var(--white-70p);flex-shrink:0;justify-content:center;align-items:center;transition:translate .18s;display:flex}.stalux-pagination-label{margin-bottom:var(--space-xs);color:var(--accent-90p);font-weight:500;font-size:var(--font-size-small)}.stalux-pagination-link{background:var(--black-10p);outline:1px solid var(--white-10p);outline-offset:0;box-shadow:var(--shadow-sidebar);box-sizing:border-box;align-items:center;gap:var(--space-sm);border-radius:var(--radius-md);min-width:0;padding:var(--space-md);color:var(--white-90p);flex:1 1 0;text-decoration:none;transition:background-color .18s,outline-color .18s;display:flex;position:relative}.stalux-pagination-title{text-overflow:ellipsis;white-space:nowrap;max-width:100%;color:var(--white-90p);font-size:var(--font-size-base);overflow:hidden}.stalux-post-article-footer{border-top:1px solid var(--white-10p);margin-top:3rem;padding-top:2rem;animation:.22s .36s both stalux-post-content-reveal}.stalux-post-article-header{border-bottom:1px solid var(--white-10p);margin-bottom:3rem;padding-bottom:2rem;animation:.22s .36s both stalux-post-content-reveal}.stalux-post-body{box-sizing:border-box;flex:1;width:min(840px,100%);min-width:0;max-width:100%;margin:0 auto;padding:0 0 2rem;animation:.22s .36s both stalux-post-content-reveal}.stalux-post-layout{box-sizing:border-box;flex:1;grid-template-columns:280px minmax(0,1fr) 280px;gap:1.5rem;width:100%;min-width:0;max-width:1920px;margin:0 auto;padding:1.5rem 1rem;display:grid}.stalux-post-meta-item{transition:color var(--transition-fast);align-items:center;gap:.5rem;display:inline-flex}.stalux-post-meta-row{flex-basis:100%;justify-content:center;display:flex}.stalux-post-metadata{color:#ffffffb3;flex-wrap:wrap;justify-content:center;gap:1.5rem;font-size:.95rem;display:flex}.stalux-post-page-stats{border-top:1px solid var(--white-10p);color:#ffffffb3;justify-content:center;align-items:center;gap:1rem;margin-top:1rem;padding-top:.8rem;font-size:.9rem;display:flex}.stalux-post-reading-time{align-items:center;gap:.3rem;display:inline-flex}.stalux-post-source-link{background:var(--white-10p);border-top:1px solid var(--white-20p);border-right:1px solid var(--white-20p);border-left:1px solid var(--white-20p);transition:background var(--transition-fast), transform var(--transition-fast);border-radius:var(--radius-full,999px);color:var(--white-full);border-bottom:0;align-items:center;gap:.4rem;padding:.5rem 1.1rem;font-size:.85rem;font-weight:500;text-decoration:none;display:inline-flex}.stalux-post-taxonomy-item-column{background:var(--white-05p);border-left:var(--border-thick) solid var(--accent-60p);transition:color var(--transition-medium), transform var(--transition-medium);border-radius:0 var(--radius-sm) var(--radius-sm) 0;padding:var(--space-sm) var(--space-xs);color:var(--white-80p);font-size:var(--font-size-small);text-decoration:none;display:inline-flex;transform:translate(0)}.stalux-post-taxonomy-item-pill{background:var(--white-10p);transition:color var(--transition-medium), transform var(--transition-medium);white-space:nowrap;border-radius:var(--radius-full);color:var(--white-85p);font-size:var(--font-size-smaller);border:none;padding:.4rem .8rem;text-decoration:none;display:inline-block;transform:translateY(0)}.stalux-post-taxonomy-title{border-bottom:var(--border-thin) solid var(--white-20p);padding-bottom:var(--space-sm);color:var(--white-90p);font-weight:600;font-size:var(--font-size-base);margin:0}.stalux-post-title{word-break:break-word;text-align:center;color:var(--white-full);text-shadow:var(--stalux-text-shadow);margin:0 0 1.5rem;font-size:2.5rem;font-weight:700;line-height:1.2}.stalux-random-container{transition:background-color .3s,border-color .3s}.stalux-random-header{border-bottom:2px solid #0000000d;justify-content:space-between;align-items:center;margin-bottom:1em;padding-bottom:.75em;display:flex}.stalux-random-list{flex-direction:column;gap:.75em;margin:0;padding:0;list-style-type:none;transition:opacity .3s;display:flex}.stalux-random-refresh{cursor:pointer;width:2em;height:2em;color:var(--foreground-60p,#333);background:0 0;border:none;border-radius:.375em;justify-content:center;align-items:center;padding:0;transition:color .2s;display:flex}.stalux-sidebar-container{box-shadow:var(--surface-glass-shadow);padding:var(--space-md);background:var(--surface-glass);border-radius:14px;flex-direction:column;transition:box-shadow .22s,background-color .22s;display:flex}.stalux-sidebar-right{scroll-padding-bottom:8rem}.stalux-toc-item{border-left:var(--border-thick) solid transparent;transition:color var(--transition-medium), background-color var(--transition-medium), border-left-color var(--transition-medium), transform var(--transition-medium);word-break:break-word;border-radius:0 var(--radius-sm) var(--radius-sm) 0;padding:var(--space-sm) var(--space-xs);color:var(--white-70p);line-height:1.4;font-size:var(--font-size-small);text-decoration:none;display:block}.stalux-toc-title{border-bottom:var(--border-thin) solid var(--white-20p);margin:0 0 var(--space-xs);padding-bottom:var(--space-sm);color:var(--white-90p);font-weight:600;font-size:var(--font-size-base)}.stalux-license-content{z-index:2;position:relative}.stalux-random-title{color:var(--foreground-60p,#333);margin:0;font-size:1.1em;font-weight:600}.stalux-toc-list{gap:var(--space-sm);flex-direction:column;margin:0;padding:0;list-style-type:none;display:flex}.stalux-license-title{margin-top:0;margin-bottom:var(--space-sm);color:var(--white-90p);font-size:var(--font-size-subtitle)}.stalux-post-source-link-row{justify-content:center;margin-top:1.2rem;display:flex}.stalux-byline-author-section{width:100%}.stalux-license-icon{justify-content:center;align-items:center;width:120px;height:120px;display:flex}.stalux-pagination-content{flex-direction:column;min-width:0;display:flex;overflow:hidden}.stalux-post-page{flex-direction:column;width:100%;min-height:100vh;display:flex}.stalux-byline-sidebar-container,.stalux-post-footer-content{gap:var(--space-lg);flex-direction:column;display:flex}.stalux-pagination-inner{justify-content:space-between;gap:var(--space-md);display:flex}.stalux-post-taxonomy-container{gap:var(--space-xs);flex-direction:column;display:flex}.stalux-post-taxonomy-list-column{flex-direction:column}.stalux-post-taxonomy-list-wrap{flex-wrap:wrap}.stalux-post-taxonomy-empty{padding:var(--space-md) 0;text-align:center;color:var(--white-50p);font-size:var(--font-size-small)}.stalux-random-error{color:var(--accent-60p,#e74c3c)}.stalux-toc-empty{color:var(--white-60p);font-size:var(--font-size-small)}.stalux-sidebar .stalux-author-figure,.stalux-post-layout>:first-child,.stalux-post-layout>:nth-child(3){margin:0}.stalux-sidebar .stalux-author-figure figcaption{font-size:1.75rem}.stalux-sidebar-right #stalux-date-date-time #stalux-date-date{white-space:nowrap;font-size:1.5rem}.stalux-sidebar-right #stalux-date-date-time #stalux-date-time{white-space:nowrap;font-size:2.25rem}.stalux-random-refresh:active{opacity:.7}.stalux-random-refresh svg{width:1em;height:1em}.stalux-random-refresh.stalux-random-rotating svg{animation:.6s linear stalux-random-spin}.stalux-random-loading,.stalux-random-error,.stalux-random-no-more{text-align:center;color:var(--foreground-60p,#666);padding:1em;font-size:.95em}.stalux-random-list>li>a{color:var(--foreground-60p,#333);word-break:break-word;background:0 0;border-radius:.375em;padding:.75em 1em;text-decoration:none;transition:color .2s,transform .2s;display:block}.stalux-random-list>li>a:active,.stalux-post-taxonomy-item-column:active,.stalux-post-taxonomy-item-pill:active{background:var(--white-05p)}.stalux-toc-item:active,.stalux-toc-item.stalux-toc-active{color:var(--accent-90p);background-color:var(--accent-20p);border-left-color:var(--accent-80p);font-weight:500}.stalux-toc-depth-1{padding-left:var(--space-xs)}.stalux-toc-depth-2{padding-left:var(--space-lg);font-size:var(--font-size-smaller)}.stalux-toc-depth-3{font-size:var(--font-size-tiny);padding-left:2.25rem}.stalux-toc-depth-4,.stalux-toc-depth-5,.stalux-toc-depth-6{padding-left:var(--space-2xl);color:var(--white-60p);font-size:.75rem}:is(.stalux-post-taxonomy-list,.stalux-post-taxonomy-list-column,.stalux-post-taxonomy-list-wrap){gap:var(--space-sm);display:flex}:is(.stalux-sidebar,.stalux-sidebar-right){box-sizing:border-box;gap:var(--space-lg);width:100%;min-width:0;height:fit-content;max-height:calc(100vh - 40px);padding:var(--space-lg) 0;scrollbar-width:none;-ms-overflow-style:none;flex-direction:column;display:flex;position:sticky;top:20px;overflow-y:auto}.stalux-pagination-link:before,.stalux-pagination-link:after{display:none}:is(.stalux-sidebar,.stalux-sidebar-right)::-webkit-scrollbar{display:none}a.stalux-pagination-link:focus-visible{background:var(--white-05p);outline-color:var(--accent-50p);outline:2px solid var(--stalux-accent-color);outline-offset:3px}a.stalux-pagination-prev-post:focus-visible .stalux-pagination-arrow{translate:-2px}a.stalux-pagination-next-post:focus-visible .stalux-pagination-arrow{translate:2px}.stalux-pagination-link.stalux-pagination-disabled{pointer-events:none;opacity:.5;cursor:not-allowed;background:var(--black-15p)}.stalux-pagination-link.stalux-pagination-prev-post{text-align:left;margin-left:var(--space-xs)}.stalux-pagination-link.stalux-pagination-next-post{text-align:right;margin-right:var(--space-xs);justify-content:flex-end}.stalux-post-layout>:nth-child(2){min-width:0;margin:0}.stalux-post-layout :focus-visible{outline:2px solid var(--accent-80p);outline-offset:2px}.stalux-post-page-stats span{align-items:center;gap:.3rem;display:inline-flex}#stalux-post-vercount_value_page_pv{color:#ffffffb3;font-weight:600}#stalux-post-vercount_container_page_pv{transition:opacity .3s}.stalux-post-source-link:focus,.stalux-post-source-link:active{background:var(--accent,#fff2);border-top-color:var(--accent,#fff4);border-right-color:var(--accent,#fff4);border-left-color:var(--accent,#fff4);text-decoration:none}.stalux-post-source-link:after{display:none!important}.stalux-license-author,.stalux-license-url,.stalux-license-license{margin:var(--space-sm) 0;line-height:1.6;font-size:var(--font-size-small);color:var(--white-80p)}.stalux-license-box a{color:var(--accent-90p);transition:color var(--transition-normal), border-bottom-color var(--transition-normal);border-bottom:1px dashed var(--accent-50p);padding-bottom:1px;text-decoration:none;position:relative}.stalux-license-box a:active{color:var(--accent-70p)}.stalux-license-icon svg{width:100%;height:100%;display:block}.stalux-license-icon path{color:var(--white-full);fill:currentColor}@media (hover:hover) and (pointer:fine){.stalux-random-refresh:hover{color:var(--accent-60p,#06c)}.stalux-random-list>li>a:hover,.stalux-toc-item:hover,.stalux-post-taxonomy-item-column:hover,.stalux-post-taxonomy-item-pill:hover{background:var(--white-05p)}a.stalux-pagination-link:hover{background:var(--white-05p);outline-color:var(--accent-50p)}a.stalux-pagination-prev-post:hover .stalux-pagination-arrow{translate:-2px}a.stalux-pagination-next-post:hover .stalux-pagination-arrow{translate:2px}.stalux-post-source-link:hover{background:var(--accent,#fff2);border-top-color:var(--accent,#fff4);border-right-color:var(--accent,#fff4);border-left-color:var(--accent,#fff4);text-decoration:none}.stalux-license-box a:hover{color:var(--stalux-accent-color);border-bottom-color:var(--accent-80p)}.stalux-license-box:hover .stalux-license-watermark{opacity:.25}}@media (prefers-color-scheme:dark){.stalux-random-header{border-bottom-color:#ffffff1a}.stalux-random-title,.stalux-random-refresh,.stalux-random-list>li>a{color:var(--foreground-60p,#e0e0e0)}.stalux-random-loading,.stalux-random-error,.stalux-random-no-more{color:var(--foreground-60p,#b0b0b0)}}@media (prefers-contrast:more){.stalux-post-layout{gap:2rem}}@media (width<=1599px){:is(.stalux-sidebar,.stalux-sidebar-right){display:none}.stalux-post-layout{grid-template-columns:minmax(0,1fr);max-width:1312px}}@media (width<=1024px){.stalux-post-title{font-size:2rem}.stalux-post-metadata{gap:1rem}}@media (width<=768px){:is(.stalux-sidebar,.stalux-sidebar-right),.stalux-sidebar-right{display:none}.stalux-pagination{margin:var(--space-md) 0}.stalux-pagination-inner{gap:var(--space-sm)}.stalux-pagination-link{padding:var(--space-sm) var(--space-md);flex-direction:column;justify-content:center;align-items:flex-start;min-height:120px}.stalux-pagination-link.stalux-pagination-next-post{align-items:flex-end}.stalux-pagination-arrow{transform:scale(.85)}.stalux-pagination-label{margin-bottom:var(--space-xs);font-size:.75rem}.stalux-pagination-title{max-width:100%;font-size:var(--font-size-small);white-space:normal}.stalux-post-page{padding:0}.stalux-post-layout{flex-direction:column;gap:2rem;margin:0;padding:0;display:flex}.stalux-post-layout>:nth-child(2){order:1}.stalux-post-layout>:first-child{order:2}.stalux-post-layout>:nth-child(3){order:3}.stalux-article{box-sizing:border-box;width:100%;box-shadow:none;background:0 0;margin:0;padding:clamp(1rem,2vw,2rem)}.stalux-post-body{width:100%;margin:0;padding:0 0 2rem}.stalux-post-article-header{margin-bottom:2rem;padding:1rem 1rem 0}.stalux-post-title{font-size:1.75rem}.stalux-post-metadata{flex-direction:column;gap:.75rem;font-size:.85rem}.stalux-post-article-footer{margin-top:2rem;padding-top:1.5rem}.stalux-post-page-stats{margin-top:.8rem;padding-top:.6rem;font-size:.85rem}.stalux-license-box{max-width:95%;padding:var(--space-md);margin:var(--space-md) auto}.stalux-license-title{margin-bottom:var(--space-xs);font-size:var(--font-size-base)}.stalux-license-author,.stalux-license-url,.stalux-license-license{margin:var(--space-xs) 0;font-size:.85rem}.stalux-license-icon{width:80px;height:80px}}@media (width<=480px){.stalux-pagination{margin:var(--space-md) 0}.stalux-pagination-inner{gap:var(--space-sm);flex-direction:column}.stalux-pagination-link{width:100%;padding:var(--space-sm) var(--space-md);justify-content:flex-start;align-items:center;gap:var(--space-md);flex-direction:row;min-height:100px}.stalux-pagination-link.stalux-pagination-prev-post,.stalux-pagination-link.stalux-pagination-next-post{text-align:left;align-items:center;margin-left:0;margin-right:0}.stalux-pagination-link.stalux-pagination-next-post{justify-content:flex-start}.stalux-pagination-title{white-space:normal}.stalux-post-layout{gap:1.25rem;padding:0}.stalux-license-box{max-width:100%;padding:var(--space-sm);margin:var(--space-md) 0}.stalux-license-title{margin-bottom:var(--space-2xs);font-size:var(--font-size-small)}.stalux-license-author,.stalux-license-url,.stalux-license-license{margin:var(--space-2xs) 0;font-size:.8rem}.stalux-license-icon{width:60px;height:60px}}@media (prefers-reduced-motion:reduce){.stalux-post-page *{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}@media print{.stalux-post-layout{grid-template-columns:1fr;gap:2rem}.stalux-post-layout>:first-child,.stalux-post-layout>:nth-child(3){display:none}}}@layer utilities,theme,base;
|
|
2
|
+
@layer components{.stalux-article{box-shadow:var(--surface-glass-shadow);box-sizing:border-box;background:var(--surface-glass);border-radius:18px;flex-direction:column;flex:1;width:100%;min-width:0;max-width:100%;min-height:100vh;padding:clamp(1rem,2vw,2rem);display:flex}.stalux-byline-author-bio{border-top:var(--border-thin) solid var(--white-10p);margin:var(--space-md) 0 0;width:100%;padding-top:var(--space-md);text-align:center;color:var(--white-70p);line-height:1.6;font-size:var(--font-size-small)}.stalux-byline-author-card{background:var(--black-05p);border-radius:var(--radius-lg);padding:var(--space-md);box-shadow:var(--card-box-shadow);flex-direction:column;display:flex}.stalux-license-box{border:var(--border-thin) solid var(--white-20p);margin:var(--space-lg) auto;border-radius:var(--radius-md);background-color:var(--black-10p);max-width:80%;padding:var(--space-lg);position:relative;overflow:hidden}.stalux-license-watermark{opacity:.15;transition:opacity var(--transition-normal);pointer-events:none;z-index:1;position:absolute;bottom:.5rem;right:.5rem}.stalux-pagination{border-top:var(--border-thin) solid var(--white-20p);border-bottom:var(--border-thin) solid var(--white-20p);margin:var(--space-lg) 0;width:100%;padding-top:var(--space-lg);padding-bottom:var(--space-lg)}.stalux-pagination-arrow{color:var(--white-70p);flex-shrink:0;justify-content:center;align-items:center;transition:translate .18s;display:flex}.stalux-pagination-label{margin-bottom:var(--space-xs);color:var(--accent-90p);font-weight:500;font-size:var(--font-size-small)}.stalux-pagination-link{background:var(--black-10p);outline:1px solid var(--white-10p);outline-offset:0;box-shadow:var(--shadow-sidebar);box-sizing:border-box;align-items:center;gap:var(--space-sm);border-radius:var(--radius-md);min-width:0;padding:var(--space-md);color:var(--white-90p);flex:1 1 0;text-decoration:none;transition:background-color .18s,outline-color .18s;display:flex;position:relative}.stalux-pagination-title{text-overflow:ellipsis;white-space:nowrap;max-width:100%;color:var(--white-90p);font-size:var(--font-size-base);overflow:hidden}.stalux-post-article-footer{border-top:1px solid var(--white-10p);margin-top:3rem;padding-top:2rem;animation:.22s .36s both stalux-post-content-reveal}.stalux-post-article-header{border-bottom:1px solid var(--white-10p);margin-bottom:3rem;padding-bottom:2rem;animation:.22s .36s both stalux-post-content-reveal}.stalux-post-body{box-sizing:border-box;flex:1;width:min(840px,100%);min-width:0;max-width:100%;margin:0 auto;padding:0 0 2rem;animation:.22s .36s both stalux-post-content-reveal}.stalux-post-layout{box-sizing:border-box;flex:1;grid-template-columns:280px minmax(0,1fr) 280px;gap:1.5rem;width:100%;min-width:0;max-width:1544px;margin:0 auto;padding:1.5rem 1rem;display:grid}.stalux-post-meta-item{transition:color var(--transition-fast);align-items:center;gap:.5rem;display:inline-flex}.stalux-post-meta-row{flex-basis:100%;justify-content:center;display:flex}.stalux-post-metadata{color:#ffffffb3;flex-wrap:wrap;justify-content:center;gap:1.5rem;font-size:.95rem;display:flex}.stalux-post-page-stats{border-top:1px solid var(--white-10p);color:#ffffffb3;justify-content:center;align-items:center;gap:1rem;margin-top:1rem;padding-top:.8rem;font-size:.9rem;display:flex}.stalux-post-reading-time{align-items:center;gap:.3rem;display:inline-flex}.stalux-post-source-link{background:var(--white-10p);border-top:1px solid var(--white-20p);border-right:1px solid var(--white-20p);border-left:1px solid var(--white-20p);transition:background var(--transition-fast), transform var(--transition-fast);border-radius:var(--radius-full,999px);color:var(--white-full);border-bottom:0;align-items:center;gap:.4rem;padding:.5rem 1.1rem;font-size:.85rem;font-weight:500;text-decoration:none;display:inline-flex}.stalux-post-taxonomy-item-column{background:var(--white-05p);border-left:var(--border-thick) solid var(--accent-60p);transition:color var(--transition-medium), transform var(--transition-medium);border-radius:0 var(--radius-sm) var(--radius-sm) 0;padding:var(--space-sm) var(--space-xs);color:var(--white-80p);font-size:var(--font-size-small);text-decoration:none;display:inline-flex;transform:translate(0)}.stalux-post-taxonomy-item-pill{background:var(--white-10p);transition:color var(--transition-medium), transform var(--transition-medium);white-space:nowrap;border-radius:var(--radius-full);color:var(--white-85p);font-size:var(--font-size-smaller);border:none;padding:.4rem .8rem;text-decoration:none;display:inline-block;transform:translateY(0)}.stalux-post-taxonomy-title{border-bottom:var(--border-thin) solid var(--white-20p);padding-bottom:var(--space-sm);color:var(--white-90p);font-weight:600;font-size:var(--font-size-base);margin:0}.stalux-post-title{word-break:break-word;text-align:center;color:var(--white-full);text-shadow:var(--stalux-text-shadow);margin:0 0 1.5rem;font-size:2.5rem;font-weight:700;line-height:1.2}.stalux-random-container{transition:background-color .3s,border-color .3s}.stalux-random-header{border-bottom:2px solid #0000000d;justify-content:space-between;align-items:center;margin-bottom:1em;padding-bottom:.75em;display:flex}.stalux-random-list{flex-direction:column;gap:.75em;margin:0;padding:0;list-style-type:none;transition:opacity .3s;display:flex}.stalux-random-refresh{cursor:pointer;width:2em;height:2em;color:var(--foreground-60p,#333);background:0 0;border:none;border-radius:.375em;justify-content:center;align-items:center;padding:0;transition:color .2s;display:flex}.stalux-sidebar-container{box-shadow:var(--surface-glass-shadow);padding:var(--space-md);background:var(--surface-glass);border-radius:14px;flex-direction:column;transition:box-shadow .22s,background-color .22s;display:flex}.stalux-sidebar-right{scroll-padding-bottom:8rem}.stalux-toc-item{border-left:var(--border-thick) solid transparent;transition:color var(--transition-medium), background-color var(--transition-medium), border-left-color var(--transition-medium), transform var(--transition-medium);word-break:break-word;border-radius:0 var(--radius-sm) var(--radius-sm) 0;padding:var(--space-sm) var(--space-xs);color:var(--white-70p);line-height:1.4;font-size:var(--font-size-small);text-decoration:none;display:block}.stalux-toc-title{border-bottom:var(--border-thin) solid var(--white-20p);margin:0 0 var(--space-xs);padding-bottom:var(--space-sm);color:var(--white-90p);font-weight:600;font-size:var(--font-size-base)}.stalux-license-content{z-index:2;position:relative}.stalux-random-title{color:var(--foreground-60p,#333);margin:0;font-size:1.1em;font-weight:600}.stalux-toc-list{gap:var(--space-sm);flex-direction:column;margin:0;padding:0;list-style-type:none;display:flex}.stalux-license-title{margin-top:0;margin-bottom:var(--space-sm);color:var(--white-90p);font-size:var(--font-size-subtitle)}.stalux-post-source-link-row{justify-content:center;margin-top:1.2rem;display:flex}.stalux-byline-author-section{width:100%}.stalux-license-icon{justify-content:center;align-items:center;width:120px;height:120px;display:flex}.stalux-pagination-content{flex-direction:column;min-width:0;display:flex;overflow:hidden}.stalux-post-page{flex-direction:column;width:100%;min-height:100vh;display:flex}.stalux-byline-sidebar-container,.stalux-post-footer-content{gap:var(--space-lg);flex-direction:column;display:flex}.stalux-pagination-inner{justify-content:space-between;gap:var(--space-md);display:flex}.stalux-post-taxonomy-container{gap:var(--space-xs);flex-direction:column;display:flex}.stalux-post-taxonomy-list-column{flex-direction:column}.stalux-post-taxonomy-list-wrap{flex-wrap:wrap}.stalux-post-taxonomy-empty{padding:var(--space-md) 0;text-align:center;color:var(--white-50p);font-size:var(--font-size-small)}.stalux-random-error{color:var(--accent-60p,#e74c3c)}.stalux-toc-empty{color:var(--white-60p);font-size:var(--font-size-small)}.stalux-sidebar .stalux-author-figure,.stalux-post-layout>:first-child,.stalux-post-layout>:nth-child(3){margin:0}.stalux-sidebar .stalux-author-figure figcaption{font-size:1.75rem}.stalux-sidebar-right #stalux-date-date-time #stalux-date-date{white-space:nowrap;font-size:1.5rem}.stalux-sidebar-right #stalux-date-date-time #stalux-date-time{white-space:nowrap;font-size:2.25rem}.stalux-random-refresh:active{opacity:.7}.stalux-random-refresh svg{width:1em;height:1em}.stalux-random-refresh.stalux-random-rotating svg{animation:.6s linear stalux-random-spin}.stalux-random-loading,.stalux-random-error,.stalux-random-no-more{text-align:center;color:var(--foreground-60p,#666);padding:1em;font-size:.95em}.stalux-random-list>li>a{color:var(--foreground-60p,#333);word-break:break-word;background:0 0;border-radius:.375em;padding:.75em 1em;text-decoration:none;transition:color .2s,transform .2s;display:block}.stalux-random-list>li>a:active,.stalux-post-taxonomy-item-column:active,.stalux-post-taxonomy-item-pill:active{background:var(--white-05p)}.stalux-toc-item:active,.stalux-toc-item.stalux-toc-active{color:var(--accent-90p);background-color:var(--accent-20p);border-left-color:var(--accent-80p);font-weight:500}.stalux-toc-depth-1{padding-left:var(--space-xs)}.stalux-toc-depth-2{padding-left:var(--space-lg);font-size:var(--font-size-smaller)}.stalux-toc-depth-3{font-size:var(--font-size-tiny);padding-left:2.25rem}.stalux-toc-depth-4,.stalux-toc-depth-5,.stalux-toc-depth-6{padding-left:var(--space-2xl);color:var(--white-60p);font-size:.75rem}:is(.stalux-post-taxonomy-list,.stalux-post-taxonomy-list-column,.stalux-post-taxonomy-list-wrap){gap:var(--space-sm);display:flex}:is(.stalux-sidebar,.stalux-sidebar-right){box-sizing:border-box;gap:var(--space-lg);width:100%;min-width:0;height:fit-content;max-height:calc(100vh - 40px);padding:var(--space-lg) 0;scrollbar-width:none;-ms-overflow-style:none;flex-direction:column;display:flex;position:sticky;top:20px;overflow-y:auto}.stalux-pagination-link:before,.stalux-pagination-link:after{display:none}:is(.stalux-sidebar,.stalux-sidebar-right)::-webkit-scrollbar{display:none}a.stalux-pagination-link:focus-visible{background:var(--white-05p);outline-color:var(--accent-50p);outline:2px solid var(--stalux-accent-color);outline-offset:3px}a.stalux-pagination-prev-post:focus-visible .stalux-pagination-arrow{translate:-2px}a.stalux-pagination-next-post:focus-visible .stalux-pagination-arrow{translate:2px}.stalux-pagination-link.stalux-pagination-disabled{pointer-events:none;opacity:.5;cursor:not-allowed;background:var(--black-15p)}.stalux-pagination-link.stalux-pagination-prev-post{text-align:left;margin-left:var(--space-xs)}.stalux-pagination-link.stalux-pagination-next-post{text-align:right;margin-right:var(--space-xs);justify-content:flex-end}.stalux-post-layout>:nth-child(2){min-width:0;margin:0}.stalux-post-layout :focus-visible{outline:2px solid var(--accent-80p);outline-offset:2px}.stalux-post-page-stats span{align-items:center;gap:.3rem;display:inline-flex}#stalux-post-vercount_value_page_pv{color:#ffffffb3;font-weight:600}#stalux-post-vercount_container_page_pv{transition:opacity .3s}.stalux-post-source-link:focus,.stalux-post-source-link:active{background:var(--accent,#fff2);border-top-color:var(--accent,#fff4);border-right-color:var(--accent,#fff4);border-left-color:var(--accent,#fff4);text-decoration:none}.stalux-post-source-link:after{display:none!important}.stalux-license-author,.stalux-license-url,.stalux-license-license{margin:var(--space-sm) 0;line-height:1.6;font-size:var(--font-size-small);color:var(--white-80p)}.stalux-license-box a{color:var(--accent-90p);transition:color var(--transition-normal), border-bottom-color var(--transition-normal);border-bottom:1px dashed var(--accent-50p);padding-bottom:1px;text-decoration:none;position:relative}.stalux-license-box a:active{color:var(--accent-70p)}.stalux-license-icon svg{width:100%;height:100%;display:block}.stalux-license-icon path{color:var(--white-full);fill:currentColor}@media (hover:hover) and (pointer:fine){.stalux-random-refresh:hover{color:var(--accent-60p,#06c)}.stalux-random-list>li>a:hover,.stalux-toc-item:hover,.stalux-post-taxonomy-item-column:hover,.stalux-post-taxonomy-item-pill:hover{background:var(--white-05p)}a.stalux-pagination-link:hover{background:var(--white-05p);outline-color:var(--accent-50p)}a.stalux-pagination-prev-post:hover .stalux-pagination-arrow{translate:-2px}a.stalux-pagination-next-post:hover .stalux-pagination-arrow{translate:2px}.stalux-post-source-link:hover{background:var(--accent,#fff2);border-top-color:var(--accent,#fff4);border-right-color:var(--accent,#fff4);border-left-color:var(--accent,#fff4);text-decoration:none}.stalux-license-box a:hover{color:var(--stalux-accent-color);border-bottom-color:var(--accent-80p)}.stalux-license-box:hover .stalux-license-watermark{opacity:.25}}@media (prefers-color-scheme:dark){.stalux-random-header{border-bottom-color:#ffffff1a}.stalux-random-title,.stalux-random-refresh,.stalux-random-list>li>a{color:var(--foreground-60p,#e0e0e0)}.stalux-random-loading,.stalux-random-error,.stalux-random-no-more{color:var(--foreground-60p,#b0b0b0)}}@media (prefers-contrast:more){.stalux-post-layout{gap:2rem}}@media (width<=1599px){:is(.stalux-sidebar,.stalux-sidebar-right){display:none}.stalux-post-layout{grid-template-columns:minmax(0,1fr);max-width:936px}}@media (width<=1024px){.stalux-post-title{font-size:2rem}.stalux-post-metadata{gap:1rem}}@media (width<=768px){:is(.stalux-sidebar,.stalux-sidebar-right),.stalux-sidebar-right{display:none}.stalux-pagination{margin:var(--space-md) 0}.stalux-pagination-inner{gap:var(--space-sm)}.stalux-pagination-link{padding:var(--space-sm) var(--space-md);flex-direction:column;justify-content:center;align-items:flex-start;min-height:120px}.stalux-pagination-link.stalux-pagination-next-post{align-items:flex-end}.stalux-pagination-arrow{transform:scale(.85)}.stalux-pagination-label{margin-bottom:var(--space-xs);font-size:.75rem}.stalux-pagination-title{max-width:100%;font-size:var(--font-size-small);white-space:normal}.stalux-post-page{padding:0}.stalux-post-layout{flex-direction:column;gap:2rem;margin:0;padding:0;display:flex}.stalux-post-layout>:nth-child(2){order:1}.stalux-post-layout>:first-child{order:2}.stalux-post-layout>:nth-child(3){order:3}.stalux-article{box-sizing:border-box;width:100%;box-shadow:none;background:0 0;margin:0;padding:clamp(1rem,2vw,2rem)}.stalux-post-body{width:100%;margin:0;padding:0 0 2rem}.stalux-post-article-header{margin-bottom:2rem;padding:1rem 1rem 0}.stalux-post-title{font-size:1.75rem}.stalux-post-metadata{flex-direction:column;gap:.75rem;font-size:.85rem}.stalux-post-article-footer{margin-top:2rem;padding-top:1.5rem}.stalux-post-page-stats{margin-top:.8rem;padding-top:.6rem;font-size:.85rem}.stalux-license-box{max-width:95%;padding:var(--space-md);margin:var(--space-md) auto}.stalux-license-title{margin-bottom:var(--space-xs);font-size:var(--font-size-base)}.stalux-license-author,.stalux-license-url,.stalux-license-license{margin:var(--space-xs) 0;font-size:.85rem}.stalux-license-icon{width:80px;height:80px}}@media (width<=480px){.stalux-pagination{margin:var(--space-md) 0}.stalux-pagination-inner{gap:var(--space-sm);flex-direction:column}.stalux-pagination-link{width:100%;padding:var(--space-sm) var(--space-md);justify-content:flex-start;align-items:center;gap:var(--space-md);flex-direction:row;min-height:100px}.stalux-pagination-link.stalux-pagination-prev-post,.stalux-pagination-link.stalux-pagination-next-post{text-align:left;align-items:center;margin-left:0;margin-right:0}.stalux-pagination-link.stalux-pagination-next-post{justify-content:flex-start}.stalux-pagination-title{white-space:normal}.stalux-post-layout{gap:1.25rem;padding:0}.stalux-license-box{max-width:100%;padding:var(--space-sm);margin:var(--space-md) 0}.stalux-license-title{margin-bottom:var(--space-2xs);font-size:var(--font-size-small)}.stalux-license-author,.stalux-license-url,.stalux-license-license{margin:var(--space-2xs) 0;font-size:.8rem}.stalux-license-icon{width:60px;height:60px}}@media (prefers-reduced-motion:reduce){.stalux-post-page *{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}@media print{.stalux-post-layout{grid-template-columns:1fr;gap:2rem}.stalux-post-layout>:first-child,.stalux-post-layout>:nth-child(3){display:none}}}@layer utilities,theme,base;
|
|
3
3
|
/*$vite$:1*/
|
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:rect(0, 0, 0, 0);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{-webkit-user-select:none;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{-webkit-backdrop-filter:blur(10px);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-home-navs{order:-1;max-width:100%}.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);-webkit-backdrop-filter:blur(8px);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:1001;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:100vh;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%}.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{margin-bottom:.5em;font-size:2em}#stalux-date-date-time #stalux-date-time{font-size:3em}.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:rect(0, 0, 0, 0);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[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-summary::-webkit-details-marker{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<=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-navs{flex-direction:column;align-items:center;gap:.5em}.stalux-home-navs nav{width:100%}#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){.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);-webkit-backdrop-filter:blur(20px);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-post-content-reveal{0%{opacity:0}to{opacity:1}}@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-shrink{flex-shrink:1}.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))}.border{border-width:1px}.px{padding-left:1rem;padding-right:1rem}.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}:is(html,body) main{flex:1}html,body{scrollbar-color:#4a4a4a #2a2a2a;font-family:var(--font-body), "Noto Sans SC", "Noto Sans CJK SC", system-ui, -apple-system, sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizelegibility;display:block}html[data-clarity-id]{opacity:1!important}a{color:inherit;cursor:pointer;-webkit-text-decoration-skip-ink:auto;text-decoration-skip-ink:auto;background-color:#0000;text-decoration:none;transition:color .2s,text-shadow .2s;position:relative}.a-none{cursor:pointer;-webkit-text-decoration-skip-ink:auto;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([class*=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([class*=card]):not(.stalux-nav-link):focus-visible:after,a:not(.a-none):not([class*=card]):not(.stalux-nav-link):active:after{transform:scaleX(1)}@media (hover:hover) and (pointer:fine){a:not(.a-none):not([class*=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:100vh}:root{--stalux-bg-color:#202020;--stalux-bg-filter:none;--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:rgba(var(--stalux-accent-rgb), .9);--accent-85p:rgba(var(--stalux-accent-rgb), .85);--accent-80p:rgba(var(--stalux-accent-rgb), .8);--accent-70p:rgba(var(--stalux-accent-rgb), .7);--accent-60p:rgba(var(--stalux-accent-rgb), .6);--accent-50p:rgba(var(--stalux-accent-rgb), .5);--accent-40p:rgba(var(--stalux-accent-rgb), .4);--accent-30p:rgba(var(--stalux-accent-rgb), .3);--accent-20p:rgba(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;--lightningcss-light:initial;--lightningcss-dark: ;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);-webkit-backdrop-filter:blur(16px);background:linear-gradient(#0c0e122e,#0c0e12b8)}}@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-old(stalux-page){transform-origin:top}::view-transition-new(stalux-page){transform-origin:top}::view-transition-group(*){animation-duration:.24s;animation-timing-function:cubic-bezier(.22,.72,.22,1)}@media (prefers-reduced-motion:reduce){::view-transition-group(*){animation-duration:1ms!important;animation-delay:0s!important}::view-transition-old(*){animation-duration:1ms!important;animation-delay:0s!important}::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:rect(0, 0, 0, 0);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{-webkit-user-select:none;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{-webkit-backdrop-filter:blur(10px);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-home-navs{order:-1;max-width:100%}.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);-webkit-backdrop-filter:blur(8px);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:1001;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:100vh;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%}.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{margin-bottom:.5em;font-size:2em}#stalux-date-date-time #stalux-date-time{font-size:3em}.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:rect(0, 0, 0, 0);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[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-summary::-webkit-details-marker{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<=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-navs{flex-direction:column;align-items:center;gap:.5em}.stalux-home-navs nav{width:100%}#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){.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);-webkit-backdrop-filter:blur(20px);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-post-content-reveal{0%{opacity:0}to{opacity:1}}@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))}.border{border-width:1px}.px{padding-left:1rem;padding-right:1rem}.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}:is(html,body) main{flex:1}html,body{scrollbar-color:#4a4a4a #2a2a2a;font-family:var(--font-body), "Noto Sans SC", "Noto Sans CJK SC", system-ui, -apple-system, sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizelegibility;display:block}html[data-clarity-id]{opacity:1!important}a{color:inherit;cursor:pointer;-webkit-text-decoration-skip-ink:auto;text-decoration-skip-ink:auto;background-color:#0000;text-decoration:none;transition:color .2s,text-shadow .2s;position:relative}.a-none{cursor:pointer;-webkit-text-decoration-skip-ink:auto;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([class*=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([class*=card]):not(.stalux-nav-link):focus-visible:after,a:not(.a-none):not([class*=card]):not(.stalux-nav-link):active:after{transform:scaleX(1)}@media (hover:hover) and (pointer:fine){a:not(.a-none):not([class*=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:100vh}:root{--stalux-bg-color:#202020;--stalux-bg-filter:none;--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:rgba(var(--stalux-accent-rgb), .9);--accent-85p:rgba(var(--stalux-accent-rgb), .85);--accent-80p:rgba(var(--stalux-accent-rgb), .8);--accent-70p:rgba(var(--stalux-accent-rgb), .7);--accent-60p:rgba(var(--stalux-accent-rgb), .6);--accent-50p:rgba(var(--stalux-accent-rgb), .5);--accent-40p:rgba(var(--stalux-accent-rgb), .4);--accent-30p:rgba(var(--stalux-accent-rgb), .3);--accent-20p:rgba(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;--lightningcss-light:initial;--lightningcss-dark: ;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);-webkit-backdrop-filter:blur(16px);background:linear-gradient(#0c0e122e,#0c0e12b8)}}@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-old(stalux-page){transform-origin:top}::view-transition-new(stalux-page){transform-origin:top}::view-transition-group(*){animation-duration:.24s;animation-timing-function:cubic-bezier(.22,.72,.22,1)}@media (prefers-reduced-motion:reduce){::view-transition-group(*){animation-duration:1ms!important;animation-delay:0s!important}::view-transition-old(*){animation-duration:1ms!important;animation-delay:0s!important}::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*/
|
|
@@ -41,7 +41,11 @@ export function getSiteData(entries: CollectionEntry<"config">[]): SiteData {
|
|
|
41
41
|
if (!site) throw new Error("Missing site config");
|
|
42
42
|
// Content collection loaders may omit Zod defaults from parsed YAML data.
|
|
43
43
|
// Keep the public default stable for older consumer configs that lack this key.
|
|
44
|
-
return {
|
|
44
|
+
return {
|
|
45
|
+
...site,
|
|
46
|
+
accentColor: site.accentColor ?? "#EAB308",
|
|
47
|
+
weather: { enabled: site.weather?.enabled ?? false },
|
|
48
|
+
};
|
|
45
49
|
}
|
|
46
50
|
|
|
47
51
|
export function getAuthorData(entries: CollectionEntry<"config">[]): AuthorData {
|