update 2026-09-24 10:46:53

This commit is contained in:
action committed 2026-09-24 10:46:53 +08:00
1 parent 907a158127
commit b31a5c3878
4914 files changed
-1716179

No files matched your search

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12h4l3 8l4 -16l3 8h4" /></svg>

Before

Width:  |  Height:  |  Size: 224 B

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 10a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" /><path d="M6 4v4" /><path d="M6 12v8" /><path d="M10 16a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" /><path d="M12 4v10" /><path d="M12 18v2" /><path d="M16 7a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" /><path d="M18 4v1" /><path d="M18 9v11" /></svg>

Before

Width:  |  Height:  |  Size: 452 B

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4" /><path d="M4 15a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4" /><path d="M14 15a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4" /><path d="M14 7l6 0" /><path d="M17 4l0 6" /></svg>

Before

Width:  |  Height:  |  Size: 502 B

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" width="24" height="24" fill="#ffffff" style="opacity:1;"><path fill-rule="evenodd" d="M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06" clip-rule="evenodd"/></svg>

Before

Width:  |  Height:  |  Size: 309 B

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" width="24" height="24" fill="#000000" style="opacity:1;"><path fill-rule="evenodd" d="M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06" clip-rule="evenodd"/></svg>

Before

Width:  |  Height:  |  Size: 309 B

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" width="24" height="24" fill="#000000" style="opacity:1;"><path fill-rule="evenodd" d="M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10L8.22 6.28a.75.75 0 0 1 0-1.06" clip-rule="evenodd"/></svg>

Before

Width:  |  Height:  |  Size: 309 B

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3l8 4.5l0 9l-8 4.5l-8 -4.5l0 -9l8 -4.5" /><path d="M12 12l8 -4.5" /><path d="M12 12l0 9" /><path d="M12 12l-8 -4.5" /></svg>

Before

Width:  |  Height:  |  Size: 319 B

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 4h6v6h-6l0 -6" /><path d="M14 4h6v6h-6l0 -6" /><path d="M4 14h6v6h-6l0 -6" /><path d="M14 17a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" /></svg>

Before

Width:  |  Height:  |  Size: 325 B

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 13a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -6" /><path d="M15 9a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -10" /><path d="M9 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -14" /><path d="M4 20h14" /></svg>

Before

Width:  |  Height:  |  Size: 482 B

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path d="M918.8 83.7c-43.5-30.3-104-19.5-134.6 24.1l-425.8 606-127-135.7c-36.4-38.9-98.1-41.1-137-4.8-39 36.2-41.1 97.7-4.7 136.6l206.5 220.7c4.7 5 9.8 9.4 15.1 13.1.7.5 1.4 1 2.2 1.5 43.5 30.3 104 19.5 134.6-24.1l494-703.2c30.7-43.5 20.1-103.9-23.3-134.2z"/></svg>

Before

Width:  |  Height:  |  Size: 330 B

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 6a1 1 0 0 1 1 -1h12a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-12a1 1 0 0 1 -1 -1l0 -12" /><path d="M9 9h6v6h-6l0 -6" /><path d="M3 10h2" /><path d="M3 14h2" /><path d="M10 3v2" /><path d="M14 3v2" /><path d="M21 10h-2" /><path d="M21 14h-2" /><path d="M14 21v-2" /><path d="M10 21v-2" /></svg>

Before

Width:  |  Height:  |  Size: 478 B

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 9v4" /><path d="M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0" /><path d="M12 16h.01" /></svg>

Before

Width:  |  Height:  |  Size: 380 B

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" /><path d="M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M13.41 10.59l2.59 -2.59" /><path d="M7 12a5 5 0 0 1 5 -5" /></svg>

Before

Width:  |  Height:  |  Size: 354 B

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="24" height="24" fill="#000000" style="opacity:1;"><path fill-rule="evenodd" d="M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0M9 5a1 1 0 1 1-2 0a1 1 0 0 1 2 0M6.75 8a.75.75 0 0 0 0 1.5h.75v1.75a.75.75 0 0 0 1.5 0v-2.5A.75.75 0 0 0 8.25 8z" clip-rule="evenodd"/></svg>

Before

Width:  |  Height:  |  Size: 322 B

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3l8 4.5l0 9l-8 4.5l-8 -4.5l0 -9l8 -4.5" /><path d="M12 12l8 -4.5" /><path d="M12 12l0 9" /><path d="M12 12l-8 -4.5" /><path d="M16 5.25l-8 4.5" /></svg>

Before

Width:  |  Height:  |  Size: 347 B

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 4h4l2 5l-2.5 1.5a11 11 0 0 0 5 5l1.5 -2.5l5 2v4a2 2 0 0 1 -2 2a16 16 0 0 1 -15 -15a2 2 0 0 1 2 -2" /></svg>

Before

Width:  |  Height:  |  Size: 301 B

@@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
<circle cx="12" cy="12" r="6"/>
</svg>

Before

Width:  |  Height:  |  Size: 122 B

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 11a8.1 8.1 0 0 0 -11.271 -6.305m-2.41 1.624a8.083 8.083 0 0 0 -1.819 2.681m-.5 -4v4h4" /><path d="M4 13a8.1 8.1 0 0 0 13.671 4.691m2.329 -1.691v-1h-1" /><path d="M3 3l18 18" /></svg>

Before

Width:  |  Height:  |  Size: 377 B

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4" /><path d="M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4" /></svg>

Before

Width:  |  Height:  |  Size: 291 B

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 15a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2l0 -4" /><path d="M17 17l0 .01" /><path d="M13 17l0 .01" /><path d="M15 13l0 -2" /><path d="M11.75 8.75a4 4 0 0 1 6.5 0" /><path d="M8.5 6.5a8 8 0 0 1 13 0" /></svg>

Before

Width:  |  Height:  |  Size: 430 B

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" /><path d="M21 21l-6 -6" /></svg>

Before

Width:  |  Height:  |  Size: 268 B

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 7a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-2" /><path d="M3 15a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3l0 -2" /><path d="M7 8l0 .01" /><path d="M7 16l0 .01" /><path d="M11 8h6" /><path d="M11 16h6" /></svg>

Before

Width:  |  Height:  |  Size: 457 B

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065" /><path d="M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0" /></svg>

Before

Width:  |  Height:  |  Size: 770 B

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3a12 12 0 0 0 8.5 3a12 12 0 0 1 -8.5 15a12 12 0 0 1 -8.5 -15a12 12 0 0 0 8.5 -3" /></svg>

Before

Width:  |  Height:  |  Size: 284 B

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path opacity=".05" d="M512 85.333c235.648 0 426.667 191.019 426.667 426.667S747.648 938.667 512 938.667 85.333 747.648 85.333 512 276.352 85.333 512 85.333zm0 128a298.667 298.667 0 1 0 0 597.334 298.667 298.667 0 0 0 0-597.334z"/><path d="M813.696 813.696c166.613-166.613 166.613-436.779 0-603.392s-436.779-166.613-603.392 0a64 64 0 0 0 90.496 90.496 298.667 298.667 0 1 1 422.4 422.4 64 64 0 0 0 90.496 90.496z"/></svg>

Before

Width:  |  Height:  |  Size: 486 B

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6.5 7.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3" /></svg>

Before

Width:  |  Height:  |  Size: 411 B

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0" /><path d="M3.6 9h16.8" /><path d="M3.6 15h16.8" /><path d="M11.5 3a17 17 0 0 0 0 18" /><path d="M12.5 3a17 17 0 0 1 0 18" /></svg>

Before

Width:  |  Height:  |  Size: 360 B

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6l-12 12" /><path d="M6 6l12 12" /></svg>

Before

Width:  |  Height:  |  Size: 236 B

@@ -1,16 +0,0 @@
/**
* Document foundation — shared by main.css and login.css.
* Solid bg on html/body — one paint path with header (no body::before;
* fixed pseudo made the same var(--bg) look mismatched).
*/
html {
@apply bg-bg min-h-dvh font-sans scheme-light;
&[data-darkmode="true"] {
@apply scheme-dark;
}
body {
@apply bg-bg min-h-dvh;
}
}
@@ -1,90 +0,0 @@
*:not(html) {
@apply [scrollbar-color:var(--text-muted)_transparent] [scrollbar-width:thin];
}
html {
/* Stable gutter: short pages and open modals (body overflow hidden) would
otherwise drop the classic scrollbar and shift the whole layout. */
@apply [scrollbar-color:var(--text-muted)_var(--surface)] [scrollbar-gutter:stable] [scrollbar-width:thin];
body {
@apply text-text relative flex min-h-dvh flex-col text-sm leading-relaxed font-normal;
&.modal-overlay-active {
@apply h-screen overflow-hidden;
}
}
}
h1,
h2,
h3,
h4,
h5,
h6 {
@apply text-text font-sans leading-tight font-semibold tracking-tight;
}
h1 {
@apply mb-4 pl-6 text-3xl max-md:pl-4 max-md:text-2xl;
}
h2 {
@apply mb-4 pl-5 text-2xl max-md:mb-2 max-md:pl-4 max-md:text-xl;
}
h3 {
@apply mb-4 text-xl font-semibold tracking-tight max-md:mb-2 max-md:text-lg;
}
h4 {
@apply mb-2 text-lg max-md:text-base;
}
h5 {
@apply mb-2 text-base max-md:text-sm;
}
h6 {
@apply mb-2 text-sm max-md:text-xs;
}
hr {
@apply border-hairline my-6 border-t max-md:my-4;
}
strong {
@apply font-semibold tracking-tight;
}
abbr {
@apply cursor-help;
}
p {
@apply text-text text-sm leading-relaxed;
}
pre {
@apply text-text-muted border-hairline bg-surface-sunken block rounded-xl border px-3 py-2 font-mono text-sm leading-relaxed wrap-break-word whitespace-pre-wrap;
}
code {
@apply text-text-muted bg-surface-sunken rounded px-2 py-1 font-mono text-sm;
}
a {
@apply text-link no-underline hover:underline;
}
var {
@apply text-link font-mono;
}
small {
@apply text-text text-xs font-normal;
}
em {
@apply text-text-muted font-medium italic;
}
@@ -1,32 +0,0 @@
/* Shared encoded icon payloads. Referencing these variables from masks keeps
Vite from inlining the same SVG once per selector and vendor declaration. */
:root {
@apply [--icon-activity:url('@assets/icons/activity.svg')];
@apply [--icon-adjustments:url('@assets/icons/adjustments.svg')];
@apply [--icon-apps:url('@assets/icons/apps.svg')];
@apply [--icon-arrow-down:url('@assets/icons/arrow-down.svg')];
@apply [--icon-arrow-down-dark:url('@assets/icons/arrow-down-dark.svg')];
@apply [--icon-arrow-right:url('@assets/icons/arrow-right.svg')];
@apply [--icon-box:url('@assets/icons/box.svg')];
@apply [--icon-category:url('@assets/icons/category.svg')];
@apply [--icon-chart-bar:url('@assets/icons/chart-bar.svg')];
@apply [--icon-check:url('@assets/icons/check.svg')];
@apply [--icon-cpu:url('@assets/icons/cpu.svg')];
@apply [--icon-error:url('@assets/icons/error.svg')];
@apply [--icon-gauge:url('@assets/icons/gauge.svg')];
@apply [--icon-info:url('@assets/icons/info.svg')];
@apply [--icon-package:url('@assets/icons/package.svg')];
@apply [--icon-phone:url('@assets/icons/phone.svg')];
@apply [--icon-radio:url('@assets/icons/radio.svg')];
@apply [--icon-refresh:url('@assets/icons/refresh.svg')];
@apply [--icon-refresh-off:url('@assets/icons/refresh-off.svg')];
@apply [--icon-router:url('@assets/icons/router.svg')];
@apply [--icon-search:url('@assets/icons/search.svg')];
@apply [--icon-server:url('@assets/icons/server.svg')];
@apply [--icon-settings:url('@assets/icons/settings.svg')];
@apply [--icon-shield:url('@assets/icons/shield.svg')];
@apply [--icon-spinning:url('@assets/icons/spinning.svg')];
@apply [--icon-tag:url('@assets/icons/tag.svg')];
@apply [--icon-world:url('@assets/icons/world.svg')];
@apply [--icon-x:url('@assets/icons/x.svg')];
}
@@ -1,658 +0,0 @@
/* The bar carries no colour transition: one would ease its bg/text over
--mega-menu-duration on every data-darkmode flip, lagging the bar behind
the untransitioned page in all three nav modes. The mega-menu wipe colour
lives on .desktop-menu-sheet below, which owns its transition. */
header {
@apply bg-bg sticky top-0 z-40 mb-2;
& .header-content {
@apply relative z-10 flex h-14 items-center justify-between px-6 py-3 max-md:px-4 max-md:py-2;
}
[data-nav-type="mega-menu"] & {
/* Compositor-only curtain (supersedes the height transition, which paid
main-thread layout + repaint on every frame and janked low-end devices):
the container is a STATIC clip frame rooted at the bar, sized by
--mega-menu-height (the tallest panel, measured once in menu-aurora.js
and kept across open/close), and the reveal is a pair of opposite
translateY transitions — .desktop-menu-sheet (the opaque panel surface,
overflow-hidden) slides down from behind the bar while
.desktop-menu-canvas inside it counter-slides by the same distance, so
the content nets to a fixed position and the sheet's bottom edge wipes
it in, visually identical to the old drawer but animated entirely on
the compositor thread.
Apple's layer split still applies: the surface that animates must not
carry a backdrop-filter, or every frame re-rasterises the blur. The
sheet is fully opaque; the frost lives on the separate
.desktop-menu-overlay curtain.
Opacity is not animated on open — visibility gates the panel so the
descending sheet is opaque from the first visible frame. Closing is the
opposite: the whole menu surface fades out immediately while the sheet
retracts, so the frost, scrim and menu colour do not disappear in
separate stages. */
/* Apple-style clip frame: the opened surface starts at the top of the
header, not below it. The header content floats above this layer. The
header-height band is part of the moving sheet, so open and close share
the same page-top origin. */
& .desktop-menu-container {
@apply pointer-events-none invisible absolute inset-x-0 top-0 z-0 h-[calc(var(--mega-menu-height,0px)+3.5rem+3rem)] w-full overflow-clip max-md:hidden;
&.active,
&.closing {
@apply visible;
}
&.active {
@apply pointer-events-auto;
}
&.closing {
@apply opacity-0 transition-opacity duration-[220ms] ease-[cubic-bezier(0.4,0,0.6,1)] motion-reduce:transition-none;
}
/* The sheet is the whole opened surface, including the header-height
band. Its closed bottom edge is page top (not the header bottom), so
the close stops at the same origin that the reveal starts from. The
canvas counter-translates by the same travel distance so the menu
content remains visually fixed.
Duration is distance-adaptive via --mega-menu-duration, set on the
header by menu-aurora.js from apple.com's flyout pacing (2px/ms over
the visible travel, clamped to 240–480ms). */
& .desktop-menu-sheet {
@apply bg-mega-menu-bg absolute inset-x-0 top-0 h-[calc(var(--mega-menu-height,0px)+3.5rem)] -translate-y-full overflow-hidden transition-[translate] duration-(--mega-menu-duration,300ms) ease-[cubic-bezier(0.4,0,0.6,1)] motion-reduce:transition-none;
&::after {
@apply border-hairline pointer-events-none absolute inset-0 border-b shadow-xl transition-opacity duration-(--mega-menu-duration,300ms) content-[''] motion-reduce:transition-none;
}
}
/* The counter-transform must mirror the sheet's endpoints and timing
exactly or the content drifts during the wipe — keep both in
lockstep. */
& .desktop-menu-canvas {
@apply absolute inset-0 translate-y-full transition-[translate] duration-(--mega-menu-duration,300ms) ease-[cubic-bezier(0.4,0,0.6,1)] motion-reduce:transition-none;
}
&.active .desktop-menu-sheet,
&.active .desktop-menu-canvas {
@apply translate-y-0;
}
&.closing .desktop-menu-sheet {
&::after {
@apply opacity-0;
}
}
/* Category panels live inside .desktop-menu-canvas, not the nav items:
the transformed #topmenu would otherwise become the containing block
of a position:fixed panel and shrink the canvas to the menu's width.
Each panel is the same centered three-column grid (max-width fixed),
so switching categories is a pure cross-fade with no width shift.
The entering panel floats up 6px — translate + opacity only. */
/* The server-rendered board is only a template that menu-aurora.js
clones into each panel's right column — the original stays hidden. */
& > .desktop-menu-board {
@apply hidden;
}
& .desktop-nav {
/* Centered three-column canvas: anchor / links / device board.
Fixed max-width keeps every category the same width, so switching
is a pure cross-fade. Below lg the side tracks drop and only the
links column remains (tablet → just the submenu). The panel scrolls
internally when its content exceeds the viewport below the header. */
/* Tailwind v4 translate-* utilities emit the native `translate`
property, so that is what must be transitioned — transitioning
`transform` here left the 6px entrance float snapping instead of
animating (only the opacity ever faded). */
@apply pointer-events-none absolute inset-x-0 top-14 mx-auto grid max-h-[calc(100dvh-3.5rem)] max-w-[72rem] translate-y-1.5 grid-cols-[12rem_minmax(0,1fr)_13rem] gap-x-8 overflow-y-auto overscroll-contain px-10 pt-13 pb-8 opacity-0 transition-[opacity,translate] duration-[250ms] ease-out max-lg:max-w-[44rem] max-lg:grid-cols-1 max-lg:px-8;
&.active {
@apply pointer-events-auto translate-y-0 opacity-100;
}
& .desktop-nav-anchor {
@apply self-start max-lg:hidden;
& .desktop-nav-title {
@apply text-text flex items-center gap-2.5 text-2xl font-semibold tracking-tight;
/* First-level icon: mask + currentColor so it follows the theme.
--menu-icon comes from the shared name → icon map in
components/_nav.css; unmapped → the var() fallback. The default
must live in the fallback, not as a --menu-icon declaration
here: this nested chain compiles to (0,5,1) and would outrank
every (0,2,0) [data-section] mapping. */
&::before {
@apply size-6 shrink-0 bg-current content-[''] [mask:var(--menu-icon,var(--icon-category))_center/contain_no-repeat];
}
}
}
& .desktop-nav-list {
/* Vertical fill, content-width columns. Row count per submenu via
--menu-rows (menu-aurora.js); more items grow rows, not width,
so the list stays inside the middle track. */
@apply grid grid-flow-col grid-rows-[repeat(var(--menu-rows,6),auto)] content-start justify-start gap-x-8 gap-y-1;
& > li {
@apply m-0 list-none;
& > a {
@apply text-text hover:bg-hover-faint block w-fit rounded-xl px-3 py-2 text-sm whitespace-nowrap no-underline transition-colors duration-150;
&.is-active-page {
@apply bg-brand-subtle text-brand font-medium;
}
}
}
}
/* Right column: device summary, cloned per panel. self-start so it
sits at the top regardless of how tall the links column grows. */
& .desktop-menu-board {
@apply border-hairline flex flex-col gap-2 self-start border-l pl-7 max-lg:hidden;
& .board-label {
@apply text-text-subtle mb-0.5 text-[11px] font-medium tracking-wide uppercase;
}
& .board-line {
/* items-start keeps the icon aligned to the FIRST text line when a
long value wraps. Icon height (size-4) == text leading (leading-4)
so a single line still reads as vertically centered. */
@apply text-text-muted flex max-w-full items-start gap-2.5 text-xs;
&::before {
@apply size-4 shrink-0 bg-current content-[''];
}
& .board-text {
@apply min-w-0 leading-4 [overflow-wrap:anywhere];
}
}
& .board-line-host::before {
@apply [mask:var(--icon-router)_center/contain_no-repeat];
}
& .board-line-model::before {
@apply [mask:var(--icon-cpu)_center/contain_no-repeat];
}
& .board-line-firmware::before {
@apply [mask:var(--icon-package)_center/contain_no-repeat];
}
& .board-line-kernel::before {
@apply [mask:var(--icon-tag)_center/contain_no-repeat];
}
}
}
}
}
/* The bar must sit above the z-60 curtain for the whole open AND the
whole retract, or the scrim would dim the closing panel. */
[data-nav-type="mega-menu"]
&:has(.desktop-menu-container:is(.active, .closing)) {
@apply z-70;
}
.brand {
@apply hover:text-brand text-text inline-block shrink-0 text-xl font-semibold tracking-tight no-underline transition-[color,transform] duration-150 hover:-translate-y-0.5 max-md:flex-1 max-md:text-lg;
[data-nav-type="sidebar"] & {
@apply md:hidden;
}
[data-nav-type="sidebar"].sidebar-collapsed & {
@apply md:inline-block md:transition-opacity md:duration-150 md:starting:opacity-0;
}
}
.nav {
@apply absolute left-1/2 z-60 m-0 flex -translate-x-1/2 transform list-none items-center gap-1 p-0 max-md:hidden;
& > li {
@apply relative;
.menu {
@apply text-text hover:bg-hover-faint block rounded-xl px-3.5 py-1.5 font-medium no-underline;
/* Unified pill for both dropdown modes — the open/active category is a
filled brand pill, matching the submenu links and the sidebar. */
&.menu-active {
@apply bg-brand-subtle text-brand;
}
}
/* Dropdown panels only — mega-menu panels are reparented into
.desktop-menu-container (see above). */
& .desktop-nav {
@apply pointer-events-none left-0 z-40 px-0 pt-0 opacity-0 transition-opacity duration-150;
[data-nav-type="dropdown"] & {
@apply absolute top-full mt-2 min-w-48;
}
&.active {
@apply pointer-events-auto opacity-100;
}
& .desktop-nav-list {
[data-nav-type="dropdown"] & {
@apply border-hairline bg-surface-overlay flex flex-col gap-y-1 rounded-3xl border py-2 shadow-lg backdrop-blur-md backdrop-saturate-150;
}
& > li {
@apply m-0 list-none;
& > a {
@apply text-text block whitespace-nowrap no-underline;
[data-nav-type="dropdown"] & {
@apply hover:bg-hover-faint mx-2 rounded-xl px-4 py-2 transition-colors duration-150;
}
/* Same active pill as the mega submenu and the top-level
trigger — one unified vocabulary across both dropdown modes. */
&.is-active-page {
@apply bg-brand-subtle text-brand font-medium;
}
}
}
}
}
}
}
.navigation-controls {
@apply mr-3 flex shrink-0 items-center md:hidden;
[data-nav-type="sidebar"] & {
@apply md:flex;
}
/* D1 底线呼吸(2026-07 反转):展开后底线伸满 —— 三线齐整 = 内容
全部亮出;折叠态回落到短底线 = 还有内容收着,缺口招手可展开。
与耦合滑动同向:侧栏进场线补齐,退场线让位。dasharray 只改可见
长度,线帽形状不受影响。 */
[data-nav-type="sidebar"]:not(.sidebar-collapsed)
&
.navigation-toggle-line-bottom {
@apply md:[stroke-dasharray:15_15];
}
& .navigation-toggle {
@apply cursor-pointer rounded-none border-0 bg-transparent p-0 shadow-none transition-transform duration-150 hover:scale-105 active:scale-95;
& svg {
@apply text-text size-5;
}
& .navigation-toggle-line {
transform-box: fill-box;
@apply origin-center transition-[transform,opacity,stroke-dasharray] duration-150 ease-in-out;
/* Desktop sidebar: the dasharray breath runs in step with the
250ms coupled slide (the mobile X morph keeps its snappy 150). */
[data-nav-type="sidebar"] & {
@apply md:duration-[250ms];
}
}
/* Tabler menu-2 geometry: all three lines are full-length equals.
The signature short bottom line is a stroke-dasharray crop, not a
shorter segment or a scaleX — scaling distorts the round caps and
makes the "equal" collapsed state read as uneven lengths. */
& .navigation-toggle-line-bottom {
@apply [stroke-dasharray:7.5_15];
}
&.is-expanded {
& .navigation-toggle-line-top {
transform: translateY(5px) rotate(45deg);
}
& .navigation-toggle-line-middle {
transform: scaleX(0.35);
@apply opacity-0;
}
& .navigation-toggle-line-bottom {
transform: translateY(-5px) rotate(-45deg);
@apply [stroke-dasharray:15_15];
}
}
}
}
#indicators {
@apply mr-4 ml-auto flex shrink-0 flex-row-reverse gap-5 md:gap-8;
/* Same hover language as .navigation-toggle and .cmdk-trigger: a scale
nudge, never a background plate. */
& span[data-indicator] {
@apply size-5 cursor-pointer text-[0px] transition-transform duration-150 hover:scale-105 active:scale-95;
&::before {
@apply text-text absolute size-5 bg-current content-[''];
}
&[data-indicator="media_error"] {
&::before {
@apply [mask:var(--icon-error)_center/cover_no-repeat];
}
}
&[data-indicator="poll-status"] {
&[data-style="active"] {
&::before {
@apply [mask:var(--icon-refresh)_center/cover_no-repeat];
}
}
&[data-style="inactive"] {
&::before {
@apply [mask:var(--icon-refresh-off)_center/cover_no-repeat];
}
}
}
&[data-indicator="uci-changes"] {
@apply relative;
&::before {
@apply [mask:var(--icon-settings)_center/cover_no-repeat];
}
&[data-count]:not([data-count="0"]) {
&::after {
@apply bg-danger text-on-brand absolute -top-0.5 -right-0.5 z-10 flex min-h-3 min-w-3 items-center justify-center rounded-full px-0.5 text-[8px] leading-none font-bold shadow-sm content-[attr(data-count)];
}
}
}
}
}
}
body[data-nav-type="sidebar"] {
/* T4 shell: the sidebar is a full-height first column (brand → menu →
logout in one run), and the header spans only the content column — so
the sidebar's right border runs viewport top to bottom and the header
reads as the content area's toolbar, not a page-wide bar.
A CSS grid (not flex-wrap) keeps the header row at its natural height —
so collapsing the sidebar never stretches it — lets the sidebar column
collapse to zero, and lets #maincontent reclaim the freed space.
overflow-x-clip keeps the sliding sidebar out of horizontal overflow. */
/* Single source of truth for the sidebar column, so collapsing only has to
zero this one value instead of restating the grid template.
--sidebar-w-full stays constant: the inner panel width reads it, and
must not see the zeroed collapsed value. */
--sidebar-w-full: 17rem;
--sidebar-w: var(--sidebar-w-full);
/* The column eases with the panel's slide below (same curve and length),
so the content edge follows the sidebar edge frame by frame. */
@apply md:grid md:grid-cols-[var(--sidebar-w)_minmax(0,1fr)] md:grid-rows-[auto_minmax(0,1fr)] md:overflow-x-clip md:[transition:grid-template-columns_250ms_var(--ease-in-out)];
&.sidebar-collapsed {
@apply md:[--sidebar-w:0rem];
}
& > header {
@apply md:border-hairline md:col-start-2 md:row-start-1 md:mb-0 md:border-b;
}
& > .sidebar-panel {
@apply md:col-start-1 md:row-span-2 md:row-start-1;
}
& > #maincontent {
@apply md:col-start-2 md:row-start-2 md:min-w-0 md:pt-2;
/* This shell runs full-width and reads no width cap. Honouring
--content-width-centered here would shrink content twice — viewport
minus the sidebar, then clamped to 80rem and re-centred in what's left,
which puts the page visibly right-of-centre on a wide display. The
sidebar column is the margin; content fills the rest. Desktop only —
below md the sidebar is a drawer and the base rule's
max-md:w-full/px-3 still applies. */
@apply md:w-full md:max-w-none md:px-8;
}
& .header-crumb {
/* Expanded: the crumb is the header's leftmost element (brand lives in
the sidebar head), so it sits on the header's own padding. Collapsed:
burger + brand reappear before it and it takes back its old offset. */
@apply text-text-muted my-0 mr-auto ml-0 hidden min-w-0 list-none items-center gap-2 overflow-hidden p-0 text-sm md:flex;
& li {
@apply m-0 list-none whitespace-nowrap;
}
& .crumb-sep {
@apply opacity-50;
}
& .current {
@apply text-text min-w-0 truncate font-medium;
}
}
&.sidebar-collapsed .header-crumb {
@apply md:ml-6;
}
& .sidebar-panel {
@apply sticky top-0 hidden h-dvh w-full overflow-hidden rounded-none md:block;
}
/* Hidden (out of the tab order) only once the slide-out has run. The
hairline lives on the inner panel so it tracks the sliding edge. */
&.sidebar-collapsed .sidebar-panel {
@apply invisible [transition:visibility_0s_250ms];
}
& .sidebar-panel-inner {
@apply bg-bg border-hairline flex h-full w-(--sidebar-w-full) flex-col overflow-hidden border-r [transition:translate_250ms_var(--ease-in-out)];
}
&.sidebar-collapsed .sidebar-panel-inner {
@apply -translate-x-full;
}
/* Sidebar head: logo + hostname. h-14 matches the header row so its
bottom hairline continues the header's border in one unbroken line
across the viewport. box-content: the header is auto-height (56px
content + border OUTSIDE), so this border must sit outside its 56px
too — border-box would paint it one pixel higher than the header's. */
& .sidebar-head {
@apply border-hairline box-content flex h-14 shrink-0 items-center gap-2.5 border-b px-4;
& .sidebar-logo {
@apply size-5 shrink-0 rounded-md;
}
& .sidebar-brand {
@apply text-text hover:text-brand min-w-0 flex-1 truncate text-lg font-semibold tracking-tight no-underline transition-colors duration-150;
}
}
& .sidebar-list {
@apply m-0 flex-1 list-none space-y-0.5 overflow-y-auto p-3;
& li {
@apply m-0 list-none;
}
}
& .sidebar-list .nav-row {
@apply gap-2 rounded-xl px-3 py-2 text-lg font-semibold tracking-wide;
}
& .sidebar-list .nav-icon {
@apply size-4.5;
}
& .sidebar-submenu {
/* pl: the parent row's px-3 (0.75) + icon (1.125) + gap (0.5) put the
label at 2.375rem; sublinks bring their own px-3, so the list
supplies the remaining 1.625rem and sublink text hangs off the
parent label, not the row edge. */
@apply m-0 min-h-0 list-none space-y-0.5 overflow-hidden p-0 pl-6.5;
}
& .sidebar-submenu .navigation-sublink {
@apply px-3 py-1.5 text-sm;
}
& .sidebar-footer {
@apply border-hairline shrink-0 border-t p-3;
/* Logout: muted at rest, standard row treatment on hover — same
vocabulary as every other sidebar row (the v1 danger-red hover read
as unrelated to the rest of the menu). */
& .nav-link {
@apply text-text-muted hover:text-text;
}
}
}
/* Router progress (router.md) — Turbo Drive's bar: inserted by the router
once a navigation outlives its silent 150 ms, width driven inline and
trickling until commit (so a slow render keeps visibly moving), then
filled, faded and removed from the DOM. Only width and opacity move.
Reduced motion drops the transitions, not the bar. */
#luci-nav-progress {
@apply from-progress-start to-progress-end pointer-events-none fixed top-0 left-0 z-80 h-0.5 w-0 bg-linear-to-r [transition:width_.3s_var(--ease-out)];
&[data-state="done"] {
@apply opacity-0 [transition:width_.3s_ease-out,opacity_.15s_ease-in_.15s];
}
}
/* Router announcement (router.md): the new page's title for screen
readers after a same-document swap, which fires no load event. */
#luci-nav-status {
@apply sr-only;
}
#maincontent {
/* Centred shells (top-bar navigation) clamp here and gutter the remainder.
The sidebar shell overrides this — it caps the shell instead, see
body[data-nav-type="sidebar"] above. */
@apply mx-auto min-h-[calc(100vh-4rem)] w-23/24 max-w-(--content-width-centered) px-4 outline-none max-md:w-full max-md:px-3;
/* outline-none: the router focuses this landmark (tabindex=-1) after a
same-document swap for assistive tech. iOS WebKit paints its focus ring
for programmatic focus, and the ring's top edge just under the sticky
header read as a stuck progress bar; a landmark needs no visible ring. */
/* Router staging (router.md): the incoming region keeps its full
width for layout-measuring renders but takes no space and no paint. */
.view-staging {
@apply invisible h-0 overflow-hidden;
}
#view {
@apply mx-0 w-full bg-transparent p-0 shadow-none empty:hidden md:p-0;
/* Outgoing page while the router renders the next one (router.md). */
&.view-leaving {
@apply cursor-progress opacity-60 [transition:opacity_150ms_ease-out];
}
.cbi-title-section {
@apply mb-6 leading-relaxed max-md:mx-2 max-md:mb-3;
}
.controls {
@apply m-2 flex flex-wrap items-center gap-3 max-md:m-1 max-md:gap-2;
& label {
& input[type="radio"],
& input[type="checkbox"] {
@apply mr-1 align-middle;
}
}
}
& div[style] {
& > svg {
@apply dark:!bg-surface;
& line[style] {
@apply dark:!stroke-text;
}
}
}
}
.cbi-map-descr,
.cbi-section-descr {
@apply text-text-muted mb-6 text-sm leading-relaxed max-md:mx-2 max-md:mb-3 max-md:text-sm;
}
.cbi-page-actions {
@apply border-hairline mt-6 flex flex-wrap items-center justify-end gap-3 border-t pt-4 max-md:mx-2 max-md:mt-4 max-md:gap-2 max-md:pt-3;
}
.zone-forwards {
@apply flex flex-nowrap items-stretch gap-2 leading-relaxed;
& > span {
@apply text-text-muted flex shrink-0 basis-8 items-center justify-center self-center;
}
.zone-src,
.zone-dest {
@apply flex flex-1 flex-col gap-1.5;
}
}
/* Hidden while the view is leaving or loading so its jump to the new page
height is never seen; animate-none restarts its fade-in once it returns. */
&:has(> #view.view-leaving, > #view > .spinning) > footer {
@apply invisible animate-none;
}
}
/* Only the theme toggle captures the page: a router swap would crossfade
two page layouts on top of the content's own fade-in. */
:root:not(:active-view-transition-type(theme)) {
@apply [view-transition-name:none];
}
footer {
@apply text-text-muted mt-2 flex min-h-16 flex-wrap items-center justify-between text-xs;
& a {
@apply text-brand;
}
& span {
@apply inline-block text-center;
}
& .breadcrumb {
@apply bg-surface-overlay hover:bg-surface flex items-center gap-1 rounded-full px-3 py-1.5 text-xs shadow-sm backdrop-blur-md backdrop-saturate-150 transition-colors duration-150;
& li {
@apply list-none;
&.active a {
@apply text-text;
}
}
}
}
.control-group {
@apply mt-1;
}
.control-group,
.cbi-page-actions > div,
.cbi-section-actions > div {
@apply flex flex-row flex-nowrap items-center gap-2 max-md:flex-wrap max-md:gap-1;
}
@@ -1,47 +0,0 @@
/**
* Admin custom-background mode (scheme D) — active only when header.ut saw
* struct_main_bg and stamped <body data-bg>. Without the attribute none of
* these selectors match and the page paints exactly as it does today.
*
* Frost only the two small fixed chrome surfaces (the budget Apple's own
* iOS chrome runs on); cards stay blur-free alpha blends. Every color
* derives from --bg/--surface via color-mix, so custom palettes and dark
* mode follow automatically. The three tunables default in var() fallbacks,
* never on body — the config app's UCI overrides land on :root and a
* body-level declaration would mask them.
*/
body[data-bg] {
& .page-bg {
--page-bg: var(--main-bg);
--page-bg-lqip: var(--main-bg-lqip);
}
/* Two jobs on one element. relative: the fixed .page-bg paints above
non-positioned flow content (positioned elements come after in-flow
blocks in the painting order) — the login page has always dodged this
via .login-screen's relative; a negative z-index on the layer is NOT an
option, body's own opaque background would cover the image. canvas: a
--bg-derived translucent wash under ALL content is what makes ARBITRARY
plugin DOM readable — bare headings, descriptions and hand-rolled
widgets sit on this floor instead of the raw photo, with zero
per-plugin knowledge. 55% is a deliberate internal constant, not a
fourth tunable. */
& #maincontent {
@apply relative [background:color-mix(in_srgb,var(--bg)_55%,transparent)];
}
& header,
& .sidebar-panel-inner {
@apply [background:color-mix(in_srgb,var(--bg)_var(--main-bg-alpha,67%),transparent)] [backdrop-filter:blur(var(--main-bg-blur,20px))_saturate(150%)];
}
/* Scrim washes toward the theme bg to keep contrast; z-1 lifts it above
the ::after full-image layer (siblings otherwise paint after ::before). */
& .page-bg::before {
@apply pointer-events-none absolute inset-0 z-1 content-[''] [background:color-mix(in_srgb,var(--bg)_var(--main-bg-scrim,20%),transparent)];
}
& #maincontent .cbi-section {
@apply [background:color-mix(in_srgb,var(--surface)_var(--main-bg-alpha,67%),transparent)];
}
}
@@ -1,21 +0,0 @@
/**
* Generic full-page background layer — one pipeline for the login page and
* the admin UI. Pure mechanism: it consumes only the --page-bg pair; each
* entry maps its own tokens onto it (login.css → --login-bg pair,
* _page-bg-mode.css → --main-bg pair), so neither sheet drags the other's
* tokens along. Fixed sibling layer on its own GPU surface (iOS Safari has
* no background-attachment:fixed) so content paints never re-sample the
* image. LQIP paints first; the full image fades in on ::after once loaded
* (compositor-only opacity change).
*/
.page-bg {
@apply pointer-events-none fixed inset-0 transform-[translateZ(0)] bg-cover bg-center bg-no-repeat [background-image:var(--page-bg-lqip,var(--page-bg))];
&::after {
@apply pointer-events-none absolute inset-0 bg-cover bg-center bg-no-repeat opacity-0 content-[''] [transition:opacity_0.5s_ease] [background-image:var(--page-bg)];
}
&.full-loaded::after {
@apply opacity-100;
}
}
@@ -1,13 +0,0 @@
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
@apply transition-none! animate-none!;
}
/* Loading indicators communicate in-progress state, not decoration —
keep them spinning so the page doesn't read as frozen. */
.spinning::before {
@apply animate-spin!;
}
}
@@ -1,33 +0,0 @@
/**
* Reduced-transparency fallback.
*
* When the user asks for less transparency, drop the most expensive layer —
* backdrop-filter blur — everywhere, and turn the one surface that relies on
* "translucent + blur" to stay readable (the mega-menu backdrop) opaque, so
* removing the blur doesn't let the page content bleed through it.
*
* surface-overlay / surface are already opaque, so dropping their blur is
* harmless; scrim keeps its translucency on purpose (it's a dimming layer).
* --mega-menu-bg points at surface-overlay via var() so it tracks light/dark
* automatically (resolved at the point of use, not here).
*/
@media (prefers-reduced-transparency: reduce) {
*,
*::before,
*::after {
/* standard property only — lightningcss adds the -webkit- prefix per browserslist */
@apply [backdrop-filter:none]!;
}
:root {
--mega-menu-bg: var(--surface-overlay);
}
/* With a custom admin background the translucent surfaces minus their
blur would leave text floating on the image — restore full opacity
instead. Deliberately declared on body: unlike the theme's own
defaults (var() fallbacks), this MUST outrank the :root UCI override. */
body[data-bg] {
--main-bg-alpha: 100%;
}
}
@@ -1,89 +0,0 @@
.hidden {
@apply hidden!;
}
.left {
@apply md:text-left!;
&:not(td) {
@apply text-left!;
}
}
.right {
@apply md:text-right!;
&:not(td) {
@apply text-right!;
}
}
.top {
@apply md:align-top!;
&:not(td) {
@apply align-top!;
}
}
.bottom {
@apply md:align-bottom!;
&:not(td) {
@apply align-bottom!;
}
}
.center {
@apply md:text-center!;
&:not(td) {
@apply text-center!;
}
}
.middle {
@apply md:align-middle!;
&:not(td) {
@apply align-middle!;
}
}
.nowrap:not(span) {
@apply md:whitespace-nowrap;
&:not(td) {
@apply whitespace-nowrap;
}
}
@keyframes aurora-fade-in {
from {
opacity: 0;
}
}
.fade-in {
@apply animate-[aurora-fade-in_250ms_ease_both];
}
/* Content that lands after first paint fades in once; none of it is
re-inserted by poll (the dashboard's polled tabs sit under .Dashboard).
A nav header.ut replayed before first paint (data-restored) never fades.
backwards: a filling animation stays a stacking context over dropdowns. */
#view > :not(.spinning),
#view > .cbi-map > .cbi-map-tabbed > [data-tab-active="true"],
.cbi-section-node-tabbed > [data-tab-active="true"],
#topmenu:not([data-restored]),
#sidebar-list:not([data-restored]) > *,
footer {
@apply animate-[aurora-fade-in_250ms_ease_backwards];
}
.fade-out {
@apply pointer-events-none opacity-0 transition-opacity duration-[250ms];
}
.spinning {
@apply relative inline-block pl-8!;
&::before {
@apply absolute top-1/2 left-[6px] size-5 -translate-y-1/2 animate-spin bg-current content-[''] [mask:var(--icon-spinning)_center/cover_no-repeat];
}
#view > & {
@apply first:mx-auto first:grid first:min-h-48 first:w-fit first:place-items-center first:max-md:min-h-[calc(100dvh-4rem)];
}
}
@@ -1,84 +0,0 @@
.label {
@apply bg-surface-sunken text-text rounded-full px-3 py-1 text-xs font-bold uppercase;
&.important {
@apply bg-info-surface text-info;
}
&.warning {
@apply bg-danger-surface text-danger;
}
&.success {
@apply bg-success-surface text-success;
}
&.notice {
@apply bg-warning-surface text-warning;
}
}
.zonebadge {
@apply border-hairline bg-surface-sunken text-text inline-flex items-center gap-1.5 overflow-visible rounded-lg border px-2 py-1 align-middle text-sm leading-normal font-semibold max-md:gap-1 max-md:px-1.5 max-md:text-xs;
&[style*="--zone-color-rgb"] {
@apply border-transparent bg-[rgb(var(--zone-color-rgb),.7)]!;
& em {
@apply text-text;
}
}
&.zonebadge-empty {
@apply text-text-muted border-dashed bg-transparent font-normal italic;
}
/* Bare zone-colour swatch: the interface overview / tooltip renders a
label-less `.zonebadge` as a colour chip prefixing an `.ifacebadge`. The
tag redesign's horizontal padding is meant for text labels, so keep the
label-less swatch a compact pill instead of a wide block. */
.ifacebadge > & {
@apply rounded-full px-1 py-0.5;
}
.cbi-dropdown & {
@apply px-1.5 py-0.5;
}
}
.ifacebadge {
@apply border-hairline bg-surface-sunken text-text hover:border-hairline hover:bg-surface-sunken inline-flex cursor-default flex-nowrap items-center gap-2 rounded-2xl border px-3 py-2 text-sm font-normal shadow-sm transition-[box-shadow,border-color,background-color] duration-150 hover:shadow-md max-md:gap-1.5 max-md:px-2.5 max-md:py-1.5 max-md:text-xs;
.zonebadge > & {
@apply rounded-2xl px-1.5 py-0;
& img {
@apply mr-1 w-4;
}
}
.cbi-dropdown & {
@apply gap-1 rounded-lg px-1.5 py-0.5 shadow-none hover:shadow-none;
& img {
@apply mr-1 w-4;
}
}
& > img,
& > .cbi-tooltip-container > img {
@apply w-5 shrink-0 self-center max-md:w-4;
}
& > span {
& > .nowrap {
@apply mb-1.5 inline-block text-sm max-md:text-xs;
}
}
&.ifacebadge-active {
@apply border-brand font-semibold;
}
&.large {
@apply min-w-[200px] flex-1 px-4 py-3 max-md:min-w-[180px] max-md:px-3 max-md:py-2.5;
}
}
@@ -1,53 +0,0 @@
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
.btn,
.cbi-button {
/* transform stays in this list for the .cbi-button active:scale-95
variant in _form.css, which relies on this base transition. */
@apply inline-flex cursor-pointer items-center justify-center gap-1.5 rounded-xl border px-3 py-1.5 text-sm font-medium antialiased transition-[background-color,border-color,transform] duration-150 max-md:text-base max-md:font-medium;
&[disabled] {
@apply cursor-not-allowed opacity-(--app-opacity-disabled);
}
.td & {
@apply inline-flex w-auto flex-none whitespace-nowrap max-md:min-h-9 max-md:text-sm;
}
}
.btn,
.cbi-button,
.cbi-button-default,
.cbi-button-download,
.cbi-button-find,
.cbi-button-link,
.cbi-button-up,
.cbi-button-down {
@apply border-hairline bg-surface-sunken text-text hover:bg-hover-faint;
}
.drag-handle {
@apply border-hairline bg-surface-sunken text-text-muted hover:bg-hover-faint;
}
.btn.primary,
.cbi-button-action,
.cbi-button-apply,
.cbi-button-reload,
.cbi-button-add,
.cbi-button-edit {
@apply border-brand bg-brand hover:bg-brand-hover text-on-brand;
}
.cbi-button-positive,
.cbi-button-fieldadd,
.cbi-button-save {
@apply border-transparent bg-brand-subtle text-brand hover:bg-brand-subtle-hover;
}
.cbi-button-negative,
.cbi-section-remove .cbi-button,
.cbi-button-reset,
.cbi-button-remove {
@apply border-transparent bg-danger-surface text-danger hover:bg-danger-surface-hover;
}
@@ -1,207 +0,0 @@
.cbi-section {
@apply mb-3 overflow-visible rounded-2xl p-5 max-md:p-3;
&[data-tab-title] {
@apply m-0 p-0;
}
&[data-tab-active="true"] {
@apply mb-3 p-5 max-md:p-3;
}
#maincontent & {
@apply bg-surface border-hairline border shadow-sm;
}
& > .cbi-title {
@apply flex items-start justify-between;
& > h3 {
@apply flex-1;
& .label[data-clickable] {
@apply text-text bg-surface-sunken;
@apply inline-flex size-7 cursor-pointer items-center justify-center p-0 hover:shadow-md active:scale-95 max-md:size-6;
&::before {
@apply size-4 bg-current transition-transform duration-150 content-[''];
}
}
& span[data-indicator="poll-status"] {
@apply relative size-5 cursor-pointer text-[0px];
&::before {
@apply absolute size-5 bg-current transition-transform duration-150 ease-out content-[''];
}
@variant hover {
&::before {
@apply scale-110;
}
}
&:active::before {
@apply scale-95;
}
&[data-style="active"] {
&::before {
@apply rotate-0 [mask:var(--icon-arrow-right)_center/cover_no-repeat];
}
}
&[data-style="inactive"] {
&::before {
@apply rotate-90 [mask:var(--icon-arrow-right)_center/cover_no-repeat];
}
}
}
}
}
legend {
@apply text-lg font-semibold;
}
& h3 {
@apply text-text border-hairline border-b pb-4 max-md:mx-0 max-md:pb-2;
}
& div[style*="display:grid"] {
@apply max-md:grid-cols-2! max-md:gap-3;
&:has(> .ifacebox) {
@apply place-items-center;
}
}
& .network-status-table {
@apply mb-3 flex flex-nowrap justify-around gap-4 max-md:flex-col;
}
& .cbi-section-create {
@apply mt-6 flex flex-wrap items-center gap-3 max-md:mx-0 max-md:mt-5 max-md:flex-col max-md:items-stretch max-md:gap-3;
& > div {
@apply flex-none max-md:w-full max-md:flex-1;
}
}
}
.ifacebox {
@apply border-hairline bg-surface-overlay hover:border-hairline max-md:border-hairline relative inline-flex min-w-28 flex-col items-stretch overflow-visible rounded-2xl border text-center text-base leading-5 shadow-md hover:shadow-xl max-md:min-w-30 max-md:flex-1 max-md:rounded-3xl max-md:shadow-sm;
#cbi-network-interface & {
@apply max-md:flex-row md:min-w-38;
}
& .ifacebox-head {
@apply border-hairline bg-surface-sunken text-text w-full rounded-t-2xl border-b px-4 py-3 text-center font-semibold tracking-tight transition-[background-color,border-color,color] duration-150 max-md:rounded-t-3xl max-md:px-3 max-md:py-2.5 max-md:text-sm max-md:leading-5 max-md:font-medium;
&[style*="--zone-color-rgb"] {
@apply bg-[rgb(var(--zone-color-rgb),.75)]!;
}
#cbi-network-interface & {
@apply max-md:flex max-md:w-auto max-md:shrink-0 max-md:items-center max-md:justify-center max-md:rounded-l-3xl max-md:rounded-tr-none max-md:border-r max-md:border-b-0;
}
&.cbi-tooltip-container {
@apply static bg-transparent;
& .cbi-tooltip {
@apply bottom-0 left-0;
}
}
&.active {
@apply border-brand bg-brand text-on-brand;
}
}
& .ifacebox-body {
/* Flex column base: `items-stretch` lets label/value rows span full width
(e.g. luci-app-modemdata) while `justify-center` keeps rows tight together
and balanced instead of spread apart. Icon-only cards (switch ports, the
interfaces list) centre horizontally via `text-center`/`mx-auto`. The
interfaces overview layers its richer layout under `.network-status-table`. */
@apply text-text flex w-full flex-1 flex-col items-stretch justify-center gap-1 rounded-b-2xl p-3 text-center max-md:rounded-b-3xl;
#cbi-network-interface & {
@apply max-md:flex-row max-md:items-center max-md:rounded-r-3xl max-md:rounded-bl-none max-md:py-2 max-md:pr-2 max-md:pl-4;
}
& > img {
@apply mx-auto w-5;
}
& > span {
@apply text-text space-y-1.5 max-md:space-y-1 max-md:text-sm max-md:leading-5;
.network-status-table & {
@apply w-full;
}
.cbi-tooltip-container + .cbi-tooltip-container {
@apply ml-1;
}
.cbi-tooltip {
@apply delay-200;
}
& .nowrap {
@apply inline-block;
}
& > .nowrap {
@apply not-last:mb-1;
}
& img {
@apply w-5 shrink-0;
}
}
& > div {
@apply block w-full space-y-0;
#cbi-network-interface & {
@apply max-md:w-auto max-md:flex-1 max-md:space-y-1;
}
}
& .cbi-tooltip-container {
@apply text-text static inline-flex cursor-help items-center justify-center;
& .cbi-tooltip {
@apply bottom-0 md:left-0;
& .nowrap {
@apply whitespace-nowrap;
}
}
}
& small {
@apply block text-xs leading-4;
#cbi-network-interface & {
@apply max-md:mt-0;
}
}
}
}
/*
Network interfaces overview (admin/network) — the page `.ifacebox` was designed
for. The rich equal-height card layout is scoped here (not on the base) so
third-party pages keep the plain, tolerant defaults above. Mirrors the
base-vs-`.network-status-table` split in luci-theme-bootstrap.
*/
.network-status-table .ifacebox-body {
@apply flex h-full flex-1 flex-col items-center justify-around gap-2;
& > div {
@apply flex flex-wrap gap-2 max-md:gap-1.5;
}
/* `flex-1` alone lets the badges shrink to min-content, so six SSIDs stay
crammed on one line instead of wrapping. The floor mirrors
luci-theme-bootstrap's `min-width: 220px` on the same badges. */
& .ifacebadge {
@apply min-w-55 flex-1;
}
}
@@ -1,140 +0,0 @@
.cbi-dropdown {
@apply inline-flex h-fit max-w-full min-w-fit shrink-0 items-center p-0 whitespace-nowrap shadow-sm;
&[disabled] {
@apply pointer-events-none opacity-(--app-opacity-disabled);
}
&:not(.btn):not(.cbi-button) {
@apply border-hairline bg-surface min-w-52.5 max-w-full rounded-2xl border md:max-w-100;
& > ul > li {
&[placeholder] {
@apply hidden;
}
}
}
& > ul {
@apply m-0 flex flex-1 list-none flex-nowrap items-center gap-0.5 overflow-hidden max-md:flex-wrap;
& > li {
@apply m-0 hidden list-none items-center gap-1 overflow-hidden px-2 py-1.5;
&[display] {
@apply !flex;
}
& .hide-open {
@apply block;
}
& .hide-close {
@apply hidden;
}
& > form {
@apply pointer-events-none hidden;
}
& > label {
@apply flex items-center gap-2;
}
& img {
@apply h-5 w-5 flex-none align-middle;
}
& span {
@apply truncate;
}
}
&.dropdown {
@apply border-hairline bg-surface-overlay absolute left-0 z-50 w-fit min-w-full overflow-y-auto rounded-lg border shadow-xl backdrop-blur-md backdrop-saturate-150;
& > li {
@apply text-text-muted hover:bg-brand-subtle min-h-9 w-full cursor-pointer px-3 py-1.5 font-medium;
}
}
&.preview {
@apply hidden;
}
}
&[empty] {
& > ul {
@apply max-h-px max-w-px;
& > li {
@apply block;
}
}
}
&[optional][open] > ul.dropdown > li[placeholder] {
@apply block;
}
&[open] {
@apply border-brand ring-focus-ring relative ring-2;
& > ul.dropdown {
@apply block w-auto max-w-none;
& > li {
@apply flex;
&[selected] {
@apply bg-brand-subtle text-brand;
}
&[unselectable] {
@apply opacity-(--app-opacity-disabled);
}
& .hide-open {
@apply hidden;
}
& .hide-close {
@apply block;
}
}
}
& > ul.preview {
@apply flex;
}
}
&[multiple] {
&[more],
&[empty] {
& > .more {
@apply flex flex-none shrink-0 px-2.5 py-1.5;
}
}
&[empty] > .more {
@apply flex-1;
}
&[open] {
& > ul.dropdown > li > form {
@apply flex items-center;
}
}
& > ul > li > label {
@apply flex;
}
}
& > .open {
@apply border-hairline flex flex-none shrink-0 cursor-pointer items-center justify-center border-l px-2.5 py-0.5 text-sm text-current;
}
& > .more {
@apply hidden;
}
}
@@ -1,83 +0,0 @@
.floating-toolbar {
/* Detached-bubble speed dial: every shortcut is its own floating circle
(elevation only, no border), collapsing drops the bubbles into the
toggle one after another and the toggle's X rotates into a +.
All motion is translate/scale/opacity/rotate — compositor-only (R1).
The stagger math runs on custom properties set by header.ut:
--fab-n (on .toolbar-list) item count
--fab-i (on each .toolbar-btn) index, 0 = top bubble
--fab-icon (on each .toolbar-btn) configured icon URL, drawn via
mask + bg-current so it follows the theme text color in both
modes (replaces the old <img> + dark:invert).
Travel per step = bubble 44px + 10px gap = 3.375rem (40px + 8px =
3rem below md). Expanding pops bottom-first ("jump up"), collapsing
drops top-first; --fab-d only ever delays the motion properties, so
hover color feedback stays instant. */
/* The stack keeps its layout height when collapsed (the bubbles must
travel a real distance into the toggle), so the container itself must
not catch clicks — only the buttons do. */
@apply pointer-events-none fixed right-4 bottom-4 z-40 flex flex-col items-center max-md:right-3 max-md:bottom-3;
.toolbar-list {
@apply mb-2.5 flex flex-col items-center gap-2.5 max-md:mb-2 max-md:gap-2;
}
.toolbar-btn {
@apply text-text-muted bg-surface-overlay pointer-events-auto grid size-11 cursor-pointer place-items-center rounded-full shadow-md max-md:size-10;
/* `visibility` rides the same transition so collapsed bubbles leave the
tab order, but only after the drop finishes (it flips at the end of
its transition window, so the motion itself is never clipped). */
@apply [transition:translate_320ms_cubic-bezier(0.34,1.25,0.5,1),scale_320ms_cubic-bezier(0.34,1.25,0.5,1),opacity_220ms_ease,visibility_320ms_ease,background-color_150ms_ease,color_150ms_ease];
@apply [transition-delay:var(--fab-d,0s),var(--fab-d,0s),var(--fab-d,0s),var(--fab-d,0s),0s,0s];
&:hover {
@apply text-text bg-hover-faint;
}
&:active {
@apply scale-[0.92];
}
&:not(.toggle) {
@apply [--fab-d:calc((var(--fab-n,1)-1-var(--fab-i,0))*60ms)] no-underline;
/* The stagger delay must not defer press feedback: `scale` shares the
delayed transition channel, so without this a press on the top
bubble would acknowledge (n-1)*60ms late. Nested (not merged into
the base `:active`) so it outranks the delay set just above. */
&:active {
@apply [--fab-d:0s];
}
.icon {
@apply size-5 shrink-0 bg-current [mask:var(--fab-icon)_center/contain_no-repeat] max-md:size-4.5;
}
}
&.toggle {
@apply text-text-subtle hover:text-text border-0;
.icon {
@apply grid size-5 place-items-center transition-[rotate] duration-[250ms] ease-out max-md:size-4.5;
svg {
@apply size-full;
}
}
}
}
&.collapsed {
.toolbar-btn {
&:not(.toggle) {
@apply pointer-events-none invisible scale-[0.35] opacity-0;
@apply [--fab-d:calc(var(--fab-i,0)*60ms)] translate-y-[calc((var(--fab-n,1)-var(--fab-i,0))*3.375rem)] max-md:translate-y-[calc((var(--fab-n,1)-var(--fab-i,0))*3rem)];
}
&.toggle .icon {
@apply rotate-45;
}
}
}
}
@@ -1,82 +0,0 @@
.cbi-input-invalid,
.cbi-value-error {
@apply !border-danger focus:!ring-danger;
}
.cbi-value {
@apply flex flex-row flex-wrap gap-6 py-1.5 max-md:flex-col max-md:gap-1.5 max-md:py-1;
&.hidden {
@apply hidden;
}
& + & {
@apply mt-3 max-md:mt-2;
}
& > .cbi-value-title {
@apply pt-1 text-right font-medium max-md:w-auto max-md:text-left md:flex-[0_0_12rem];
}
& > .cbi-value-field {
@apply max-w-full flex-1;
&:has(> .cbi-dropdown[disabled]) {
@apply cursor-not-allowed;
}
& .cbi-value-description {
@apply text-text-muted relative mt-1 pl-4 leading-none wrap-break-word;
&:not(:empty) {
&::before {
@apply bg-info absolute -left-0.5 inline-block size-4 content-[''] [mask:var(--icon-info)_center/cover_no-repeat];
}
}
}
}
& > .cbi-section,
& > .cbi-tblsection {
@apply w-full;
}
}
.cbi-dynlist {
@apply inline-flex w-max max-w-120 flex-col items-start gap-3 max-md:max-w-full!;
& .item {
@apply border-hairline bg-surface pointer-events-auto relative inline-flex cursor-move flex-col items-start gap-2 self-stretch overflow-hidden rounded-2xl border py-3 pr-10 pl-4 break-all shadow-sm transition-[transform,box-shadow,opacity,border-color,background-color] duration-150 select-text max-md:w-full max-md:py-2.5 max-md:pr-8 max-md:pl-3;
&::after {
@apply bg-surface-sunken text-text-muted absolute top-2.5 right-2 inline-flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-xl text-sm font-medium content-['\00D7'];
}
&.dragging {
@apply scale-95 cursor-grabbing opacity-50 shadow-2xl;
}
&.drag-over {
@apply border-brand bg-brand-subtle ring-brand-subtle scale-105 shadow-lg ring-2;
}
& > span,
& > code {
@apply pointer-events-none w-full rounded-lg font-mono leading-relaxed;
}
}
& .placeholder {
@apply break-all;
}
& .add-item {
@apply border-hairline hover:border-hairline hover:bg-surface-sunken inline-flex items-center gap-1.5 self-stretch rounded-2xl border border-dashed bg-transparent px-1 py-1 transition-[border-color,background-color] duration-150;
& > input {
@apply min-w-61 flex-1;
}
& > .cbi-button {
@apply inline-flex min-h-6 min-w-6 shrink-0 cursor-pointer items-center justify-center rounded-xl px-2 py-0 text-sm font-medium shadow-none active:scale-95;
}
}
}
@@ -1,69 +0,0 @@
input {
@apply disabled:cursor-not-allowed disabled:opacity-(--app-opacity-disabled);
}
input[type="text"],
input[type="password"],
.cbi-input-text,
.cbi-input {
@apply text-text border-hairline bg-control-bg placeholder-text-muted focus:border-brand focus:ring-focus-ring relative w-52.5 max-w-full rounded-2xl border px-3 py-1.5 text-sm font-normal shadow-sm transition-[border-color,box-shadow] duration-150 focus:ring-2 focus:outline-none;
.table.cbi-section-table & {
@apply w-full;
}
}
.cbi-input-text {
@apply min-w-20 max-md:min-w-14;
}
#localtime {
@apply min-w-70;
}
input[type="radio"],
input[type="checkbox"] {
@apply relative mr-3 inline-block h-4 w-4 cursor-pointer appearance-none align-middle disabled:cursor-not-allowed;
&::before {
@apply border-hairline bg-control-bg absolute top-0 left-0 h-4 w-4 border transition-[background-color,border-color,box-shadow] duration-150 content-[''];
}
&::after {
@apply bg-on-brand absolute top-0.5 left-0.5 h-3 w-3 opacity-0 transition-opacity duration-150 content-[''];
}
&:checked::before {
@apply border-brand bg-brand;
}
&:checked::after {
@apply opacity-100;
}
@variant hover {
&::before {
@apply border-hairline;
}
}
&:focus::before {
@apply border-brand ring-focus-ring ring-2 outline-none;
}
}
input[type="radio"] {
&::before {
@apply rounded-full;
}
&::after {
@apply [mask:var(--icon-radio)_center/cover_no-repeat];
}
}
input[type="checkbox"] {
&::before {
@apply rounded;
}
&::after {
@apply [mask:var(--icon-check)_center/cover_no-repeat];
}
}
.cbi-checkbox {
@apply relative inline-flex items-center align-middle;
}
@@ -1,53 +0,0 @@
.alert-message {
/* Radius matches `.cbi-section` (16px): the alert sits in the content layer,
same width and edge alignment as the sections it stacks above. The larger
radii in this theme belong to overlays (24px) and pills (32px). */
@apply bg-surface-sunken text-text border-hairline mb-4 rounded-2xl border p-6 max-md:mx-0 max-md:mb-3 max-md:p-4;
.modal & {
@apply mb-0;
}
.login-shell & {
@apply mb-0 px-2 py-2.5 text-center text-base max-md:px-0.5;
}
&.success {
@apply border-hairline bg-success-surface text-success;
}
&.info {
@apply border-hairline bg-info-surface text-info;
}
&.warning,
&.notice {
@apply border-hairline bg-warning-surface text-warning;
}
&.error,
&.danger {
@apply border-hairline bg-danger-surface text-danger;
}
h4,
h5,
pre,
ul,
li,
p {
@apply border-0 bg-transparent text-inherit;
}
& h4 {
@apply mb-2 text-lg font-semibold max-md:mb-1.5 max-md:text-base;
}
& p {
@apply text-sm leading-relaxed max-md:text-sm;
}
& .right {
@apply mt-4 max-md:mt-3;
}
}
@@ -1,128 +0,0 @@
#modal_overlay {
@apply pointer-events-none fixed top-0 bottom-0 hidden overflow-auto bg-transparent;
.modal-overlay-active & {
@apply bg-scrim pointer-events-auto inset-0 right-0 left-0 z-100 grid grid-cols-1 place-items-center backdrop-blur-md backdrop-saturate-150;
}
& > .modal {
@apply border-hairline bg-surface-overlay relative flex w-5xl flex-col gap-4 rounded-3xl border p-6 wrap-break-word whitespace-normal shadow-2xl max-md:w-full max-md:gap-3 max-md:p-4;
& h4 {
@apply mb-0 text-center;
& em {
@apply text-brand font-semibold;
}
}
& h5 {
@apply text-text my-3;
}
& p {
@apply text-text text-sm leading-relaxed;
}
& > ul {
@apply border-hairline overflow-auto rounded-2xl border p-3;
}
& label.btn {
@apply border-hairline bg-surface-sunken text-text hover:border-hairline border;
}
& pre {
@apply overflow-auto;
&.errors {
@apply border-hairline bg-danger-surface text-danger;
}
}
pre + pre {
@apply mt-3;
}
& .button-row,
& div.left,
& div.right {
@apply border-hairline flex shrink-0 gap-3 border-t p-4 max-md:gap-1.5 max-md:p-2.5;
}
& div.left {
@apply justify-start;
}
& .button-row,
& div.right {
@apply justify-end;
}
&.uci-dialog {
& ins,
& del,
& var {
@apply font-mono not-italic no-underline shadow-sm;
}
& ins {
@apply border-hairline bg-success-surface text-success border;
}
& del {
@apply border-hairline bg-danger-surface text-danger border;
}
& var {
@apply border-hairline bg-info-surface text-info border;
}
& .uci-change-legend {
@apply border-hairline bg-surface-sunken mt-4 grid grid-cols-2 gap-3 rounded-2xl border p-4 max-md:grid-cols-1 max-md:gap-2 max-md:p-3;
& .uci-change-legend-label {
@apply text-text flex items-center gap-2 text-sm font-medium;
& ins,
& del,
& var {
@apply flex h-6 min-w-6 items-center justify-center rounded-lg px-2 text-xs font-semibold;
}
& var {
& ins,
& del {
@apply ml-1 h-4 min-w-4 px-1;
}
}
}
}
& .uci-change-list {
@apply mt-4 space-y-3;
& h5 {
@apply bg-surface-sunken text-text mt-6 mb-2 rounded-xl px-3 py-2 text-sm font-semibold first:mt-0;
}
& ins,
& del {
@apply block rounded-xl px-4 py-3 text-sm;
& strong {
@apply text-sm;
}
}
& var {
@apply inline-block rounded-lg px-2 py-1 text-sm;
& ins,
& del {
@apply ml-1 inline-block px-1.5 py-0.5 text-xs;
}
}
}
}
}
}
@@ -1,169 +0,0 @@
/**
* Shared navigation vocabulary.
*
* One visual definition consumed by the desktop sidebar, the mobile
* drawer and (incrementally) the other navigation modes. Mode files
* (_layout.css, _overlay.css) keep positioning, sizing overrides and
* show/hide state only — never duplicate these recipes there.
*/
.nav-row {
@apply focus-visible:ring-focus-ring flex w-full cursor-pointer appearance-none items-center border-0 bg-transparent text-left no-underline shadow-none transition-colors duration-150 select-none hover:no-underline focus-visible:ring-2 focus-visible:outline-none;
}
.nav-link {
/* hover:no-underline: the global `a:hover { underline }` in _elements.css
outranks a bare class (a:hover is 0,1,1), so nav rows must opt out at
the same specificity tier. */
@apply text-text hover:bg-hover-faint block rounded-xl px-3 py-1.5 no-underline transition-colors duration-150 hover:no-underline;
}
.navigation-direct {
@apply text-text hover:text-text;
}
/* Direct destinations use the same selected state in both navigation modes:
a filled brand pill, matching the active sublink. */
.navigation-direct.is-active-page {
@apply text-brand hover:text-brand bg-brand-subtle;
}
:where(.sidebar-list) {
& .nav-row {
@apply text-text-muted hover:text-text;
}
& .navigation-direct {
@apply hover:bg-hover-faint;
}
}
.navigation-group-toggle {
/* size-4.5 ≈ the row's text height — 3.5 read as undersized next to the
text-lg category labels, on desktop and in the mobile drawer alike. */
&::after {
@apply size-4.5 shrink-0 bg-current opacity-55 transition-[transform,opacity] duration-[250ms] content-[''] [mask:var(--icon-arrow-right)_center/cover_no-repeat];
}
@variant hover {
&::after {
@apply opacity-100;
}
}
}
/* An expanded group's label turns brand and its arrow rotates open. */
.navigation-group.is-expanded > .navigation-group-toggle {
@apply text-brand;
&::after {
@apply rotate-90;
}
}
/* The active group keeps its brand label even when the user manually
collapses it — otherwise the active-page pill is hidden inside the inert
region and no "you are here" marker survives. No arrow rotation here: a
collapsed group's arrow must still point right. */
.navigation-group.is-active-group > .navigation-group-toggle {
@apply text-brand;
}
/* ── Row icons ──
A leading glyph inline with the label, on sidebar and mobile-drawer
rows alike (the mega-menu title draws its own ::before). bg-current +
mask lets the glyph track the row's text colour through hover, expanded
and active states; the size is set per surface — sidebar rows in
_layout.css, drawer rows in _overlay.css. */
.nav-icon {
@apply shrink-0 bg-current opacity-55 transition-opacity duration-150 [mask:var(--menu-icon,var(--icon-category))_center/contain_no-repeat];
}
.nav-label,
.nav-category-label {
@apply min-w-0 flex-1 truncate;
}
/* Full-strength glyph wherever the row itself is highlighted. */
.navigation-direct:hover .nav-icon,
.navigation-group-toggle:hover .nav-icon,
.navigation-direct.is-active-page .nav-icon,
.navigation-group.is-expanded > .navigation-group-toggle .nav-icon,
.navigation-group.is-active-group > .navigation-group-toggle .nav-icon {
@apply opacity-100;
}
.navigation-group-region {
@apply grid grid-rows-[0fr] opacity-0 transition-[grid-template-rows,opacity] duration-[250ms] ease-out;
}
.navigation-group.is-expanded > .navigation-group-region {
@apply grid-rows-[1fr] opacity-100;
}
.navigation-submenu-list {
@apply min-h-0 list-none overflow-hidden;
}
.navigation-sublink {
@apply text-text-muted hover:bg-hover-faint hover:text-text relative flex rounded-xl font-medium no-underline transition-colors duration-150;
}
/* Active page: a filled brand pill, shared by the sidebar and the drawer. */
.navigation-sublink.is-active-page {
@apply text-brand hover:text-brand bg-brand-subtle font-semibold;
}
.nav-category-preview {
@apply text-text-subtle truncate pb-1;
& .nav-preview-current {
@apply text-brand;
}
}
/* ── First-level section icons ──
The name → icon map, shared by every navigation surface: the mega-menu
title (::before consumer in _layout.css) and the sidebar/mobile-drawer
row glyphs (.nav-icon below). Keyed on the LuCI node name (data-section,
set by menu-aurora.js) — stable and language-independent. Scoped to the
three row elements that carry the attribute so the selector can't
accidentally match unrelated data-section usage elsewhere; :is() keeps
every key at (0,2,0) — the mega-menu consumer's fallback chain would
outrank anything higher (see _layout.css). The only maintenance point:
add new first-level sections here; anything unmapped falls back to the
default icon at the consumer. */
:is(.desktop-nav-title, .navigation-direct, .navigation-group-toggle)[data-section="status"] {
@apply [--menu-icon:var(--icon-activity)];
}
:is(.desktop-nav-title, .navigation-direct, .navigation-group-toggle)[data-section="statistics"] {
@apply [--menu-icon:var(--icon-chart-bar)];
}
:is(.desktop-nav-title, .navigation-direct, .navigation-group-toggle)[data-section="nlbw"] {
@apply [--menu-icon:var(--icon-gauge)];
}
:is(.desktop-nav-title, .navigation-direct, .navigation-group-toggle)[data-section="system"] {
@apply [--menu-icon:var(--icon-settings)];
}
:is(.desktop-nav-title, .navigation-direct, .navigation-group-toggle)[data-section="services"] {
@apply [--menu-icon:var(--icon-apps)];
}
:is(.desktop-nav-title, .navigation-direct, .navigation-group-toggle)[data-section="nas"] {
@apply [--menu-icon:var(--icon-server)];
}
:is(.desktop-nav-title, .navigation-direct, .navigation-group-toggle)[data-section="control"] {
@apply [--menu-icon:var(--icon-adjustments)];
}
:is(.desktop-nav-title, .navigation-direct, .navigation-group-toggle)[data-section="network"] {
@apply [--menu-icon:var(--icon-world)];
}
:is(.desktop-nav-title, .navigation-direct, .navigation-group-toggle)[data-section="vpn"] {
@apply [--menu-icon:var(--icon-shield)];
}
:is(.desktop-nav-title, .navigation-direct, .navigation-group-toggle)[data-section="docker"] {
@apply [--menu-icon:var(--icon-box)];
}
/* "asterisk" covers VoIP/PBX apps (e.g. luci-app-asterisk forks) — no
official OpenWrt package registers a verified menu.d node under this
name, so this is a best-effort key. */
:is(.desktop-nav-title, .navigation-direct, .navigation-group-toggle)[data-section="asterisk"] {
@apply [--menu-icon:var(--icon-phone)];
}
@@ -1,96 +0,0 @@
.mobile-menu-overlay {
/* The mobile surface is opaque, so filtering pixels behind it has no visual
effect and only adds a full-screen paint/compositing cost. */
@apply max-md:bg-mega-menu-bg max-md:invisible max-md:fixed max-md:inset-0 max-md:z-60 max-md:opacity-0 md:hidden;
/* Transitions live on the OPEN state only: opening fades in, closing cuts
instantly. Link taps close into a full-page navigation, and any close
fade racing the document swap freezes mid-frame as a ghost. */
&.mobile-menu-open {
@apply max-md:visible max-md:opacity-100 max-md:transition-[visibility,opacity] max-md:duration-[250ms];
}
.mobile-nav {
@apply max-md:flex max-md:h-full max-md:w-full max-md:flex-col max-md:pt-14;
& .mobile-nav-body {
@apply max-md:flex max-md:min-h-0 max-md:flex-1 max-md:flex-col max-md:px-5 max-md:pt-6;
& .mobile-nav-label {
@apply max-md:text-text-muted max-md:mb-3 max-md:text-sm max-md:font-medium;
}
}
& .mobile-nav-list {
@apply max-md:m-0 max-md:flex max-md:min-h-0 max-md:flex-1 max-md:-translate-y-2 max-md:list-none max-md:flex-col max-md:gap-y-4 max-md:overflow-y-auto max-md:overscroll-contain max-md:p-0 max-md:pb-5 max-md:opacity-0;
& .mobile-nav-item {
@apply max-md:shrink-0;
& .nav-row {
/* gap-3 (not 4): tight enough that the leading .nav-icon reads
attached to its label; justify-between still pins the group
arrow to the right edge. */
@apply max-md:min-h-13 max-md:justify-between max-md:gap-3 max-md:rounded-none max-md:bg-transparent max-md:px-0 max-md:py-2.5 max-md:text-2xl max-md:leading-tight max-md:font-medium max-md:tracking-tight;
& .nav-icon {
/* Row icons at drawer scale, against the text-2xl labels. */
@apply max-md:size-6;
}
}
& .mobile-nav-submenu {
& .mobile-nav-submenu-list {
/* pl: rows are px-0, so icon (1.5) + gap (0.75) put the label
at 2.25rem; sublinks bring px-3, the list supplies the rest. */
@apply max-md:m-0 max-md:p-0 max-md:pl-6;
}
& .mobile-nav-subitem {
& .mobile-nav-sublink {
@apply max-md:min-h-10 max-md:w-full max-md:items-center max-md:px-3 max-md:py-2 max-md:text-base;
}
}
}
}
}
& .mobile-nav-footer {
@apply max-md:border-hairline max-md:flex max-md:shrink-0 max-md:items-center max-md:justify-between max-md:border-t max-md:px-5 max-md:pt-4 max-md:pb-[max(1rem,env(safe-area-inset-bottom))];
& .mobile-nav-footer-action {
@apply max-md:flex max-md:items-center;
}
& .mobile-nav-logout {
@apply max-md:text-text max-md:hover:text-brand max-md:text-sm max-md:font-medium max-md:no-underline max-md:transition-colors max-md:duration-150;
}
& .theme-switcher {
& .theme-option {
@apply max-md:px-2 max-md:py-1;
}
}
}
}
&.mobile-menu-open .mobile-nav-list {
@apply max-md:translate-y-0 max-md:opacity-100 max-md:transition-[translate,opacity] max-md:duration-[250ms] max-md:ease-out;
}
}
body.mobile-navigation-open > header {
@apply max-md:z-70 max-md:bg-transparent;
}
[data-nav-type="mega-menu"] {
/* Dim only: a blurred full-screen fade drops frames on weak GPUs. Visibility
flips on a delay instead of tweening, so the opacity fade stays composited. */
& .desktop-menu-overlay {
@apply bg-mega-menu-scrim pointer-events-none invisible fixed inset-0 z-60 opacity-0 [transition:opacity_220ms_cubic-bezier(0.4,0,0.6,1),visibility_0s_220ms] max-md:hidden;
&.active {
@apply pointer-events-auto visible opacity-100 [transition-delay:0s];
}
}
}
@@ -1,164 +0,0 @@
/**
* Command palette (⌘K) — Spotlight-style, available in all three nav types
* (sidebar / mega-menu / dropdown). The trigger sits at the header's right
* edge next to #indicators; ⌘K / Ctrl+K toggles the panel globally. Class
* names mirror luci-theme-shadcn's palette so the two themes stay legible
* side by side.
*
* The panel is built lazily by menu-aurora.js on first open; its index is
* the navigation model the menus already render from (no extra requests)
* plus three theme-mode command rows. An empty query browses the whole
* index; typed queries rank via a fuzzy subsequence scorer; a leading ">"
* (or full-width ">") scopes the list to the command rows.
*/
.cmdk-trigger {
/* Hover is a scale nudge with no plate behind it — the header's own
language, set by .navigation-toggle and shared with #indicators. The
size-8 box stays as the touch target; it just never paints.
order-last pins it to the bar's right edge: #indicators sits before it
and grows leftward, so a late indicator never shifts the trigger. */
@apply text-text relative order-last grid size-8 shrink-0 cursor-pointer place-items-center rounded-lg border-0 bg-transparent p-0 shadow-none transition-transform duration-150;
/* size-5 (not the button's own size): the same box #indicators gives its
glyphs, so the shared 24×24 Tabler canvas scales identically and the
search icon carries the same stroke weight as the poll/changes ones
sitting next to it. */
&::before {
@apply size-5 bg-current content-[''] [mask:var(--icon-search)_center/contain_no-repeat];
}
&:hover {
@apply scale-105;
}
&:active {
@apply scale-95;
}
&:focus-visible {
@apply ring-focus-ring ring-2 outline-none;
}
}
.cmdk-panel {
@apply border-hairline bg-surface/85 fixed top-24 left-1/2 z-120 w-[min(36rem,calc(100vw-2.5rem))] -translate-x-1/2 overflow-hidden rounded-2xl border shadow-xl backdrop-blur-xl backdrop-saturate-150 transition-[opacity,translate] duration-150 ease-out starting:-translate-y-2 starting:opacity-0;
/* <md: the same panel becomes a full-screen takeover (Algolia DocSearch
manner) — opaque page background (no full-screen blur cost on phones),
input bar pinned top with a Cancel exit, results fill the rest. */
@apply max-md:top-0 max-md:right-0 max-md:bottom-0 max-md:left-0 max-md:flex max-md:w-auto max-md:translate-none max-md:flex-col max-md:rounded-none max-md:border-0 max-md:bg-bg max-md:shadow-none max-md:backdrop-blur-none max-md:backdrop-saturate-100;
& .cmdk-inputrow {
@apply flex items-center gap-3 px-5 py-3.5;
@apply max-md:border-hairline max-md:bg-surface max-md:border-b max-md:px-4 max-md:py-2.5;
&::before {
@apply text-text-subtle size-5 shrink-0 bg-current content-[''] [mask:var(--icon-search)_center/contain_no-repeat];
}
& .cmdk-input {
@apply text-text placeholder-text-subtle w-full min-w-0 flex-1 rounded-none border-0 bg-transparent p-0 text-base shadow-none focus:ring-0 focus:outline-none;
}
/* Shown only while the field holds a query: :placeholder-shown is true
exactly when the input is empty, so the state needs no JS mirror. */
& .cmdk-clear {
@apply text-text-subtle grid size-5 shrink-0 cursor-pointer place-items-center rounded-md border-0 bg-transparent p-0 shadow-none transition-colors duration-150;
&::before {
@apply size-4 bg-current content-[''] [mask:var(--icon-x)_center/contain_no-repeat];
}
&:hover {
@apply text-text;
}
.cmdk-input:placeholder-shown ~ & {
@apply hidden;
}
}
& .cmdk-cancel {
@apply text-brand hidden shrink-0 cursor-pointer border-0 bg-transparent p-1 text-sm shadow-none max-md:block;
}
}
& .cmdk-list {
@apply border-hairline max-h-80 overflow-y-auto border-t p-2 empty:hidden;
@apply max-md:max-h-none max-md:flex-1 max-md:overscroll-contain;
& .cmdk-row {
@apply text-text flex items-center gap-3 rounded-xl px-3 py-2 text-sm no-underline;
& .cmdk-title {
@apply min-w-0 truncate;
}
& .cmdk-group-name {
@apply text-text-subtle ml-auto shrink-0 text-xs;
}
& mark {
@apply text-brand bg-transparent font-semibold;
}
&.is-selected {
@apply bg-brand-subtle;
& .cmdk-title {
@apply text-brand font-medium;
}
}
}
& .cmdk-empty {
@apply text-text-subtle px-3 py-6 text-center text-sm;
}
}
& .cmdk-footer {
@apply border-hairline text-text-subtle flex items-center gap-4 border-t px-4 py-2 text-xs max-md:hidden;
& .cmdk-hint-close {
@apply ml-auto;
}
& kbd {
@apply border-hairline bg-surface-sunken text-text-muted rounded-md border px-1.5 py-px font-mono text-[11px];
}
}
}
/* A tab row reads "Parent › Title": the parent gives way first, and keeps
at least an ellipsis so the "›" never leads the row. Like the section
label, it stays subtle on the selected row. Unnested: the classes exist
only inside palette rows, and the short selectors keep main.css lean. */
.cmdk-title:has(> .cmdk-parent) {
@apply flex items-baseline;
}
.cmdk-parent {
@apply text-text-subtle min-w-0 truncate font-normal;
}
.cmdk-label {
@apply max-w-[calc(100%-1.5rem)] shrink-0 truncate;
&::before {
@apply text-text-subtle px-1.5 font-normal content-['›'];
}
}
/* The frost is decorative — both degradation paths go opaque. */
@supports not (backdrop-filter: blur(1px)) {
.cmdk-panel {
@apply bg-surface;
}
}
@media (prefers-reduced-transparency: reduce) {
.cmdk-panel {
@apply bg-surface;
}
}
@@ -1,15 +0,0 @@
.cbi-progressbar {
@apply bg-surface-sunken relative h-3.5 w-full cursor-help overflow-hidden rounded-full max-md:h-4;
&::before {
@apply text-text absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded-2xl text-xs whitespace-nowrap content-[attr(title)] max-md:text-xs max-md:leading-normal;
}
[data-page="admin-system-package-manager"] & {
&::before {
@apply max-sm:text-[10px];
}
}
& > div {
@apply from-progress-start to-progress-end h-full bg-linear-to-r transition-[width] duration-[250ms];
}
}
@@ -1,30 +0,0 @@
.cbi-tabmenu {
@apply border-hairline bg-surface-sunken mb-1 flex items-center gap-1 overflow-x-auto rounded-4xl border p-1;
& li {
@apply relative m-0 min-w-fit shrink-0 list-none;
&[data-errors] {
&::after {
@apply bg-danger text-on-brand absolute -top-0.5 -right-1.5 z-20 inline-flex min-h-4 min-w-4 items-center justify-center rounded-full px-1.5 py-0.5 text-xs font-semibold content-[attr(data-errors)];
}
& > a {
@apply border-hairline border;
}
}
& > a {
@apply text-text-muted hover:text-text block rounded-4xl px-4 py-2 text-center text-sm font-medium whitespace-nowrap no-underline;
}
&.cbi-tab a {
@apply bg-text text-surface font-semibold shadow-sm;
}
}
}
[data-tab-title] {
@apply invisible h-0 overflow-hidden;
}
[data-tab-active="true"] {
@apply visible h-auto overflow-visible;
}
@@ -1,7 +0,0 @@
select {
@apply text-text border-hairline bg-control-bg focus:border-brand focus:ring-focus-ring min-w-52.5 max-w-full appearance-none md:max-w-100 rounded-2xl border px-3 py-1.5 pr-10 text-sm font-normal shadow-sm transition-[border-color,box-shadow] duration-150 focus:ring-2 focus:outline-none;
@apply bg-size-[16px] bg-position-[right_0.75rem_center] bg-no-repeat [background-image:var(--icon-arrow-down)] dark:[background-image:var(--icon-arrow-down-dark)];
&[disabled] {
@apply cursor-not-allowed opacity-(--app-opacity-disabled);
}
}
@@ -1,73 +0,0 @@
.theme-switcher {
@apply bg-surface-sunken relative inline-flex items-center gap-0 rounded-full shadow-sm transition-transform duration-150 max-md:py-0.5;
@apply border-hairline border;
&::before {
@apply bg-surface-overlay absolute top-1 left-1 z-0 h-[calc(100%-0.5rem)] w-[calc(33.333%-0.5rem)] rounded-full shadow-md transition-transform duration-[250ms] content-[''];
}
footer & {
@apply max-md:hidden;
}
& .theme-option {
@apply relative z-10 flex cursor-pointer items-center justify-center gap-1.5 rounded-full px-3 py-1.5 transition-transform duration-150 hover:scale-105 active:scale-95;
& input[type="radio"] {
@apply sr-only;
}
& .theme-icon {
@apply text-text-muted flex items-center justify-center transition-colors duration-150;
& svg {
@apply size-4 transition-transform duration-150;
}
}
& .theme-label {
@apply text-text-muted hidden text-xs font-medium transition-colors duration-150;
}
&.active {
& .theme-icon {
@apply text-text;
& svg {
@apply scale-110;
}
}
& .theme-label {
@apply text-text;
}
}
&:hover:not(.active) {
& .theme-icon {
@apply text-text;
}
& .theme-label {
@apply text-text;
}
}
}
&:has(.theme-option[data-theme="device"].active) {
&::before {
@apply translate-x-0;
}
}
&:has(.theme-option[data-theme="light"].active) {
&::before {
@apply translate-x-[calc(100%+0.5rem)];
}
}
&:has(.theme-option[data-theme="dark"].active) {
&::before {
@apply translate-x-[calc(200%+1rem)];
}
}
}
@@ -1,156 +0,0 @@
/*
Log viewer for the core System/Kernel Log pages (admin/status/logs/*).
This is theme styling for a stock LuCI page, so it lives in the main.css
component pipeline — NOT in patches/ — and consumes the Tailwind token
system: radii resolve through the --radius-base chain, shadows through
--app-shadow-*, colors through the theme map, so config-app overrides of
the base tokens reach this page like any other. (patches/ stays reserved
for third-party compatibility, written in plain CSS.)
The class names are deliberately global, not page-scoped: any package may
reuse the same markup contract for its own log UI — .syslog-view wrapping
.log-row rows built from .log-time / .log-sev / .log-tag / .log-msg spans,
with an lv-{info|notice|warn|err|crit|debug} severity class on the row —
and inherit this component wholesale.
The companion JS ships on-demand as patches/admin-status-logs.js. It
parses the read-only #syslog textarea into a .syslog-view sibling and
marks #content_syslog with .log-enhanced. Without JS (or when its parse
gate trips) none of the viewer markup exists and the stock textarea
styling above still applies.
Chosen design (user-picked variant "彩色级别词", Vercel/Axiom style):
min-width time · level · source columns so messages start flush while
every token renders verbatim — year, timezone, colons, ctime padding all
kept, nothing truncated — so a copied row is byte-identical to the source
line; the level token is colored per severity, source neutral,
err-and-above rows tinted, whole lines with sideways scrolling (the stock
textarea's wrap="off" model). Fields are
inline-blocks inside inline flow (not grid/flex) so the real spaces
between them survive into copied text.
*/
#content_syslog {
@apply m-2 max-md:m-1;
& > div {
@apply flex flex-wrap items-center gap-x-2 max-md:gap-x-1.5;
/* Upstream drops an inline margin-bottom:10px on some of these; under
items-center that reads as half a margin of offset. */
& > select,
& > input {
@apply my-0!;
}
& > .cbi-input-select,
& > .cbi-input-text {
@apply max-md:min-w-45;
}
}
}
/* The viewer is a child div too, and a bare `.syslog-view` (0,1,0) loses to
the rule above — the escape has to carry the id. */
#content_syslog > .syslog-view {
@apply block;
}
/* #log_textarea: same contract under a third-party id (luci-app-aria2,
-v2raya, -openlist). */
#syslog,
#log_textarea {
@apply w-full font-mono text-xs leading-snug;
}
#syslog {
/* Explicit border color: bare `border` falls back to currentColor
(near-black text) in Tailwind v4. mb: upstream leaves the gap above
"Scroll to head" at zero, so the log window supplies it. */
@apply bg-surface-sunken border-hairline text-text mb-5 rounded-3xl border p-6 shadow-lg max-md:p-3;
}
#content_syslog.log-enhanced > #syslog {
@apply hidden;
}
.syslog-view {
@apply w-full;
/* Same shell as the stock textarea, with the border color made explicit:
a bare `border` falls back to currentColor (near-black) in Tailwind v4. */
@apply bg-surface-sunken border-hairline text-text mb-5 rounded-3xl border p-6 shadow-lg max-md:p-3;
@apply font-mono text-xs leading-relaxed;
/* Whole lines, sideways scroll (the stock textarea's wrap="off" model). */
@apply overflow-x-auto;
/* Focusable (tabIndex in the companion JS) so select-all stays inside the
log; only keyboard focus draws the ring — a click into the log must not. */
@apply focus-visible:ring-focus-ring outline-none focus-visible:ring-2;
& .log-row {
/* max-content width so hover/tint backgrounds span the scrolled width. */
@apply w-max min-w-full rounded-md px-2 whitespace-pre;
&:hover {
@apply bg-hover-faint;
}
}
/* The browser-default selection highlight turns the dimmed fields to mud;
use the theme's info surface pair and restore full text contrast. */
& ::selection {
@apply bg-info-surface text-text;
}
& .log-time {
@apply text-text-subtle;
/* ctime stamps are a fixed 24ch; RPC datestrs run longer but uniform. */
@apply md:inline-block md:min-w-[24ch] md:align-bottom;
}
& .log-sev {
/* "authpriv.notice:" is 16ch — the longest real fac.sev token. */
@apply font-semibold;
@apply md:inline-block md:min-w-[16ch] md:align-bottom;
}
& .log-tag {
@apply text-text-muted;
/* min-width, not a clamp: long tags extend rather than truncate. */
@apply md:inline-block md:min-w-[18ch] md:align-bottom;
}
& .lv-info .log-sev {
@apply text-info;
}
& .lv-notice .log-sev {
@apply text-success;
}
& .lv-warn .log-sev {
@apply text-warning;
}
& .lv-debug {
@apply text-text-subtle;
& .log-sev,
& .log-tag {
@apply text-text-subtle;
}
}
/* err and above are rare and load-bearing — full-row emphasis. */
& .lv-err,
& .lv-crit {
@apply bg-danger-surface;
&:hover {
@apply bg-danger-surface-hover;
}
& .log-sev {
@apply text-danger;
}
}
}
@@ -1,22 +0,0 @@
#tabmenu {
@apply mb-8 w-full;
}
.tabs {
@apply border-hairline relative flex items-center gap-0 overflow-x-auto border-b;
& a {
@apply text-text-muted hover:text-text block px-8 py-4 text-center text-sm font-medium whitespace-nowrap transition-colors duration-150 hover:no-underline;
}
& > li.active {
@apply border-text border-b-2;
& > a {
@apply text-text font-semibold;
}
}
}
.cbi-section-node-tabbed {
@apply mt-6;
}
@@ -1,249 +0,0 @@
table.table,
.table {
@apply border-hairline mb-3 w-full border border-separate border-spacing-0 overflow-visible rounded-2xl text-base max-md:mx-0 max-md:block max-md:w-full max-md:overflow-visible max-md:rounded-none max-md:border-0 max-md:text-sm max-md:shadow-none;
&[width="100%"] {
@apply w-full;
}
&[width="33%"] {
@apply w-1/3;
}
& .cbi-section-table-titles {
@apply font-bold;
}
& .cbi-section-table-titles.named,
& .cbi-section-table-descr.named,
& .cbi-section-table-row[data-title] {
&::before {
@apply border-hairline table-cell px-3 py-3 align-middle text-base font-semibold content-[attr(data-title)] max-md:flex max-md:flex-[0_0_100%] max-md:px-3 max-md:py-2.5 max-md:text-sm md:border-b;
}
&:not([data-title]),
&:has(td.cbi-section-table-titles) {
&::before {
@apply content-none;
}
}
}
& .cbi-section-table-titles.named {
&::before {
@apply text-text-subtle text-xs font-semibold tracking-wider uppercase;
}
}
& tbody,
& .tbody {
@apply max-md:block;
}
& tr,
& .tr {
@apply max-md:border-hairline max-md:flex max-md:flex-wrap max-md:border-b max-md:px-2 max-md:py-2;
@apply has-[.cbi-progressbar]:max-md:flex has-[.cbi-progressbar]:max-md:items-center has-[.cbi-progressbar]:max-md:justify-center;
&:first-child {
& th,
& .th {
@apply first:rounded-tl-2xl last:rounded-tr-2xl;
}
}
&:last-child {
@apply max-md:border-b-0;
&[data-title] {
&::before {
@apply border-b-0;
}
}
.td {
@apply border-b-0;
}
}
&.table-titles,
&.cbi-section-table-titles,
&.cbi-section-table-descr {
@apply max-md:hidden;
}
&.cbi-rowstyle-1,
&.cbi-rowstyle-2 {
@apply bg-transparent;
}
& > .col-1 {
@apply max-md:flex-[1_1_2rem] md:w-20 md:max-w-28;
}
& > .col-2 {
@apply whitespace-normal max-md:flex-[2_2_4rem] md:w-32 md:max-w-40;
}
& > .col-3 {
@apply max-md:flex-[3_3_6rem] md:w-44 md:max-w-52;
}
& > .col-4 {
@apply max-md:flex-[4_4_8rem] md:w-56 md:max-w-64;
}
& > .col-5 {
@apply max-md:flex-[5_5_10rem] md:w-68 md:max-w-76;
}
& > .col-6 {
@apply max-md:flex-[6_6_12rem] md:w-80 md:max-w-88;
}
& > .col-7 {
@apply max-md:flex-[7_7_14rem] md:w-92 md:max-w-100;
}
& > .col-8 {
@apply max-md:flex-[8_8_16rem] md:w-104 md:max-w-112;
}
& > .col-9 {
@apply max-md:flex-[9_9_18rem] md:w-116 md:max-w-124;
}
& > .col-10 {
@apply max-md:max-w-[calc(100vw-40px)] max-md:flex-[0_0_100%] md:w-128 md:max-w-136;
}
}
& th,
& .th {
@apply border-hairline bg-surface-sunken text-text-subtle border-b px-3 py-3 text-left text-xs font-semibold tracking-wider uppercase max-md:flex-[1_1_50%] max-md:border-0 max-md:bg-transparent;
#cbi-samba4 & {
@apply px-0.5 py-1.5;
}
&[width="100%"] {
@apply w-full max-md:flex-[0_0_100%];
}
&[width="33%"] {
@apply w-1/3 max-md:flex-[0_0_33.333%];
}
&[data-sortable-row="true"] {
@apply hover:bg-hover-faint cursor-pointer select-none;
&::after {
@apply ml-0.5 text-xs content-[''];
}
&[data-sort-direction="asc"] {
&::after {
@apply content-['\25B2'];
}
}
&[data-sort-direction="desc"] {
&::after {
@apply content-['\25BC'];
}
}
}
}
&[id*="status_leases"] {
& .td {
@apply max-w-62 max-md:max-w-full;
}
}
& td,
& .td {
@apply border-hairline table-cell border-b px-3 py-3 align-middle wrap-break-word whitespace-normal max-md:flex-[1_1_50%] max-md:border-0 max-md:px-1 max-md:py-1;
&::before {
@apply hidden content-[attr(data-title)] max-md:mb-1 max-md:block max-md:text-xs max-md:font-semibold max-md:tracking-wider;
}
#cbi-samba4 & {
@apply px-0.5 py-1.5;
}
[data-page="admin-system-mounts"] & {
@apply max-w-104 max-md:max-w-full;
}
#wifi_assoclist_table & {
@apply max-md:flex-[0_0_100%] max-md:px-3 max-md:py-2;
&::before {
@apply max-md:mb-1.5;
}
}
& > input[type="text"],
& > input[type="password"],
& select,
& .cbi-dropdown:not(.btn):not(.cbi-button) {
@apply w-full;
}
/* Widgets are nested (td > div > div > widget), so the fixed/min widths
from _select.css/_dropdown.css must yield to the column width here. */
& select,
& .cbi-dropdown:not(.btn):not(.cbi-button) {
@apply min-w-fit;
}
&.cbi-value-field {
/* Mobile cards (bootstrap-style): value fields stack one per row —
the row title and long match-rule cells get the full width — while
display-only widgets below pair up two per row. */
@apply wrap-anywhere md:max-w-prose max-md:mb-1 max-md:basis-full max-md:self-start max-md:text-left;
&[data-widget="CBI.DummyValue"],
&[data-widget="CBI.Button"],
&[data-widget="CBI.FlagValue"],
&[data-widget="dvalue"],
&[data-widget="button"],
&[data-widget="fvalue"] {
@apply max-md:basis-1/2;
}
}
&.cbi-section-actions {
@apply max-md:flex-[0_0_100%];
& > div {
@apply max-md:w-full;
& > .cbi-button {
@apply max-md:flex-1;
}
}
}
& > .cbi-button {
@apply max-md:w-full;
}
&[width="100%"] {
@apply w-full max-md:flex-[0_0_100%];
}
&[width="33%"] {
@apply w-1/3 max-md:flex-[0_0_33.333%];
}
[data-page="admin-network-network"] & {
&[data-name="_ifacebox"],
&[data-name="_ifacestat"] {
@apply max-md:basis-[100%];
}
}
}
}
.cbi-section-table {
.cbi-section-table-titles {
.cbi-section-table-cell {
@apply !w-auto;
}
}
}
@@ -1,6 +0,0 @@
textarea {
@apply text-text border-hairline bg-control-bg placeholder-text-muted focus:border-brand focus:ring-focus-ring min-h-24 w-full resize-y rounded-2xl border px-3 py-2 text-sm font-normal shadow-sm transition-[border-color,box-shadow] duration-150 focus:ring-2 focus:outline-none;
&[disabled] {
@apply cursor-not-allowed opacity-(--app-opacity-disabled);
}
}
@@ -1,79 +0,0 @@
.cbi-tooltip {
/* Hidden bubbles park off-screen (bootstrap's `left:-10000px` trick): a
visibility-hidden absolute box left at its anchor still counts into the
page's scrollable overflow, so the horizontal scrollbar would survive the
bubble's disappearance and the page could never snap back. `:hover`
returns it via `inset-s-auto`; the inset isn't transitioned, so the move
is instant while opacity/scale animate. */
@apply bg-surface-overlay text-text border-hairline absolute inset-s-[-10000px] z-110 w-max max-w-xs scale-95 rounded-xl border px-3 py-2 text-xs break-normal whitespace-normal opacity-0 shadow-xl transition-[visibility,opacity,scale] duration-150 ease-out;
&.error {
@apply border-hairline bg-danger-surface text-danger;
}
&.success {
@apply border-hairline bg-success-surface text-success;
}
&.info {
@apply border-hairline bg-info-surface text-info;
}
&.notice {
@apply border-hairline bg-warning-surface text-warning;
}
}
.cbi-tooltip-container,
[data-tooltip] {
@apply relative inline-block cursor-help whitespace-nowrap underline decoration-current decoration-dotted underline-offset-2;
& .cbi-tooltip {
@apply invisible scale-95 opacity-0 transition-[visibility,opacity,scale] duration-150 ease-out;
}
&:hover .cbi-tooltip {
@apply visible scale-100 opacity-100 inset-s-auto;
}
}
/* Generic label tooltip — a CSS-only inverse pill for icon buttons and other
compact controls; any element opts in via attributes:
data-tip="label" tooltip text (empty value renders nothing)
data-tip-pos="left" placement: top (default) | bottom | left | right
Named `data-tip` because `data-tooltip` above is claimed by LuCI's cbi
help bubbles. Show is delayed so cursor sweeps don't flash labels; hide is
immediate. Motion is opacity/scale only (compositor-safe), and hover is
gated to hover-capable pointers so a tap on touch doesn't strand a label —
keyboard focus still shows it everywhere. */
[data-tip]:not([data-tip='']) {
@apply relative;
&::after {
content: attr(data-tip);
@apply bg-text text-bg pointer-events-none absolute z-110 w-max max-w-xs scale-95 rounded-lg px-2 py-1 text-xs break-normal whitespace-normal opacity-0 transition-[opacity,scale] duration-150 ease-out;
}
&:not([data-tip-pos])::after,
&[data-tip-pos='top']::after {
@apply bottom-[calc(100%+0.5rem)] left-1/2 -translate-x-1/2;
}
&[data-tip-pos='bottom']::after {
@apply top-[calc(100%+0.5rem)] left-1/2 -translate-x-1/2;
}
&[data-tip-pos='left']::after {
@apply top-1/2 right-[calc(100%+0.625rem)] -translate-y-1/2;
}
&[data-tip-pos='right']::after {
@apply top-1/2 left-[calc(100%+0.625rem)] -translate-y-1/2;
}
&:focus-visible::after {
@apply scale-100 opacity-100 delay-300;
}
@media (hover: hover) {
&:hover::after {
@apply scale-100 opacity-100 delay-300;
}
}
}
-182
View File
@@ -1,182 +0,0 @@
/**
* luci-theme-aurora: login page stylesheet
* Copyright 2025 eamonxg <eamonxiong@gmail.com>
* Licensed to the public under the Apache License 2.0.
*/
/* Login only needs Tailwind's theme variables and generated utilities. The
full Preflight reset is intentionally omitted from this standalone entry. */
@layer theme, base, components, utilities;
@import "tailwindcss/theme.css" layer(theme);
@import "tailwindcss/utilities.css" layer(utilities) source(none);
@import "@eamonxg/luci-theme-tokens/dist/aurora/tokens.css";
@import "./_reduced-motion.css";
@import "./_base.css";
@import "./_page-bg.css";
@custom-variant dark (&:where([data-darkmode=true], [data-darkmode=true] *));
/* Minimal reset for this template, replacing the much larger Preflight. */
@layer base {
*,
*::before,
*::after {
@apply box-border;
}
body,
hr,
p,
button,
input {
@apply m-0;
}
button,
input {
@apply [font:inherit];
}
a {
@apply no-underline;
}
[hidden] {
@apply hidden!;
}
}
@keyframes divider-in {
from {
opacity: 0;
transform: scaleX(0.15);
}
}
.login-screen {
@apply relative flex min-h-dvh flex-col items-center justify-center px-5 pb-14;
}
.login-shell {
@apply w-full max-w-md;
}
/* Login maps its own token pair onto the shared page background layer. */
.page-bg {
--page-bg: var(--login-bg);
--page-bg-lqip: var(--login-bg-lqip);
}
/* Login tunables — the var() fallbacks reproduce today's look exactly
(opaque card, no blur, no scrim), so an unset config changes nothing;
the config app's :root overrides pull them live. data-bg is stamped by
header.ut only when a login background is set. */
body[data-bg] .page-bg::before {
@apply pointer-events-none absolute inset-0 z-1 content-[''] [background:color-mix(in_srgb,var(--bg)_var(--login-bg-scrim,0%),transparent)];
}
body[data-bg] .login-card {
@apply [background:color-mix(in_srgb,var(--surface)_var(--login-bg-alpha,100%),transparent)] [backdrop-filter:blur(var(--login-bg-blur,0px))_saturate(150%)];
}
/* login.css does not import _reduced-transparency.css (it would drag
admin-only tokens into the pruned sheet), so the login card carries its
own fallback: no blur, and the local --login-bg-alpha declaration
outranks the :root override to restore full opacity. */
@media (prefers-reduced-transparency: reduce) {
body[data-bg] .login-card {
--login-bg-alpha: 100%;
@apply [backdrop-filter:none]!;
}
}
.login-card {
@apply bg-surface flex flex-col gap-7 rounded-4xl p-14 shadow-lg max-md:rounded-3xl max-md:p-9;
}
.login-brand {
@apply flex items-center gap-3.5;
}
.login-divider {
@apply via-hairline h-px w-full animate-[divider-in_0.7s_cubic-bezier(0.16,1,0.3,1)_0.1s_both] border-0 bg-linear-to-r from-transparent to-transparent;
}
.login-logo {
@apply bg-brand-subtle ring-brand-subtle flex h-11 w-11 shrink-0 items-center justify-center rounded-2xl ring-1;
& img {
@apply h-6 w-6;
}
}
.login-title {
@apply flex flex-col gap-1;
}
.login-hostname {
@apply text-text text-xl font-semibold tracking-tight;
}
.login-subtitle {
@apply text-text text-sm;
}
.login-form {
@apply flex flex-col gap-5;
}
.login-fields {
@apply flex flex-col gap-4;
}
.login-field {
@apply flex flex-col gap-2;
}
.login-label {
@apply text-text text-xs font-semibold tracking-widest uppercase;
}
.input-wrap {
@apply border-hairline bg-control-bg relative rounded-2xl border [contain:layout_style];
}
/* Focus ring: opacity-only transition runs on compositor thread, not main thread —
border-color changes require a repaint (~400 ms INP); opacity changes do not. */
.input-wrap::after {
@apply border-brand pointer-events-none absolute -inset-px rounded-[calc(var(--radius-2xl)+1px)] border-2 opacity-0 content-[''] [transition:opacity_150ms_ease];
}
.input-wrap:focus-within::after {
@apply opacity-100;
}
.login-input {
@apply text-text placeholder:text-text-subtle w-full appearance-none rounded-2xl border-0 bg-transparent px-3 py-2.5 text-base outline-none;
}
.login-error {
@apply bg-danger-surface text-danger border-hairline rounded-2xl border px-3 py-2 text-center text-sm;
}
.login-actions {
@apply pt-4;
}
.login-submit {
@apply bg-brand text-on-brand w-full cursor-pointer rounded-2xl border-0 py-2.5 text-base font-medium hover:opacity-90 active:opacity-80;
}
.login-footer {
@apply text-text-muted absolute right-0 bottom-5 left-0 px-5 text-center text-xs;
& p {
@apply whitespace-normal;
}
& a {
@apply text-brand hover:underline;
}
}
-47
View File
@@ -1,47 +0,0 @@
/**
* Copyright (C) 2025 eamonxg <eamonxiong@gmail.com>
* Licensed under the Apache License, Version 2.0.
*/
/* Every shipped utility is referenced through @apply in these CSS sources.
Disabling automatic repository scanning prevents class-like words in docs,
scripts and fixtures from leaking into the OpenWrt payload. */
@import "tailwindcss" source(none);
@custom-variant dark (&:where([data-darkmode=true], [data-darkmode=true] *));
@import "@eamonxg/luci-theme-tokens/dist/aurora/tokens.css";
@import "./_icons.css";
@import "./_base.css";
@import "./_page-bg.css";
@import "./_elements.css";
@import "./_layout.css";
@import "./components/_nav.css";
@import "./components/_switcher.css";
@import "./components/_float-button.css";
@import "./components/_button.css";
@import "./components/_input.css";
@import "./components/_textarea.css";
@import "./components/_select.css";
@import "./components/_dropdown.css";
@import "./components/_tooltip.css";
@import "./components/_message.css";
@import "./components/_progress.css";
@import "./components/_badge.css";
@import "./components/_card.css";
@import "./components/_modal.css";
@import "./components/_overlay.css";
@import "./components/_table.css";
@import "./components/_syslog.css";
@import "./components/_form.css";
@import "./components/_segmented.css";
@import "./components/_tab.css";
@import "./components/_palette.css";
@import "./_page-bg-mode.css";
@import "./_utilities.css";
@import "./_reduced-motion.css";
@import "./_reduced-transparency.css";
@@ -1,120 +0,0 @@
/*
PATCH: admin-dashboard (luci-mod-dashboard)
Loaded on-demand by header.ut only when data-page matches this filename.
Native declarations keep this standalone patch free of Tailwind helper output;
theme values come through the :root custom properties.
*/
[data-page="admin-dashboard"] {
.Dashboard {
& > .section-content {
& .dashboard-bg {
background: var(--surface-overlay);
&.tr {
border-radius: 0;
}
&:not(.tr) {
border: 1px solid var(--hairline);
box-shadow: var(--app-shadow-lg);
&:hover {
border-color: var(--hairline);
/* The theme maps the xl utility onto --app-shadow-md. */
box-shadow: var(--app-shadow-md);
}
}
/* Dark mode: override custom.css hardcoded light-mode colors on all text nodes */
& span,
& td,
& th {
[data-darkmode="true"] & {
color: var(--text) !important;
}
}
img[src*=".svg"] {
[data-darkmode="true"] & {
filter: invert(100%);
}
}
/* Compact spacing for assoclist cells (carry .td/.th classes) */
& .td {
padding-block: 0.5rem;
@media (width < 48rem) {
padding-block: 0.25rem;
}
}
& .th {
padding-block: 0.5rem;
}
/* Inline info tables (e.g. DNS): strip card decoration, restore table layout */
& .table:not(.assoclist) {
margin-bottom: 0;
border-radius: 0;
border: 0;
background: transparent;
box-shadow: none;
& tr {
&:hover {
background: transparent;
}
@media (width < 48rem) {
display: table-row;
border: 0;
padding: 0;
}
}
& td {
border: 0;
padding: 0.125rem 0;
@media (width < 48rem) {
display: table-cell;
}
&:first-child {
padding-right: 0.5rem;
white-space: nowrap;
opacity: 0.7;
}
}
}
}
.title h3 {
color: var(--text);
border: 0;
padding-bottom: 1rem;
@media (width < 48rem) {
margin-inline: 0;
padding-bottom: 0.5rem;
}
}
.router-status-wifi {
.wifi-info .devices-info .tr .td {
&:nth-child(3) {
position: relative;
top: 0;
width: 100%;
padding-inline: 0;
}
@media (width < 48rem) {
flex: 1 1 50%;
}
}
}
}
}
}
@@ -1,12 +0,0 @@
/*
PATCH: admin-modem-modemdata-modempreview (luci-app-modemdata)
Loaded on-demand by header.ut only when data-page matches this filename.
Native declarations keep this standalone patch free of Tailwind helper output;
theme values come through the :root custom properties.
*/
[data-page="admin-modem-modemdata-modempreview"] {
& .ifacebox-body .ifacebadge {
width: auto !important;
}
}
@@ -1,206 +0,0 @@
/*
PATCH: admin-modem-qmodem (luci-app-qmodem)
Unified per-application patch — loaded on all admin/modem/qmodem/* pages.
Prefix-matched by header.ut: admin-modem-qmodem(-overview|-sms|…).
Native declarations keep this standalone patch free of Tailwind helper output;
theme values come through the :root custom properties.
*/
[data-page^="admin-modem-qmodem"] {
.copyright-section {
color: var(--text-muted) !important;
text-align: center !important;
background: var(--surface-sunken);
border: 1px solid var(--hairline);
}
fieldset.cbi-section > legend {
border-bottom: 1px solid var(--hairline);
color: var(--text);
float: left;
margin-bottom: 1rem;
width: 100%;
padding: 0 0 0.75rem;
line-height: 1.25;
}
fieldset.cbi-section {
display: flow-root;
}
fieldset.cbi-section > :not(legend) {
clear: both;
}
.cbi-section-table-titles.named::before {
background: var(--surface-sunken);
/* :root exposes only --radius-base; the theme's radius scale is
calc multiples of it (kept reactive to config overrides). */
border-top-left-radius: calc(var(--radius-base) * 2);
border-bottom: 1px solid var(--hairline) !important;
}
}
[data-page^="admin-modem-qmodem-sms-conversation"] {
#sms-messages-area {
border: 1px solid var(--hairline) !important;
background: var(--surface-sunken) !important;
color: var(--text) !important;
}
.sms-message-bubble {
border: 1px solid var(--hairline) !important;
background: var(--surface-overlay) !important;
color: var(--text) !important;
}
.sms-message-content {
color: var(--text) !important;
}
.sms-message-meta {
color: var(--text-muted) !important;
}
}
[data-page="admin-modem-qmodem-config_advanced"] {
/* NOTE: targets <li> directly (not li > a) because qmodem's tab markup
has no <a> inside tabs — so this won't auto-update with the shared
_segmented.css conventions. */
.cbi-tabmenu li {
color: var(--text-muted);
cursor: pointer;
border-radius: calc(var(--radius-base) * 4);
padding: 0.5rem 1rem;
text-align: center;
font-size: 0.875rem;
line-height: 1.25rem;
font-weight: 500;
white-space: nowrap;
transition:
color 0.15s,
background-color 0.15s;
&:hover {
color: var(--text);
background: var(--hover-faint);
}
&.cbi-tab {
background: var(--text);
color: var(--surface);
font-weight: 600;
box-shadow: var(--app-shadow-sm);
}
}
}
[data-page="admin-modem-qmodem-sms"] {
.td > div {
color: var(--text-muted) !important;
margin-top: 0.375rem !important;
font-size: 0.75rem !important;
line-height: 1.625 !important;
}
.td > span[style*="margin-left"] {
color: var(--text);
margin-left: 0.5rem !important;
}
.sms-conversations {
margin-top: 1.25rem;
margin-bottom: 0;
& > .cbi-section {
margin: 0 !important;
border: 0 !important;
background: transparent !important;
padding: 0 !important;
box-shadow: none !important;
}
& fieldset.cbi-section {
margin-bottom: 0;
}
& .table.cbi-section-table {
margin-bottom: 0;
overflow: hidden;
}
}
.cbi-section-table-row.tr {
color: var(--text);
transition:
color 0.15s,
background-color 0.15s;
& > .td,
& > td {
color: var(--text);
}
& > .td:nth-child(2),
& > td:nth-child(2) {
color: var(--text-muted);
}
&:hover {
background: var(--hover-faint) !important;
color: var(--text) !important;
& > .td,
& > td {
color: var(--text) !important;
background: transparent !important;
}
}
}
.sms-unread-conversation {
background: var(--brand-subtle) !important;
font-weight: 600;
}
.sms-unread-badge {
background: var(--danger) !important;
color: var(--on-brand) !important;
margin-left: 0.5rem !important;
border-radius: 9999px !important;
padding: 0.125rem 0.5rem !important;
font-size: 0.75rem !important;
font-weight: 600 !important;
}
}
[data-page="admin-modem-qmodem-sms_sim"] {
.cbi-section-table-row.tr {
color: var(--text);
transition:
color 0.15s,
background-color 0.15s;
& > .td,
& > td {
color: var(--text);
}
&:hover {
background: var(--hover-faint) !important;
& > .td,
& > td {
color: var(--text) !important;
background: transparent !important;
}
}
}
}
[data-page="admin-modem-qmodem-settings"] {
.cbi-section-table-descr.named::before {
background: var(--surface-sunken);
content: "" !important;
}
}
@@ -1,12 +0,0 @@
/*
PATCH: admin-network-network (luci-app-network — bridge VLAN)
Loaded on-demand by header.ut only when data-page matches this filename.
Native declarations keep this standalone patch free of Tailwind helper output;
theme values come through the :root custom properties.
*/
@media (width < 48rem) {
[data-name="bridge-vlan"] > div {
overflow: visible !important;
}
}
@@ -1,13 +0,0 @@
/*
PATCH: admin-services-openclash-config (luci-app-openclash)
Loaded on-demand by header.ut only when data-page matches this filename.
Native declarations keep this standalone patch free of Tailwind helper output;
theme values come through the :root custom properties.
*/
[data-page="admin-services-openclash-config"] {
.sub_div img {
height: 1.25rem;
width: 1.25rem;
}
}
@@ -1,34 +0,0 @@
/*
PATCH: admin-services-openclash-settings (luci-app-openclash)
Loaded on-demand by header.ut only when data-page matches this filename.
Native declarations keep this standalone patch free of Tailwind helper output;
theme values come through the :root custom properties.
*/
[data-page="admin-services-openclash-settings"] {
@media (width < 48rem) {
.cbi-value-field .cbi-input-select {
width: 100% !important;
}
}
.diag-style {
& > div {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.5rem;
}
@media (width < 48rem) {
display: grid;
grid-template-columns: repeat(1, minmax(0, 1fr));
gap: 1rem;
& > div {
width: 100% !important;
gap: 0.25rem;
}
}
}
}
@@ -1,10 +0,0 @@
/*
PATCH: admin-statistics-graphs (luci-app-statistics)
Loaded on-demand by header.ut only when data-page matches this filename.
Native declarations keep this standalone patch free of Tailwind helper output;
theme values come through the :root custom properties.
*/
[data-darkmode="true"] [data-page="admin-statistics-graphs"] [data-plugin] img {
filter: hue-rotate(150deg) invert(100%);
}
@@ -1,35 +0,0 @@
/*
PATCH: admin-system-diskman (luci-app-diskman)
Loaded on-demand by header.ut only when data-page matches this filename —
the prefix match also covers .../partition/<dev> and .../btrfs/<uuid>.
Native declarations keep this standalone patch free of Tailwind helper output;
theme values come through the :root custom properties.
*/
[data-page^="admin-system-diskman"] {
/* disk_info.htm injects the partition bar as a full-span row whose cell carries
an inline white-space:nowrap. Once .tr turns into a flex row on mobile, that
cell's automatic minimum size is its min-content — the whole unwrapped bar —
so it refuses to shrink and drags the page ~300px wide. Zero the minimum and
give the bar its own row. */
td[colspan]:has(> div[title]) {
flex: 0 0 100%;
min-width: 0;
overflow: hidden;
border-radius: var(--radius-base);
/* The segments are inline-blocks sized in percent: any whitespace between
them adds a word space on top of the 100% they already sum to. */
font-size: 0;
}
/* Each segment is exactly as wide as its share of the disk, but its label does
not wrap and spills onto the neighbouring segments. Clip it — the full text
stays available through the title attribute. */
td[colspan] > div[title],
.tr > div[style*="nowrap"] > div[title] {
overflow: hidden;
font-size: 0.75rem;
line-height: 1.5rem;
text-overflow: ellipsis;
}
}
@@ -1,17 +0,0 @@
/*
PATCH: admin-system-filemanager (luci-app-filemanager)
Loaded on-demand by header.ut only when data-page matches this filename.
Native declarations keep this standalone patch free of Tailwind helper output;
theme values come through the :root custom properties.
*/
[data-page="admin-system-filemanager"] {
#file-manager-container {
overflow: auto;
#status-bar {
background: var(--surface);
border: 0;
}
}
}
File diff suppressed because it is too large. Load diff
@@ -1,297 +0,0 @@
"use strict";
/* Aurora log viewer — enhances the read-only <textarea id="syslog"> on the
System Log and Kernel Log pages (both under admin/status/logs/* on every
supported release, so this one patch name covers them) into a parsed,
column-aligned view. The textarea stays in the DOM as the data source:
LuCI's own poll keeps rewriting its .value, which never fires events or
mutations, so a cheap dirty-check interval re-reads it instead. When too
few lines parse (PARSE_GATE), the enhancement tears itself down and the
stock textarea shows again — the worst case is the styled status quo,
never a garbled log. Node tests require() the parsing exports below. */
(function () {
// RFC 5424 short names exactly as LuCI emits them. tools/views.js reads the
// untranslated slot of its tables and ubox logread prints C-locale names, so
// UI language never changes these. A line whose facility/severity falls
// outside the whitelists is not a log format we know — shown raw, uncolored.
const FACILITIES = new Set([
"kern",
"user",
"mail",
"daemon",
"auth",
"syslog",
"lpr",
"news",
"uucp",
"cron",
"authpriv",
"ftp",
"ntp",
"security",
"console",
"local0",
"local1",
"local2",
"local3",
"local4",
"local5",
"local6",
"local7",
"unknown",
]);
const SEVERITIES = new Set([
"emerg",
"alert",
"crit",
"err",
"warn",
"notice",
"info",
"debug",
]);
const SEV_CLASS = {
emerg: "crit",
alert: "crit",
crit: "crit",
err: "err",
warn: "warn",
notice: "notice",
info: "info",
debug: "debug",
};
// Below this parse-success ratio the value is not a log we understand
// (syslog-ng replacement, future format change) — fall back to the textarea.
const PARSE_GATE = 0.8;
function splitTag(rest) {
// `tag[pid]: msg` / `tag: msg`; tags with spaces (kernel's
// "mt7921e 0000:01:00.0:") deliberately fail into plain msg.
const m = rest.match(/^([A-Za-z0-9_.\/-]+(?:\[\d+\])?):\s+([\s\S]*)$/);
return m ? { tag: m[1], msg: m[2] } : { tag: "", msg: rest };
}
/* System log line, two shapes:
A (master RPC): [<locale datestr>] fac.sev: tag[pid]: msg
B (classic logread, Www Mmm dd hh:mm:ss yyyy fac.sev tag[pid]: msg
23.05 + 24.10 syslog-wrapper + master's RPC-failure fallback)
Every captured token is kept verbatim — year, timezone, 12-hour clock,
ctime's padded day, the colons — so rejoining the rendered fields with
single spaces reproduces the source line byte for byte. The enhancement
aligns and colors; it never rewrites. */
function parseSyslogLine(line) {
let m = line.match(/^\[(.+?)\]\s+(\w+)\.(\w+):\s+([\s\S]*)$/);
if (m && FACILITIES.has(m[2]) && SEVERITIES.has(m[3]))
return {
time: `[${m[1]}]`,
fac: m[2],
sev: m[3],
sevTok: `${m[2]}.${m[3]}:`,
...splitTag(m[4]),
};
m = line.match(
/^(\w{3} \w{3} +\d{1,2} \d{2}:\d{2}:\d{2} \d{4}) (\w+)\.(\w+) ([\s\S]*)$/,
);
if (m && FACILITIES.has(m[2]) && SEVERITIES.has(m[3]))
return {
time: m[1],
fac: m[2],
sev: m[3],
sevTok: `${m[2]}.${m[3]}`,
...splitTag(m[4]),
};
return null;
}
/* Kernel log line: `[ 73412.882110] msg`. No severity survives into the
text on any LuCI version (master runs `dmesg -r` and strips the <N>
prefix after filtering on it; the classic pages never had it), and kernel
messages have no uniform tag grammar — drivers print "name addr.dev
port:", bare text, indented continuations — which is why upstream renders
dmesg as plain unstyled text. A partial tag split styled only some lines
and ate only their colons, so the message stays verbatim: time dimming
and typography only. */
function parseDmesgLine(line) {
const m = line.match(/^(\[\s*\d+\.\d+\])\s?([\s\S]*)$/);
if (!m) return null;
return {
time: m[1],
fac: "",
sev: "",
sevTok: "",
tag: "",
msg: m[2],
};
}
function evaluate(value, parseLine) {
const lines = value ? value.split(/\n/) : [];
const rows = lines.map((line) => ({ line, parsed: parseLine(line) }));
const parsed = rows.reduce((n, r) => n + (r.parsed ? 1 : 0), 0);
return { rows, ratio: rows.length ? parsed / rows.length : 1 };
}
if (typeof module !== "undefined" && module.exports) {
module.exports = {
parseSyslogLine,
parseDmesgLine,
splitTag,
evaluate,
PARSE_GATE,
};
}
if (typeof document === "undefined") return;
// Kernel-log page under either menu layout: admin-status-dmesg on
// 23.05/24.10, admin-status-logs-dmesg on master's combined Logs menu.
// Read per mount: the router swaps pages without re-evaluating this file.
let parseLine = parseSyslogLine;
let timer = null;
let arrival = null;
let viewer = null;
let lastValue = null;
function span(cls, text, title) {
const el = document.createElement("span");
el.className = cls;
el.textContent = text;
if (title) el.title = title;
return el;
}
function buildRow(entry) {
const row = document.createElement("div");
if (!entry.parsed) {
row.className = "log-row";
row.textContent = entry.line;
return row;
}
const p = entry.parsed;
row.className = "log-row" + (p.sev ? ` lv-${SEV_CLASS[p.sev]}` : "");
// Real space text nodes between plain inline spans: the row wraps like
// terminal output, and because every field renders verbatim (punctuation
// included) a copied row is byte-identical to the source line.
row.appendChild(span("log-time", p.time));
if (p.sevTok) {
row.appendChild(document.createTextNode(" "));
row.appendChild(span("log-sev", p.sevTok));
}
if (p.tag) {
row.appendChild(document.createTextNode(" "));
row.appendChild(span("log-tag", p.tag + ":"));
}
row.appendChild(document.createTextNode(" "));
row.appendChild(span("log-msg", p.msg));
return row;
}
function selectionInside(el) {
const sel = window.getSelection && window.getSelection();
if (!sel || sel.isCollapsed) return false;
return el.contains(sel.anchorNode) || el.contains(sel.focusNode);
}
function teardown(container) {
if (viewer) viewer.remove();
viewer = null;
container.classList.remove("log-enhanced");
}
function render(textarea, container, rows) {
if (!viewer) {
viewer = document.createElement("div");
viewer.className = "syslog-view";
// The stock textarea contained Ctrl+A for free — a focused form control
// is its own selection context. A plain div is not (the standard switch,
// user-select:contain, ships in no browser), so reproduce it: clicking
// the log focuses the viewer, and select-all inside it stays inside it.
viewer.tabIndex = 0;
viewer.addEventListener("keydown", function (e) {
if ((e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "a") {
e.preventDefault();
const sel = window.getSelection();
sel.removeAllRanges();
const range = document.createRange();
range.selectNodeContents(viewer);
sel.addRange(range);
}
});
textarea.insertAdjacentElement("afterend", viewer);
container.classList.add("log-enhanced");
}
const frag = document.createDocumentFragment();
for (const entry of rows) frag.appendChild(buildRow(entry));
viewer.replaceChildren(frag);
}
function tick() {
const textarea = document.getElementById("syslog");
const container = document.getElementById("content_syslog");
if (!textarea || !container) return;
const value = textarea.value;
if (value === lastValue) return;
// Re-rendering would destroy an in-progress selection; retry next tick.
if (viewer && selectionInside(viewer)) return;
lastValue = value;
const { rows, ratio } = evaluate(value, parseLine);
if (ratio >= PARSE_GATE) {
// Tail-follow: a reader already pinned to the bottom stays pinned as new
// lines arrive; any other scroll position is never touched. The content
// area scrolls the window (main uses min-h, no inner scroller), and the
// `viewer &&` guard keeps the first paint from jumping — same as stock.
const follow =
viewer &&
window.innerHeight + window.scrollY >=
document.documentElement.scrollHeight - 40;
render(textarea, container, rows);
if (follow) window.scrollTo(0, document.documentElement.scrollHeight);
} else teardown(container);
}
function mount() {
if (timer) return;
const page = document.body?.dataset?.page || "";
parseLine = /(^|-)dmesg(-|$)/.test(page) ? parseDmesgLine : parseSyslogLine;
lastValue = null;
// Content updates: LuCI's poll rewrites .value, which fires nothing — a
// cheap dirty-check covers it.
timer = setInterval(tick, 1000);
// First paint: the view (and its textarea) is inserted asynchronously by
// LuCI after this script runs. Element insertion IS an observable childList
// mutation (unlike .value writes), and the callback runs as a microtask
// before the browser paints the inserted textarea — so the viewer takes
// over without a flash of the raw log.
if (document.getElementById("syslog")) {
tick();
} else {
arrival = new MutationObserver(function () {
if (!document.getElementById("syslog")) return;
arrival.disconnect();
arrival = null;
tick();
});
arrival.observe(document.documentElement, {
childList: true,
subtree: true,
});
}
}
function unmount() {
clearInterval(timer);
timer = null;
arrival?.disconnect();
arrival = null;
const container = document.getElementById("content_syslog");
if (container) teardown(container);
viewer = null;
}
// Page-scoped lifecycle for the router (see .dev/docs/router.md);
// a full load simply mounts once.
(window.luciPatches ??= {})["admin-status-logs"] = {
mount,
unmount,
};
mount();
})();