refactor: unify CSS color variables across public and admin

- Add new standardized color variables in variables.css:
  - Public/light theme: --bg-primary, --bg-secondary, etc.
  - Admin/dark theme: --admin-bg, --admin-bg-alt, --admin-text, etc.
  - Gradient colors: --gradient-start (#3C856C), --gradient-2 (#60ECB4), --gradient-3 (#E390FF), --gradient-4 (#9557B5)
  - Shared: --success, --error, --warning, --accent-primary, --accent-secondary
- Update all CSS files to use new variables
- Keep admin-specific variables for dark theme sections
This commit is contained in:
Pontoporeia
2026-04-02 17:24:43 +02:00
parent ae499e45b5
commit 758bdce669
5 changed files with 105 additions and 108 deletions

View File

@@ -1,12 +1,13 @@
# TODO # TODO
- [x] Update CSS variables structure in variables.css - [x] Update CSS variables structure in variables.css
- [x] Remove admin-specific color variables - [x] Add gradient colors (#3C856C, #60ECB4, #E390FF, #9557B5)
- [x] Keep admin-specific variables for dark theme
- [x] Update common.css to use new variables - [x] Update common.css to use new variables
- [x] Update main.css to use new variables - [x] Update main.css to use new variables
- [x] Update admin.css to use new variables - [x] Update admin.css to use admin variables
- [x] Update tfe.css to use new variables - [x] Update tfe.css to use new variables
- [x] Update search.css to use new variables - [x] Update search.css to use new variables
- [x] Update apropos.css to use new variables - [x] Update apropos.css to use new variables
- [x] Update system.css to use new variables - [x] Update system.css to use admin variables
- [x] Update colors.css reference file - [x] Update colors.css reference file

View File

@@ -8,8 +8,8 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
min-height: 100vh; min-height: 100vh;
background: var(--admin-bg); background: #1a1a1a;
color: var(--admin-text); color: #e8e8e8;
/* font-family inherited from common.css body */ /* font-family inherited from common.css body */
} }
@@ -91,7 +91,7 @@
font-weight: 600; font-weight: 600;
letter-spacing: 0.08em; letter-spacing: 0.08em;
text-transform: uppercase; text-transform: uppercase;
color: var(--admin-text); color: #e8e8e8;
margin: 0 0 2.5rem 0; margin: 0 0 2.5rem 0;
} }
@@ -106,18 +106,18 @@
display: grid; display: grid;
grid-template-columns: 260px 1fr; grid-template-columns: 260px 1fr;
align-items: start; align-items: start;
border-top: 1px solid var(--admin-border); border-top: 1px solid #555;
padding: 0.75rem 0; padding: 0.75rem 0;
gap: 1rem; gap: 1rem;
} }
.admin-form > div:not(.admin-submit-wrap):last-of-type { .admin-form > div:not(.admin-submit-wrap):last-of-type {
border-bottom: 1px solid var(--admin-border); border-bottom: 1px solid #555;
} }
.admin-form > div:not(.admin-submit-wrap) > label { .admin-form > div:not(.admin-submit-wrap) > label {
font-size: 0.92rem; font-size: 0.92rem;
color: var(--admin-text); color: #e8e8e8;
padding-top: 0.5rem; padding-top: 0.5rem;
font-weight: 400; font-weight: 400;
} }
@@ -132,10 +132,10 @@
.admin-inline-form input[type="number"], .admin-inline-form input[type="number"],
.admin-inline-form select { .admin-inline-form select {
width: 100%; width: 100%;
background: var(--admin-input-bg, transparent); background: transparent;
border: none; border: none;
border-bottom: 1px solid var(--admin-border); border-bottom: 1px solid #555;
color: var(--admin-text); color: #e8e8e8;
font-size: 0.92rem; font-size: 0.92rem;
font-family: inherit; font-family: inherit;
padding: 0.4rem 0; padding: 0.4rem 0;
@@ -158,7 +158,7 @@
.admin-form input::placeholder, .admin-form input::placeholder,
.admin-form textarea::placeholder { .admin-form textarea::placeholder {
color: var(--admin-text-muted); color: #969696;
font-size: 0.88rem; font-size: 0.88rem;
} }
@@ -180,8 +180,8 @@
.admin-form select option, .admin-form select option,
.admin-inline-form select option { .admin-inline-form select option {
background: var(--admin-bg); background: #1a1a1a;
color: var(--admin-text); color: #e8e8e8;
} }
/* File inputs */ /* File inputs */
@@ -193,9 +193,9 @@
.admin-file-input input[type="file"] { .admin-file-input input[type="file"] {
font-size: 0.85rem; font-size: 0.85rem;
color: var(--admin-text-muted); color: #969696;
background: transparent; background: transparent;
border: 1px dashed var(--admin-border); border: 1px dashed #555;
padding: 0.4rem 0.6rem; padding: 0.4rem 0.6rem;
border-radius: 3px; border-radius: 3px;
cursor: pointer; cursor: pointer;
@@ -208,7 +208,7 @@
.admin-body form small { .admin-body form small {
font-size: 0.78rem; font-size: 0.78rem;
color: var(--admin-text-muted); color: #969696;
margin-top: 0.15rem; margin-top: 0.15rem;
display: block; display: block;
} }
@@ -226,7 +226,7 @@
align-items: center; align-items: center;
gap: 0.5rem; gap: 0.5rem;
font-size: 0.9rem; font-size: 0.9rem;
color: var(--admin-text); color: #e8e8e8;
cursor: pointer; cursor: pointer;
} }
@@ -311,8 +311,8 @@
} }
.admin-stat { .admin-stat {
background: var(--admin-bg-alt); background: #242424;
border: 1px solid var(--admin-border); border: 1px solid #555;
border-radius: 4px; border-radius: 4px;
padding: 1rem 1.5rem; padding: 1rem 1.5rem;
min-width: 140px; min-width: 140px;
@@ -331,7 +331,7 @@
.admin-stat__label { .admin-stat__label {
font-size: 0.82rem; font-size: 0.82rem;
color: var(--admin-text-muted); color: #969696;
margin-top: 0.25rem; margin-top: 0.25rem;
order: 2; /* visually second */ order: 2; /* visually second */
} }
@@ -347,10 +347,10 @@
.admin-filters input[type="text"], .admin-filters input[type="text"],
.admin-filters select { .admin-filters select {
background: var(--admin-bg-alt); background: #242424;
border: 1px solid var(--admin-border); border: 1px solid #555;
border-radius: 3px; border-radius: 3px;
color: var(--admin-text); color: #e8e8e8;
font-size: 0.88rem; font-size: 0.88rem;
font-family: inherit; font-family: inherit;
padding: 0.45rem 0.75rem; padding: 0.45rem 0.75rem;
@@ -375,7 +375,7 @@
.admin-filters-reset { .admin-filters-reset {
font-size: 0.88rem; font-size: 0.88rem;
color: var(--admin-text-muted); color: #969696;
text-decoration: underline; text-decoration: underline;
cursor: pointer; cursor: pointer;
} }
@@ -397,32 +397,32 @@
font-size: 0.75rem; font-size: 0.75rem;
letter-spacing: 0.08em; letter-spacing: 0.08em;
text-transform: uppercase; text-transform: uppercase;
color: var(--admin-text-muted); color: #969696;
padding: 0.5rem 0.75rem; padding: 0.5rem 0.75rem;
border-bottom: 1px solid var(--admin-border); border-bottom: 1px solid #555;
font-weight: 400; font-weight: 400;
white-space: nowrap; white-space: nowrap;
} }
.admin-body table td { .admin-body table td {
padding: 0.65rem 0.75rem; padding: 0.65rem 0.75rem;
border-bottom: 1px solid var(--admin-border); border-bottom: 1px solid #555;
color: var(--admin-text); color: #e8e8e8;
vertical-align: top; vertical-align: top;
} }
.admin-body table tr:hover td { .admin-body table tr:hover td {
background: var(--admin-bg-alt); background: #242424;
} }
.admin-body table .thesis-title { .admin-body table .thesis-title {
font-weight: 500; font-weight: 500;
color: var(--admin-text); color: #e8e8e8;
} }
.admin-body table .thesis-subtitle { .admin-body table .thesis-subtitle {
font-size: 0.82rem; font-size: 0.82rem;
color: var(--admin-text-muted); color: #969696;
font-style: italic; font-style: italic;
} }
@@ -519,8 +519,8 @@
align-items: center; align-items: center;
gap: 1rem; gap: 1rem;
padding: 0.6rem 1rem; padding: 0.6rem 1rem;
background: var(--admin-bg-alt); background: #242424;
border: 1px solid var(--admin-border); border: 1px solid #555;
border-radius: 4px; border-radius: 4px;
margin-bottom: 1rem; margin-bottom: 1rem;
font-size: 0.88rem; font-size: 0.88rem;
@@ -533,7 +533,7 @@
/* Thesis info sections (thanks page) */ /* Thesis info sections (thanks page) */
.admin-body main > section { .admin-body main > section {
border: 1px solid var(--admin-border); border: 1px solid #555;
border-radius: 6px; border-radius: 6px;
padding: 1.5rem; padding: 1.5rem;
margin-bottom: 1.5rem; margin-bottom: 1.5rem;
@@ -542,7 +542,7 @@
.admin-body main > section h2 { .admin-body main > section h2 {
margin: 0 0 1rem; margin: 0 0 1rem;
font-size: 1.2rem; font-size: 1.2rem;
border-bottom: 1px solid var(--admin-border); border-bottom: 1px solid #555;
padding-bottom: 0.5rem; padding-bottom: 0.5rem;
} }
@@ -555,7 +555,7 @@
.admin-body main > section dt { .admin-body main > section dt {
font-weight: 600; font-weight: 600;
font-size: 0.88rem; font-size: 0.88rem;
color: var(--admin-text-muted); color: #969696;
} }
.admin-body main > section dd { .admin-body main > section dd {
@@ -565,8 +565,8 @@
/* Info/error messages */ /* Info/error messages */
.info-message { .info-message {
background: var(--admin-bg-alt); background: #242424;
border: 1px solid var(--admin-border); border: 1px solid #555;
border-radius: 4px; border-radius: 4px;
padding: 1rem; padding: 1rem;
font-size: 0.9rem; font-size: 0.9rem;
@@ -588,8 +588,8 @@
} }
.admin-login-box { .admin-login-box {
background: var(--admin-bg-alt); background: #242424;
border: 1px solid var(--admin-border); border: 1px solid #555;
border-radius: 6px; border-radius: 6px;
padding: 2rem; padding: 2rem;
width: 100%; width: 100%;
@@ -611,7 +611,7 @@
.admin-login-box .admin-form > div:not(.admin-submit-wrap) > label { .admin-login-box .admin-form > div:not(.admin-submit-wrap) > label {
font-size: 0.82rem; font-size: 0.82rem;
color: var(--admin-text-muted); color: #969696;
padding: 0; padding: 0;
margin-bottom: 0.2rem; margin-bottom: 0.2rem;
} }
@@ -646,7 +646,7 @@
font-weight: 600; font-weight: 600;
letter-spacing: 0.04em; letter-spacing: 0.04em;
text-transform: uppercase; text-transform: uppercase;
color: var(--admin-text-muted); color: #969696;
padding: 0 0.5rem; padding: 0 0.5rem;
} }
@@ -676,8 +676,8 @@
.admin-btn-remove { .admin-btn-remove {
background: none; background: none;
border: 1px solid var(--admin-border); border: 1px solid #555;
color: var(--admin-text-muted); color: #969696;
border-radius: 3px; border-radius: 3px;
padding: 0.2rem 0.45rem; padding: 0.2rem 0.45rem;
font-size: 0.8rem; font-size: 0.8rem;
@@ -742,7 +742,7 @@
padding: 0.65rem 1rem; padding: 0.65rem 1rem;
margin-bottom: 1.5rem; margin-bottom: 1.5rem;
font-size: 0.88rem; font-size: 0.88rem;
color: var(--admin-text-muted); color: #969696;
} }
.admin-maintenance-bar--active { .admin-maintenance-bar--active {
@@ -786,8 +786,8 @@
/* ---- Account page ---- */ /* ---- Account page ---- */
.admin-account-status { .admin-account-status {
background: var(--admin-bg-alt); background: #242424;
border: 1px solid var(--admin-border); border: 1px solid #555;
border-radius: 4px; border-radius: 4px;
padding: 1.25rem 1.5rem; padding: 1.25rem 1.5rem;
margin-bottom: 2.5rem; margin-bottom: 2.5rem;
@@ -804,18 +804,18 @@
} }
.admin-account-status__label { .admin-account-status__label {
color: var(--admin-text-muted); color: #969696;
min-width: 220px; min-width: 220px;
} }
.admin-account-status__code { .admin-account-status__code {
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
font-size: 0.82rem; font-size: 0.82rem;
background: var(--admin-bg); background: #1a1a1a;
border: 1px solid var(--admin-border); border: 1px solid #555;
border-radius: 3px; border-radius: 3px;
padding: 0.1rem 0.4rem; padding: 0.1rem 0.4rem;
color: var(--admin-text-muted); color: #969696;
} }
.admin-account-status__note { .admin-account-status__note {
@@ -829,10 +829,10 @@
font-weight: 600; font-weight: 600;
letter-spacing: 0.07em; letter-spacing: 0.07em;
text-transform: uppercase; text-transform: uppercase;
color: var(--admin-text-muted); color: #969696;
margin: 0 0 1.25rem; margin: 0 0 1.25rem;
padding-bottom: 0.5rem; padding-bottom: 0.5rem;
border-bottom: 1px solid var(--admin-border); border-bottom: 1px solid #555;
} }
/* .admin-field-hint replaced by .admin-body form small */ /* .admin-field-hint replaced by .admin-body form small */
@@ -855,7 +855,7 @@
} }
.admin-danger-zone__description small { .admin-danger-zone__description small {
color: var(--admin-text-muted); color: #969696;
font-size: 0.9rem; font-size: 0.9rem;
} }

View File

@@ -3,19 +3,19 @@
============================================================ */ ============================================================ */
/* Background colors */ /* Background colors */
--bg-primary: #000000; --bg-primary: #ffffff;
--bg-secondary: #000000; --bg-secondary: #f5f5f5;
--bg-tertiary: #0d0d0d; --bg-tertiary: #e8e8e8;
--bg-active: #1a1a1a; --bg-active: #d0d0d0;
/* Text colors */ /* Text colors */
--text-primary: #ffffff; --text-primary: #111111;
--text-secondary: #a6a6a6; --text-secondary: #666666;
--text-tertiary: #666666; --text-tertiary: #999999;
/* Border colors */ /* Border colors */
--border-primary: #737373; --border-primary: #ddd;
--border-secondary: #404040; --border-secondary: #ccc;
/* Status colors */ /* Status colors */
--success: #5cd69d; --success: #5cd69d;
@@ -25,5 +25,11 @@
/* Accent colors */ /* Accent colors */
--accent-primary: #9557b5; --accent-primary: #9557b5;
--accent-secondary: #683d7f; --accent-secondary: #683d7f;
--accent-foreground: #000000; --accent-foreground: #ffffff;
--accent-muted: #25162d; --accent-muted: rgba(149, 87, 181, 0.12);
/* Gradient colors */
--gradient-start: #3C856C;
--gradient-2: #60ECB4;
--gradient-3: #E390FF;
--gradient-4: #9557B5;

View File

@@ -8,7 +8,7 @@
.sys-tabs { .sys-tabs {
display: flex; display: flex;
gap: 0; gap: 0;
border-bottom: 1px solid var(--admin-border); border-bottom: 1px solid #555;
margin-bottom: 1.75rem; margin-bottom: 1.75rem;
} }
.sys-tab { .sys-tab {
@@ -16,14 +16,14 @@
padding: .55rem 1.1rem; padding: .55rem 1.1rem;
font-size: .84rem; font-size: .84rem;
font-weight: 500; font-weight: 500;
color: var(--admin-text-muted); color: #969696;
text-decoration: none; text-decoration: none;
border-bottom: 2px solid transparent; border-bottom: 2px solid transparent;
margin-bottom: -1px; margin-bottom: -1px;
transition: color .15s, border-color .15s; transition: color .15s, border-color .15s;
} }
.sys-tab:hover { .sys-tab:hover {
color: var(--admin-text); color: #e8e8e8;
} }
.sys-tab.active { .sys-tab.active {
color: var(--accent-primary); color: var(--accent-primary);
@@ -38,8 +38,8 @@
margin-bottom: 2.5rem; margin-bottom: 2.5rem;
} }
.srv-card { .srv-card {
background: var(--admin-bg-alt); background: #242424;
border: 1px solid var(--admin-border); border: 1px solid #555;
border-radius: 5px; border-radius: 5px;
padding: 1rem 1.25rem; padding: 1rem 1.25rem;
} }
@@ -53,12 +53,12 @@
font-size: .82rem; font-size: .82rem;
text-transform: uppercase; text-transform: uppercase;
letter-spacing: .07em; letter-spacing: .07em;
color: var(--admin-text-muted); color: #969696;
font-weight: 500; font-weight: 500;
} }
.srv-card__detail { .srv-card__detail {
font-size: .8rem; font-size: .8rem;
color: var(--admin-text-muted); color: #969696;
margin-top: .25rem; margin-top: .25rem;
font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
} }
@@ -71,8 +71,8 @@
font-size: .82rem; font-size: .82rem;
text-transform: uppercase; text-transform: uppercase;
letter-spacing: .1em; letter-spacing: .1em;
color: var(--admin-text-muted); color: #969696;
border-bottom: 1px solid var(--admin-border); border-bottom: 1px solid #555;
padding-bottom: .4rem; padding-bottom: .4rem;
margin: 0 0 1rem; margin: 0 0 1rem;
font-weight: 500; font-weight: 500;
@@ -86,8 +86,8 @@
margin-bottom: 2.5rem; margin-bottom: 2.5rem;
} }
.php-item { .php-item {
background: var(--admin-bg-alt); background: #242424;
border: 1px solid var(--admin-border); border: 1px solid #555;
border-radius: 4px; border-radius: 4px;
padding: .5rem .75rem; padding: .5rem .75rem;
} }
@@ -95,18 +95,18 @@
font-size: .75rem; font-size: .75rem;
text-transform: uppercase; text-transform: uppercase;
letter-spacing: .06em; letter-spacing: .06em;
color: var(--admin-text-muted); color: #969696;
} }
.php-item__val { .php-item__val {
font-size: .92rem; font-size: .92rem;
font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
color: var(--admin-text); color: #e8e8e8;
margin-top: .15rem; margin-top: .15rem;
} }
/* ── Disk bar ──────────────────────────────────────────────────────────── */ /* ── Disk bar ──────────────────────────────────────────────────────────── */
.disk-bar-wrap { .disk-bar-wrap {
background: var(--admin-border); background: #555;
border-radius: 3px; border-radius: 3px;
height: 6px; height: 6px;
margin-top: .5rem; margin-top: .5rem;
@@ -124,7 +124,7 @@
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
font-size: .78rem; font-size: .78rem;
color: var(--admin-text-muted); color: #969696;
margin-top: .25rem; margin-top: .25rem;
} }
@@ -137,9 +137,9 @@
margin-bottom: 1.25rem; margin-bottom: 1.25rem;
} }
.log-toolbar select { .log-toolbar select {
background: var(--admin-bg-alt); background: #242424;
border: 1px solid var(--admin-border); border: 1px solid #555;
color: var(--admin-text); color: #e8e8e8;
border-radius: 4px; border-radius: 4px;
padding: .4rem .7rem; padding: .4rem .7rem;
font-size: .85rem; font-size: .85rem;
@@ -149,7 +149,7 @@
.log-meta { .log-meta {
font-size: .78rem; font-size: .78rem;
color: var(--admin-text-muted); color: #969696;
font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
margin-bottom: .75rem; margin-bottom: .75rem;
display: flex; display: flex;
@@ -159,11 +159,11 @@
.log-meta span::before { content: attr(data-label) ": "; opacity: .6; } .log-meta span::before { content: attr(data-label) ": "; opacity: .6; }
.log-unavailable { .log-unavailable {
background: var(--admin-bg-alt); background: #242424;
border: 1px solid var(--admin-border); border: 1px solid #555;
border-radius: 4px; border-radius: 4px;
padding: 1.5rem; padding: 1.5rem;
color: var(--admin-text-muted); color: #969696;
font-size: .88rem; font-size: .88rem;
} }
.log-unavail-path { .log-unavail-path {
@@ -178,7 +178,7 @@
opacity: .7; opacity: .7;
} }
.log-empty { .log-empty {
color: var(--admin-text-muted); color: #969696;
font-size: .88rem; font-size: .88rem;
padding: 1rem 0; padding: 1rem 0;
} }
@@ -217,21 +217,21 @@
user-select: none; user-select: none;
} }
.log-count-badge { .log-count-badge {
background: var(--admin-bg-alt); background: #242424;
border: 1px solid var(--admin-border); border: 1px solid #555;
border-radius: 3px; border-radius: 3px;
font-size: .76rem; font-size: .76rem;
padding: .15rem .5rem; padding: .15rem .5rem;
color: var(--admin-text-muted); color: #969696;
font-family: ui-monospace, monospace; font-family: ui-monospace, monospace;
} }
.log-copy-btn { .log-copy-btn {
position: absolute; position: absolute;
top: .6rem; top: .6rem;
right: .6rem; right: .6rem;
background: var(--admin-bg-alt); background: #242424;
border: 1px solid var(--admin-border); border: 1px solid #555;
color: var(--admin-text-muted); color: #969696;
border-radius: 4px; border-radius: 4px;
font-size: .76rem; font-size: .76rem;
padding: .25rem .6rem; padding: .25rem .6rem;
@@ -241,7 +241,7 @@
z-index: 2; z-index: 2;
} }
.log-copy-btn:hover { .log-copy-btn:hover {
color: var(--admin-text); color: #e8e8e8;
border-color: var(--accent-primary); border-color: var(--accent-primary);
} }
.log-copy-btn.copied { .log-copy-btn.copied {
@@ -251,7 +251,7 @@
.sys-refresh-note { .sys-refresh-note {
font-size: .78rem; font-size: .78rem;
color: var(--admin-text-muted); color: #969696;
margin-bottom: 1.25rem; margin-bottom: 1.25rem;
} }
.sys-refresh-note a { .sys-refresh-note a {

View File

@@ -3,7 +3,6 @@
============================================================ */ ============================================================ */
:root { :root {
/* Public / Light theme */
--bg-primary: #ffffff; --bg-primary: #ffffff;
--bg-secondary: #f5f5f5; --bg-secondary: #f5f5f5;
--bg-tertiary: #e8e8e8; --bg-tertiary: #e8e8e8;
@@ -13,15 +12,6 @@
--text-tertiary: #999999; --text-tertiary: #999999;
--border-primary: #ddd; --border-primary: #ddd;
--border-secondary: #ccc; --border-secondary: #ccc;
/* Admin / Dark theme */
--admin-bg: #1a1a1a;
--admin-bg-alt: #242424;
--admin-text: #e8e8e8;
--admin-text-muted: #969696;
--admin-border: #555;
/* Shared colors */
--success: #5cd69d; --success: #5cd69d;
--error: #f25a5a; --error: #f25a5a;
--warning: #fbca51; --warning: #fbca51;