(ui) Establish cohesive control panel styling

Refresh the shared base styling so the Django control panel has a calmer,
more polished production-tool feel across all pages. Update typography,
navigation, panels, metrics, host cards, tables, forms, buttons, messages,
focus states, and responsive behavior through reusable CSS variables and
component styles.

Refs #28
This commit is contained in:
2026-05-21 11:31:49 +02:00
parent 30cf93df27
commit 8aa3f1d1f5

View File

@@ -1,85 +1,189 @@
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}pobsync{% endblock %}</title> <title>{% block title %}pobsync{% endblock %}</title>
<style> <style>
:root { :root {
color-scheme: light; color-scheme: light;
--bg: #f5f7fa; --bg: #f2f5f8;
--bg-soft: #f8fafc;
--panel: #ffffff; --panel: #ffffff;
--border: #d9e0e8; --panel-subtle: #fbfcfe;
--text: #17202a; --border: #d8e1eb;
--muted: #657386; --border-strong: #c7d2df;
--link: #0b5cad; --text: #121a24;
--success: #176b3a; --muted: #65758a;
--failed: #a12828; --muted-strong: #46566a;
--link: #075fae;
--link-strong: #064b89;
--success: #17633a;
--failed: #a73333;
--running: #8a5a00; --running: #8a5a00;
--queued: #075fae;
--shadow-sm: 0 1px 2px rgba(18, 26, 36, 0.05);
--shadow-md: 0 10px 28px rgba(18, 26, 36, 0.08);
--radius: 8px;
} }
* { box-sizing: border-box; } * { box-sizing: border-box; }
body { body {
margin: 0; margin: 0;
background: var(--bg); background: var(--bg);
color: var(--text); color: var(--text);
font: 14px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font: 14px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
} }
a { color: var(--link); text-decoration: none; } a { color: var(--link); font-weight: 560; text-decoration: none; }
a:hover { text-decoration: underline; } a:hover { text-decoration: underline; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
outline: 3px solid rgba(7, 95, 174, 0.24);
outline-offset: 2px;
}
header { header {
background: var(--panel); background: var(--panel);
border-bottom: 1px solid var(--border); border-bottom: 1px solid var(--border);
padding: 14px 24px; box-shadow: var(--shadow-sm);
padding: 0 24px;
position: sticky;
top: 0;
z-index: 20;
} }
nav { nav {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 18px; gap: 6px;
max-width: 1180px; max-width: 1180px;
margin: 0 auto; margin: 0 auto;
min-height: 48px;
} }
nav strong { font-size: 16px; } nav strong {
font-size: 16px;
margin-right: 10px;
}
nav a {
border-radius: 6px;
color: var(--muted-strong);
padding: 6px 8px;
}
nav a:hover {
background: var(--bg-soft);
color: var(--link-strong);
text-decoration: none;
}
nav strong a {
color: var(--link-strong);
font-weight: 750;
padding-left: 0;
}
nav strong a:hover { background: transparent; }
nav .spacer { flex: 1; } nav .spacer { flex: 1; }
main { main {
max-width: 1180px; max-width: 1180px;
margin: 0 auto; margin: 0 auto;
padding: 24px; padding: 28px 24px 42px;
} }
h1 { font-size: 26px; margin: 0 0 18px; } h1 {
h2 { font-size: 18px; margin: 0 0 12px; } font-size: clamp(28px, 3vw, 36px);
letter-spacing: 0;
line-height: 1.15;
margin: 0 0 18px;
}
h2 {
font-size: 18px;
letter-spacing: 0;
line-height: 1.25;
margin: 0 0 14px;
}
h3 {
font-size: 15px;
letter-spacing: 0;
margin: 16px 0 8px;
}
p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }
.grid { .grid {
display: grid; display: grid;
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
gap: 12px; gap: 12px;
margin-bottom: 22px; margin-bottom: 20px;
} }
.metric, .panel { .metric, .panel {
background: var(--panel); background: var(--panel);
border: 1px solid var(--border); border: 1px solid var(--border);
border-radius: 8px; border-radius: var(--radius);
box-shadow: var(--shadow-sm);
}
.metric {
min-height: 88px;
padding: 14px 15px;
}
.metric .label {
color: var(--muted);
font-size: 11px;
font-weight: 700;
letter-spacing: 0.04em;
text-transform: uppercase;
}
.metric .value {
font-size: 27px;
font-weight: 760;
line-height: 1.15;
margin-top: 6px;
overflow-wrap: anywhere;
} }
.metric { padding: 14px; }
.metric .label { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.metric .value { font-size: 26px; font-weight: 650; margin-top: 4px; }
.metric.failed { border-color: #e8b4b4; background: #fff7f7; } .metric.failed { border-color: #e8b4b4; background: #fff7f7; }
.metric.warning { border-color: #e7cf8a; background: #fffaf0; } .metric.warning { border-color: #e7cf8a; background: #fffaf0; }
.metric.running { border-color: #e7cf8a; background: #fffaf0; } .metric.running { border-color: #e7cf8a; background: #fffaf0; }
.metric.queued { border-color: #b5cdea; background: #eef6ff; } .metric.queued { border-color: #b5cdea; background: #eef6ff; }
.panel { padding: 16px; margin-bottom: 18px; overflow: auto; } .panel {
margin-bottom: 18px;
overflow: auto;
padding: 18px;
}
.panel > h2:first-child {
align-items: center;
display: flex;
gap: 10px;
justify-content: space-between;
}
.panel.highlight { border-left: 4px solid var(--border); } .panel.highlight { border-left: 4px solid var(--border); }
.panel.highlight.failed { border-left-color: var(--failed); background: #fff7f7; } .panel.highlight.failed { border-left-color: var(--failed); background: #fff7f7; }
.panel.highlight.warning { border-left-color: var(--running); background: #fffaf0; } .panel.highlight.warning { border-left-color: var(--running); background: #fffaf0; }
.panel.highlight.success { border-left-color: var(--success); background: #f5fbf7; } .panel.highlight.success { border-left-color: var(--success); background: #f5fbf7; }
table { width: 100%; border-collapse: collapse; min-width: 640px; } table {
th, td { border-bottom: 1px solid var(--border); padding: 9px 8px; text-align: left; vertical-align: top; } border-collapse: collapse;
th { color: var(--muted); font-size: 12px; font-weight: 650; text-transform: uppercase; } min-width: 640px;
width: 100%;
}
th, td {
border-bottom: 1px solid var(--border);
padding: 10px 9px;
text-align: left;
vertical-align: top;
}
th {
background: var(--panel-subtle);
color: var(--muted);
font-size: 11px;
font-weight: 750;
letter-spacing: 0.04em;
text-transform: uppercase;
}
tbody tr:hover td { background: #f9fbfd; }
tr:last-child td { border-bottom: 0; } tr:last-child td { border-bottom: 0; }
.muted { color: var(--muted); } .muted { color: var(--muted); }
.status { .status {
display: inline-block; display: inline-block;
border: 1px solid var(--border); border: 1px solid var(--border);
border-radius: 999px; border-radius: 999px;
padding: 2px 8px; font-size: 12px;
font-weight: 700;
line-height: 1.35;
padding: 3px 8px;
white-space: nowrap; white-space: nowrap;
} }
.status.success { color: var(--success); border-color: #a7d8b9; background: #edf8f1; } .status.success { color: var(--success); border-color: #a7d8b9; background: #edf8f1; }
@@ -88,29 +192,39 @@
.status.blocked { color: var(--failed); border-color: #e8b4b4; background: #fff0f0; } .status.blocked { color: var(--failed); border-color: #e8b4b4; background: #fff0f0; }
.status.running { color: var(--running); border-color: #e7cf8a; background: #fff8df; } .status.running { color: var(--running); border-color: #e7cf8a; background: #fff8df; }
.status.warning { color: var(--running); border-color: #e7cf8a; background: #fff8df; } .status.warning { color: var(--running); border-color: #e7cf8a; background: #fff8df; }
.status.queued { color: var(--link); border-color: #b5cdea; background: #eef6ff; } .status.queued { color: var(--queued); border-color: #b5cdea; background: #eef6ff; }
.status.skipped { color: var(--muted); background: #f7f9fb; } .status.skipped { color: var(--muted); background: #f7f9fb; }
.stack { display: grid; gap: 4px; } .stack { display: grid; gap: 5px; }
.stack.spaced { margin-bottom: 14px; } .stack.spaced { margin-bottom: 14px; }
.two-col { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .two-col { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; } .actions {
align-items: center;
display: flex;
flex-wrap: wrap;
gap: 10px;
margin: 0 0 20px;
}
.actions.inline { margin: 12px 0 0; } .actions.inline { margin: 12px 0 0; }
button, .button-link { button, .button-link {
appearance: none; appearance: none;
background: #17202a; background: var(--text);
border: 1px solid #17202a; border: 1px solid var(--text);
border-radius: 6px; border-radius: 6px;
color: #fff; color: #fff;
cursor: pointer; cursor: pointer;
font: inherit; font: inherit;
font-weight: 650; font-weight: 700;
padding: 8px 12px; line-height: 1.25;
padding: 8px 13px;
}
button:hover, .button-link:hover {
background: #273343;
text-decoration: none;
} }
button:hover, .button-link:hover { background: #2a394a; text-decoration: none; }
button.secondary, button.secondary,
.button-link.secondary { .button-link.secondary {
background: #fff; background: #fff;
border-color: var(--border); border-color: var(--border-strong);
color: var(--text); color: var(--text);
} }
button.secondary:hover, button.secondary:hover,
@@ -129,11 +243,11 @@
.status-summary { .status-summary {
align-items: center; align-items: center;
border: 1px solid var(--border); border: 1px solid var(--border);
border-radius: 6px; border-radius: var(--radius);
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 8px; gap: 8px;
padding: 10px; padding: 11px 12px;
} }
.status-summary.failed { border-color: #e8b4b4; background: #fff7f7; color: var(--failed); } .status-summary.failed { border-color: #e8b4b4; background: #fff7f7; color: var(--failed); }
.status-summary.warning, .status-summary.warning,
@@ -191,7 +305,7 @@
.insight-main .value, .insight-main .value,
.insight-item .value { .insight-item .value {
font-size: 22px; font-size: 22px;
font-weight: 650; font-weight: 760;
overflow-wrap: anywhere; overflow-wrap: anywhere;
} }
.storage-meter { .storage-meter {
@@ -213,9 +327,14 @@
} }
.host-card { .host-card {
border: 1px solid var(--border); border: 1px solid var(--border);
border-radius: 8px; border-radius: var(--radius);
box-shadow: var(--shadow-sm);
padding: 16px; padding: 16px;
} }
.host-card:hover {
border-color: var(--border-strong);
box-shadow: var(--shadow-md);
}
.host-card-header { .host-card-header {
align-items: start; align-items: start;
display: flex; display: flex;
@@ -230,7 +349,7 @@
} }
.host-card-title a { .host-card-title a {
font-size: 17px; font-size: 17px;
font-weight: 650; font-weight: 750;
overflow-wrap: anywhere; overflow-wrap: anywhere;
} }
.host-card-status { .host-card-status {
@@ -266,10 +385,12 @@
.host-card-stats { .host-card-stats {
align-content: start; align-content: start;
display: grid; display: grid;
border-top: 1px solid #e6edf4; background: var(--bg-soft);
border: 1px solid #e6edf4;
border-radius: var(--radius);
gap: 12px 18px; gap: 12px 18px;
grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-columns: repeat(2, minmax(0, 1fr));
padding-top: 12px; padding: 12px;
} }
.host-card-item { .host-card-item {
display: grid; display: grid;
@@ -298,7 +419,7 @@
} }
.host-card-stat .value { .host-card-stat .value {
font-size: 16px; font-size: 16px;
font-weight: 650; font-weight: 750;
overflow-wrap: anywhere; overflow-wrap: anywhere;
} }
.host-card-stat.wide { .host-card-stat.wide {
@@ -319,28 +440,34 @@
.message { .message {
background: var(--panel); background: var(--panel);
border: 1px solid var(--border); border: 1px solid var(--border);
border-radius: 8px; border-radius: var(--radius);
padding: 10px 12px; padding: 10px 12px;
} }
.message.success { border-color: #a7d8b9; background: #edf8f1; color: var(--success); } .message.success { border-color: #a7d8b9; background: #edf8f1; color: var(--success); }
.message.error { border-color: #e8b4b4; background: #fff0f0; color: var(--failed); } .message.error { border-color: #e8b4b4; background: #fff0f0; color: var(--failed); }
.message.warning { border-color: #e7cf8a; background: #fff8df; color: var(--running); } .message.warning { border-color: #e7cf8a; background: #fff8df; color: var(--running); }
.form-grid { display: grid; gap: 14px; max-width: 680px; } .form-grid { display: grid; gap: 15px; max-width: 720px; }
.field { display: grid; gap: 5px; } .field { display: grid; gap: 6px; }
.field label { font-weight: 650; } .field label { font-weight: 700; }
.field input[type="text"], .field input[type="number"], .field select, .field textarea { .field input[type="text"], .field input[type="number"], .field select, .field textarea {
border: 1px solid var(--border); border: 1px solid var(--border);
border-radius: 6px; border-radius: 6px;
font: inherit; font: inherit;
padding: 8px 10px; padding: 9px 10px;
width: 100%; width: 100%;
} }
.field input[type="text"]:focus,
.field input[type="number"]:focus,
.field select:focus,
.field textarea:focus {
border-color: #8bb9e3;
}
.field textarea { min-height: 92px; resize: vertical; } .field textarea { min-height: 92px; resize: vertical; }
.field .helptext { color: var(--muted); font-size: 12px; } .field .helptext { color: var(--muted); font-size: 12px; }
.field input[type="checkbox"] { justify-self: start; } .field input[type="checkbox"] { justify-self: start; }
pre { pre {
background: #101820; background: #101820;
border-radius: 6px; border-radius: var(--radius);
color: #edf4fb; color: #edf4fb;
line-height: 1.5; line-height: 1.5;
margin: 0; margin: 0;
@@ -356,8 +483,16 @@
padding: 0; padding: 0;
} }
@media (max-width: 800px) { @media (max-width: 800px) {
main { padding: 16px; } header { padding: 0 14px; position: static; }
nav { padding: 0; } main { padding: 18px 14px 32px; }
nav {
align-items: flex-start;
flex-wrap: wrap;
gap: 4px;
padding: 8px 0;
}
nav strong { flex-basis: 100%; margin-right: 0; }
nav .spacer { display: none; }
.two-col { grid-template-columns: 1fr; } .two-col { grid-template-columns: 1fr; }
.host-card-header { display: grid; } .host-card-header { display: grid; }
.host-card-status { justify-content: flex-start; max-width: none; } .host-card-status { justify-content: flex-start; max-width: none; }