Adding the correct stylesheet
This commit is contained in:
1 parent
fac7b9a082
commit
5a90ce51d8
7 files changed
+820
-626
No files matched your search
+347
-48
@@ -1,57 +1,356 @@
|
||||
/* Base layout, header/nav */
|
||||
* { box-sizing: border-box; }
|
||||
body { margin: 0; font-family: -apple-system, Segoe UI, Arial, sans-serif; background: #f5f7fa; color: #222; }
|
||||
.site-header {
|
||||
display: flex; align-items: center; gap: 24px;
|
||||
padding: 10px 20px; background: #2c3e50; color: #ecf0f1;
|
||||
box-shadow: 0 2px 4px rgba(0,0,0,.1);
|
||||
/* ========================================================================
|
||||
Design Tokens — dark theme (slate/indigo)
|
||||
======================================================================== */
|
||||
:root {
|
||||
/* Surfaces */
|
||||
--bg: #0b1220;
|
||||
--surface: #131c2e;
|
||||
--surface-2: #1a2540;
|
||||
--surface-3: #223052;
|
||||
--border: #263654;
|
||||
--border-hi: #36507d;
|
||||
|
||||
/* Text */
|
||||
--text: #e6edf7;
|
||||
--text-muted: #9fb0cb;
|
||||
--text-dim: #6c7fa2;
|
||||
|
||||
/* Brand / accent */
|
||||
--accent: #60a5fa;
|
||||
--accent-hover: #3b82f6;
|
||||
--accent-dim: #1e3a8a;
|
||||
|
||||
/* Semantic */
|
||||
--success: #10b981;
|
||||
--success-bg: #053b2d;
|
||||
--warning: #f59e0b;
|
||||
--warning-bg: #3a2608;
|
||||
--danger: #ef4444;
|
||||
--danger-bg: #3b0f0f;
|
||||
--info: #38bdf8;
|
||||
--info-bg: #052b3a;
|
||||
|
||||
/* Elevation */
|
||||
--shadow-sm: 0 1px 2px rgba(0,0,0,.3);
|
||||
--shadow-md: 0 2px 8px rgba(0,0,0,.35);
|
||||
--shadow-lg: 0 8px 24px rgba(0,0,0,.45);
|
||||
|
||||
/* Radii & spacing */
|
||||
--radius-sm: 4px;
|
||||
--radius-md: 6px;
|
||||
--radius-lg: 10px;
|
||||
|
||||
/* Typography */
|
||||
--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
--font-mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
|
||||
}
|
||||
.site-header .brand a { color: #ecf0f1; text-decoration: none; font-weight: 600; font-size: 18px; }
|
||||
.main-nav { display: flex; gap: 16px; flex: 1; flex-wrap: wrap; }
|
||||
.main-nav a { color: #bdc3c7; text-decoration: none; padding: 6px 10px; border-radius: 4px; }
|
||||
.main-nav a:hover { background: #34495e; color: #fff; }
|
||||
.main-nav a.active { background: #3498db; color: #fff; }
|
||||
|
||||
/* ========================================================================
|
||||
Reset & base
|
||||
======================================================================== */
|
||||
* { box-sizing: border-box; }
|
||||
html, body { height: 100%; }
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: var(--font);
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
a { color: var(--accent); text-decoration: none; }
|
||||
a:hover { color: var(--accent-hover); text-decoration: underline; }
|
||||
|
||||
h1, h2, h3, h4 { margin: 0 0 0.5rem 0; font-weight: 600; color: var(--text); }
|
||||
h1 { font-size: 1.4rem; }
|
||||
h2 { font-size: 1.15rem; }
|
||||
h3 { font-size: 1rem; }
|
||||
|
||||
hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }
|
||||
|
||||
code, pre { font-family: var(--font-mono); }
|
||||
|
||||
/* ========================================================================
|
||||
Header & nav
|
||||
======================================================================== */
|
||||
.site-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 24px;
|
||||
padding: 10px 24px;
|
||||
background: var(--surface);
|
||||
border-bottom: 1px solid var(--border);
|
||||
box-shadow: var(--shadow-sm);
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
}
|
||||
.site-header .brand a {
|
||||
color: var(--text);
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
}
|
||||
.site-header .brand a:hover { text-decoration: none; color: var(--accent); }
|
||||
|
||||
.main-nav {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
flex: 1;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.main-nav a {
|
||||
color: var(--text-muted);
|
||||
padding: 7px 14px;
|
||||
border-radius: var(--radius-sm);
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
transition: background .15s, color .15s;
|
||||
}
|
||||
.main-nav a:hover {
|
||||
background: var(--surface-2);
|
||||
color: var(--text);
|
||||
text-decoration: none;
|
||||
}
|
||||
.main-nav a.active {
|
||||
background: var(--accent-dim);
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.user-menu { display: flex; align-items: center; gap: 10px; }
|
||||
.user-menu .username { font-size: 13px; opacity: 0.85; }
|
||||
.btn-logout { background: #e74c3c; color: #fff; border: 0; padding: 6px 12px; border-radius: 4px; cursor: pointer; }
|
||||
.btn-logout:hover { background: #c0392b; }
|
||||
.site-main { padding: 20px; }
|
||||
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 16px; flex-wrap: wrap; }
|
||||
.user-menu .username {
|
||||
font-size: 13px;
|
||||
color: var(--text-muted);
|
||||
padding: 4px 8px;
|
||||
background: var(--surface-2);
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
.btn-logout {
|
||||
background: transparent;
|
||||
color: var(--text-muted);
|
||||
border: 1px solid var(--border);
|
||||
padding: 6px 12px;
|
||||
border-radius: var(--radius-sm);
|
||||
cursor: pointer;
|
||||
font-size: 13px;
|
||||
transition: background .15s, color .15s, border-color .15s;
|
||||
}
|
||||
.btn-logout:hover {
|
||||
background: var(--danger-bg);
|
||||
color: var(--danger);
|
||||
border-color: var(--danger);
|
||||
}
|
||||
|
||||
.site-main { padding: 20px 24px; max-width: 1600px; margin: 0 auto; }
|
||||
|
||||
/* ========================================================================
|
||||
Page scaffolding
|
||||
======================================================================== */
|
||||
.page-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 16px;
|
||||
gap: 16px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.page-header h1 { margin: 0; font-size: 22px; }
|
||||
|
||||
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
|
||||
.filters select, .filters input { padding: 6px 10px; border: 1px solid #ccc; border-radius: 4px; }
|
||||
.filters select, .filters input {
|
||||
padding: 7px 10px;
|
||||
border: 1px solid var(--border);
|
||||
background: var(--surface-2);
|
||||
color: var(--text);
|
||||
border-radius: var(--radius-sm);
|
||||
font-size: 13px;
|
||||
}
|
||||
.filters select:focus, .filters input:focus {
|
||||
outline: none;
|
||||
border-color: var(--accent);
|
||||
box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.15);
|
||||
}
|
||||
|
||||
/* Tables */
|
||||
.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
|
||||
.data-table th, .data-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #eee; font-size: 14px; }
|
||||
.data-table th { background: #f0f2f5; font-weight: 600; }
|
||||
.data-table tr:hover { background: #fafbfc; }
|
||||
.sev.CRITICAL { color: #fff; background: #c0392b; padding: 2px 8px; border-radius: 3px; font-size: 12px; }
|
||||
.sev.WARNING { color: #fff; background: #e67e22; padding: 2px 8px; border-radius: 3px; font-size: 12px; }
|
||||
.sev.INFO { color: #fff; background: #2980b9; padding: 2px 8px; border-radius: 3px; font-size: 12px; }
|
||||
.muted { color: var(--text-dim); font-size: 13px; }
|
||||
|
||||
/* Settings */
|
||||
.settings-section { background: #fff; border-radius: 6px; padding: 16px 20px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
|
||||
.settings-section h2 { margin-top: 0; font-size: 18px; }
|
||||
.settings-section form { display: flex; flex-direction: column; gap: 10px; max-width: 480px; }
|
||||
.settings-section label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
|
||||
.settings-section label[type=checkbox] input, .settings-section input[type=checkbox] + * { display: inline; }
|
||||
.settings-section input, .settings-section select { padding: 6px 8px; border: 1px solid #ccc; border-radius: 4px; }
|
||||
/* ========================================================================
|
||||
Tables
|
||||
======================================================================== */
|
||||
.data-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-md);
|
||||
overflow: hidden;
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
.data-table th, .data-table td {
|
||||
text-align: left;
|
||||
padding: 10px 14px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
font-size: 13px;
|
||||
color: var(--text);
|
||||
}
|
||||
.data-table th {
|
||||
background: var(--surface-2);
|
||||
font-weight: 600;
|
||||
color: var(--text-muted);
|
||||
text-transform: uppercase;
|
||||
font-size: 11px;
|
||||
letter-spacing: .5px;
|
||||
}
|
||||
.data-table tr:last-child td { border-bottom: none; }
|
||||
.data-table tr:hover td { background: var(--surface-2); }
|
||||
|
||||
/* Severity pills */
|
||||
.sev {
|
||||
display: inline-block;
|
||||
padding: 2px 10px;
|
||||
border-radius: 999px;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: .5px;
|
||||
}
|
||||
.sev.CRITICAL { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger); }
|
||||
.sev.WARNING { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning); }
|
||||
.sev.INFO { background: var(--info-bg); color: var(--info); border: 1px solid var(--info); }
|
||||
|
||||
/* ========================================================================
|
||||
Settings
|
||||
======================================================================== */
|
||||
.settings-section {
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-md);
|
||||
padding: 20px 24px;
|
||||
margin-bottom: 20px;
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
.settings-section h2 {
|
||||
margin-top: 0;
|
||||
font-size: 16px;
|
||||
padding-bottom: 12px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.settings-section form { display: flex; flex-direction: column; gap: 12px; max-width: 520px; }
|
||||
.settings-section label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-muted); }
|
||||
.settings-section input, .settings-section select, .settings-section textarea {
|
||||
padding: 8px 10px;
|
||||
border: 1px solid var(--border);
|
||||
background: var(--surface-2);
|
||||
color: var(--text);
|
||||
border-radius: var(--radius-sm);
|
||||
font-size: 13px;
|
||||
font-family: inherit;
|
||||
}
|
||||
.settings-section input:focus, .settings-section select:focus, .settings-section textarea:focus {
|
||||
outline: none;
|
||||
border-color: var(--accent);
|
||||
box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.15);
|
||||
}
|
||||
.settings-section button { align-self: flex-start; }
|
||||
.muted { color: #777; font-size: 13px; }
|
||||
|
||||
/* Fleet overview */
|
||||
.fleet-overview { margin-bottom: 16px; }
|
||||
.fleet-card { background: #fff; border-radius: 6px; padding: 16px 20px; display: flex; gap: 24px; flex-wrap: wrap; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
|
||||
.fleet-stat { display: flex; flex-direction: column; gap: 4px; }
|
||||
.fleet-stat-label { color: #7f8c8d; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
|
||||
.fleet-stat-value { font-size: 22px; font-weight: 600; }
|
||||
.fleet-stat-value.online { color: #27ae60; }
|
||||
.fleet-stat-value.onbatt { color: #e67e22; }
|
||||
.fleet-stat-value.offline { color: #c0392b; }
|
||||
/* ========================================================================
|
||||
Buttons (global)
|
||||
======================================================================== */
|
||||
.btn-primary {
|
||||
background: var(--accent-hover);
|
||||
color: #fff;
|
||||
border: 0;
|
||||
padding: 9px 16px;
|
||||
border-radius: var(--radius-sm);
|
||||
cursor: pointer;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
transition: background .15s;
|
||||
}
|
||||
.btn-primary:hover { background: var(--accent); }
|
||||
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
|
||||
.btn-block { width: 100%; }
|
||||
|
||||
/* Card state dot */
|
||||
.state-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #95a5a6; margin-right: 6px; vertical-align: middle; }
|
||||
.state-dot.online { background: #27ae60; }
|
||||
.state-dot.offline { background: #c0392b; }
|
||||
.state-dot.onbatt { background: #e67e22; }
|
||||
/* ========================================================================
|
||||
Fleet overview
|
||||
======================================================================== */
|
||||
.fleet-overview { margin-bottom: 20px; }
|
||||
.fleet-card {
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-md);
|
||||
padding: 18px 22px;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
|
||||
gap: 20px;
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
.fleet-stat { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
|
||||
.fleet-stat-label {
|
||||
color: var(--text-dim);
|
||||
font-size: 11px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: .5px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.fleet-stat-value {
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
color: var(--text);
|
||||
line-height: 1.2;
|
||||
}
|
||||
.fleet-stat-value.online { color: var(--success); }
|
||||
.fleet-stat-value.onbatt { color: var(--warning); }
|
||||
.fleet-stat-value.offline { color: var(--danger); }
|
||||
|
||||
/* ========================================================================
|
||||
State indicators (shared)
|
||||
======================================================================== */
|
||||
.state-dot {
|
||||
display: inline-block;
|
||||
width: 10px; height: 10px;
|
||||
border-radius: 50%;
|
||||
background: var(--text-dim);
|
||||
margin-right: 8px;
|
||||
vertical-align: middle;
|
||||
box-shadow: 0 0 0 2px rgba(255,255,255,.05);
|
||||
}
|
||||
.state-dot.online { background: var(--success); box-shadow: 0 0 6px rgba(16,185,129,.5); }
|
||||
.state-dot.onbatt { background: var(--warning); box-shadow: 0 0 6px rgba(245,158,11,.5); }
|
||||
.state-dot.offline { background: var(--danger); box-shadow: 0 0 6px rgba(239,68,68,.5); }
|
||||
|
||||
/* ========================================================================
|
||||
Empty state
|
||||
======================================================================== */
|
||||
.empty-state {
|
||||
text-align: center;
|
||||
padding: 3rem 1.5rem;
|
||||
color: var(--text-muted);
|
||||
background: var(--surface);
|
||||
border: 1px dashed var(--border);
|
||||
border-radius: var(--radius-md);
|
||||
width: 100%;
|
||||
}
|
||||
.empty-state h3 { color: var(--text); margin-bottom: 0.5rem; }
|
||||
.empty-state a { color: var(--accent); }
|
||||
|
||||
/* ========================================================================
|
||||
Scrollbars
|
||||
======================================================================== */
|
||||
* { scrollbar-width: thin; scrollbar-color: var(--border-hi) var(--bg); }
|
||||
*::-webkit-scrollbar { width: 10px; height: 10px; }
|
||||
*::-webkit-scrollbar-track { background: var(--bg); }
|
||||
*::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 5px; border: 2px solid var(--bg); }
|
||||
*::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }
|
||||
|
||||
/* ========================================================================
|
||||
Responsive
|
||||
======================================================================== */
|
||||
@media (max-width: 768px) {
|
||||
.site-header { flex-direction: column; align-items: flex-start; gap: 12px; padding: 12px 16px; }
|
||||
.main-nav { width: 100%; }
|
||||
.site-main { padding: 16px; }
|
||||
.fleet-card { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 14px; padding: 14px 16px; }
|
||||
.fleet-stat-value { font-size: 20px; }
|
||||
}
|
||||
Reference in new issue
Block a user