2026-09-01 22:24:58 +02:00
|
|
|
/* Shared web UI chrome -- the base layout, navbar, sidebar, and footer
|
|
|
|
|
used by every ops-tool dashboard built on this module (yasta, yasl,
|
|
|
|
|
yaiam, yakwui, yamase-web, yamocir). Loaded after bootstrap.min.css.
|
|
|
|
|
Page-content styling (cards, tables, badges, forms, ...) is each
|
|
|
|
|
project's own concern and lives in that project's own stylesheet,
|
|
|
|
|
loaded alongside this one -- see PageHeader.ExtraHeadHTML.
|
2026-09-01 21:40:28 +02:00
|
|
|
|
2026-09-01 22:24:58 +02:00
|
|
|
The palette is exposed as --yw-* custom properties, not baked into
|
|
|
|
|
each rule -- a documented, reusable theme, not an implementation
|
|
|
|
|
detail. Exactly one theme ships today ("dark"); PageHeader.Theme
|
|
|
|
|
(see layout.go) renders as <html data-theme="...">, which is the seam
|
|
|
|
|
a second theme slots into: add its own :root[data-theme="..."] block
|
|
|
|
|
below with the same property list, new values -- nothing else in this
|
|
|
|
|
module changes, and unset Theme (every current consumer) keeps
|
|
|
|
|
resolving to the bare :root block, i.e. today's exact look. A project
|
|
|
|
|
needing a genuinely different look (not just a different accent)
|
|
|
|
|
should not redefine these globally -- see README.md's Theming
|
|
|
|
|
section. */
|
2026-08-29 00:19:06 +02:00
|
|
|
|
|
|
|
|
:root {
|
2026-09-01 21:40:28 +02:00
|
|
|
--yw-bg: #1a1d23;
|
|
|
|
|
--yw-text: #d4d8e0;
|
|
|
|
|
--yw-border: #333;
|
|
|
|
|
--yw-chrome-bg: #14171e;
|
|
|
|
|
--yw-chrome-border: #272d3a;
|
|
|
|
|
--yw-accent: #4fc3f7;
|
|
|
|
|
--yw-accent-rgb: 79, 195, 247;
|
|
|
|
|
--yw-nav-link: #0b82b8;
|
|
|
|
|
--yw-nav-link-hover-text: #c8d4e4;
|
|
|
|
|
--yw-subtitle: #5a7a9a;
|
|
|
|
|
--yw-subtitle-sep: #333c4a;
|
|
|
|
|
--yw-footer-text: #4a5a72;
|
|
|
|
|
--yw-success-bg: #192e22;
|
|
|
|
|
--yw-success-border: #2a5c3a;
|
|
|
|
|
--yw-success-text: #7ecf98;
|
|
|
|
|
--yw-danger-bg: #2e1820;
|
|
|
|
|
--yw-danger-border: #5c2a32;
|
2026-09-01 22:24:58 +02:00
|
|
|
--yw-danger-text: #e08090;
|
|
|
|
|
|
|
|
|
|
--bs-body-bg: var(--yw-bg);
|
|
|
|
|
--bs-body-color: var(--yw-text);
|
|
|
|
|
--bs-border-color: var(--yw-border);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Theme: "dark" -- explicit opt-in via PageHeader.Theme = "dark",
|
|
|
|
|
byte-identical to the bare :root block above (which is what unset
|
|
|
|
|
Theme resolves to). Kept in sync manually -- there are only ever a
|
|
|
|
|
handful of themes here, a preprocessor would be overkill. */
|
|
|
|
|
:root[data-theme="dark"] {
|
|
|
|
|
--yw-bg: #1a1d23;
|
|
|
|
|
--yw-text: #d4d8e0;
|
|
|
|
|
--yw-border: #333;
|
|
|
|
|
--yw-chrome-bg: #14171e;
|
|
|
|
|
--yw-chrome-border: #272d3a;
|
|
|
|
|
--yw-accent: #4fc3f7;
|
|
|
|
|
--yw-accent-rgb: 79, 195, 247;
|
|
|
|
|
--yw-nav-link: #0b82b8;
|
|
|
|
|
--yw-nav-link-hover-text: #c8d4e4;
|
|
|
|
|
--yw-subtitle: #5a7a9a;
|
|
|
|
|
--yw-subtitle-sep: #333c4a;
|
|
|
|
|
--yw-footer-text: #4a5a72;
|
|
|
|
|
--yw-success-bg: #192e22;
|
|
|
|
|
--yw-success-border: #2a5c3a;
|
|
|
|
|
--yw-success-text: #7ecf98;
|
|
|
|
|
--yw-danger-bg: #2e1820;
|
|
|
|
|
--yw-danger-border: #5c2a32;
|
2026-09-01 21:40:28 +02:00
|
|
|
--yw-danger-text: #e08090;
|
|
|
|
|
|
|
|
|
|
--bs-body-bg: var(--yw-bg);
|
|
|
|
|
--bs-body-color: var(--yw-text);
|
|
|
|
|
--bs-border-color: var(--yw-border);
|
2026-08-29 00:19:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
html {
|
|
|
|
|
height: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Flex column so the footer sits right after the content when the page is
|
|
|
|
|
short, and grows naturally when content is long. */
|
|
|
|
|
body {
|
2026-09-01 21:40:28 +02:00
|
|
|
background: var(--yw-bg);
|
|
|
|
|
color: var(--yw-text);
|
2026-08-29 00:19:06 +02:00
|
|
|
font-size: 0.875rem;
|
|
|
|
|
min-height: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* bootstrap.min.css's own ".container-fluid" rule sets
|
|
|
|
|
"display: flex; align-items: center; justify-content: space-between"
|
|
|
|
|
(meant for a navbar's inner container-fluid, but the selector isn't
|
|
|
|
|
scoped to .navbar, so it also matches the page's own top-level
|
|
|
|
|
.container-fluid below). Scoped to "body > .container-fluid" -- NOT a
|
|
|
|
|
bare ".container-fluid" -- so this doesn't also hijack the navbar's own
|
|
|
|
|
inner .container-fluid. */
|
|
|
|
|
body > .container-fluid {
|
|
|
|
|
flex: 1 0 auto;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: stretch;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* .row's own height must come from flex-grow, not a percentage
|
|
|
|
|
min-height: without this the sidebar's dark background only extends as
|
|
|
|
|
far as its own nav links on short pages instead of the full available
|
|
|
|
|
height. */
|
|
|
|
|
body > .container-fluid > .row {
|
|
|
|
|
flex: 1 0 auto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* --- Navbar ------------------------------------------------ */
|
|
|
|
|
.navbar {
|
2026-09-01 21:40:28 +02:00
|
|
|
background: var(--yw-chrome-bg) !important;
|
|
|
|
|
border-bottom: 1px solid var(--yw-chrome-border);
|
2026-08-29 00:19:06 +02:00
|
|
|
padding: .6rem 1.2rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.navbar-brand {
|
2026-09-01 21:40:28 +02:00
|
|
|
color: var(--yw-accent) !important;
|
2026-08-29 00:19:06 +02:00
|
|
|
letter-spacing: 2.5px;
|
|
|
|
|
font-size: 1rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.navbar-subtitle {
|
2026-09-01 21:40:28 +02:00
|
|
|
color: var(--yw-subtitle);
|
2026-08-29 00:19:06 +02:00
|
|
|
font-size: .82rem;
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
a.navbar-subtitle:hover {
|
2026-09-01 21:40:28 +02:00
|
|
|
color: var(--yw-accent);
|
2026-08-29 00:19:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.navbar-subtitle-sep {
|
2026-09-01 21:40:28 +02:00
|
|
|
color: var(--yw-subtitle-sep);
|
2026-08-29 00:19:06 +02:00
|
|
|
margin: 0 .5rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* --- Sidebar ------------------------------------------------ */
|
|
|
|
|
.sidebar {
|
2026-09-01 21:40:28 +02:00
|
|
|
background: var(--yw-chrome-bg);
|
|
|
|
|
border-right: 1px solid var(--yw-chrome-border);
|
2026-08-29 00:19:06 +02:00
|
|
|
padding-top: .5rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.sidebar .nav-link {
|
2026-09-01 21:40:28 +02:00
|
|
|
color: var(--yw-nav-link);
|
2026-08-29 00:19:06 +02:00
|
|
|
font-size: .85rem;
|
|
|
|
|
padding: .5rem 1rem;
|
|
|
|
|
border-radius: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.sidebar .nav-link:hover {
|
2026-09-01 21:40:28 +02:00
|
|
|
background: rgba(var(--yw-accent-rgb), .08);
|
|
|
|
|
color: var(--yw-nav-link-hover-text);
|
2026-08-29 00:19:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.sidebar .nav-link.active {
|
2026-09-01 21:40:28 +02:00
|
|
|
background: rgba(var(--yw-accent-rgb), .1);
|
|
|
|
|
color: var(--yw-accent);
|
2026-08-29 00:19:06 +02:00
|
|
|
font-weight: 600;
|
2026-09-01 21:40:28 +02:00
|
|
|
border-left: 2px solid var(--yw-accent);
|
2026-08-29 00:19:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* --- Alerts (flash banners) ---------------------------------------- */
|
2026-09-01 21:40:28 +02:00
|
|
|
.alert-success { background: var(--yw-success-bg); border-color: var(--yw-success-border); color: var(--yw-success-text); }
|
|
|
|
|
.alert-danger { background: var(--yw-danger-bg); border-color: var(--yw-danger-border); color: var(--yw-danger-text); }
|
2026-08-29 00:19:06 +02:00
|
|
|
|
|
|
|
|
/* --- Footer ------------------------------------------------- */
|
|
|
|
|
.footer {
|
2026-09-01 21:40:28 +02:00
|
|
|
color: var(--yw-footer-text);
|
2026-08-29 00:19:06 +02:00
|
|
|
font-size: 0.8rem;
|
|
|
|
|
text-align: center;
|
|
|
|
|
padding: 0.8rem 1rem;
|
2026-09-01 21:40:28 +02:00
|
|
|
border-top: 1px solid var(--yw-chrome-border);
|
2026-08-29 00:19:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@media (max-width: 767.98px) {
|
2026-09-01 21:40:28 +02:00
|
|
|
.sidebar { border-right: none; border-bottom: 1px solid var(--yw-chrome-border); }
|
2026-08-29 00:19:06 +02:00
|
|
|
}
|