mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
system.php: extract inline JS and style= attrs into separate assets
Move the ~130-line $extraJsInline heredoc from admin/system.php into a
static file public/assets/js/system.js, loaded via $extraJs so the
template footer emits a normal <script src=…>.
Replace 4 inline style= attributes with named CSS modifier classes in
system.css:
- style="margin:0;border:none;padding:0" on .srv-section-title
→ .srv-section-title--compact
- style="margin-bottom:.75rem" on sub-heading <h3>
→ .srv-section-title--sub
- style="margin-bottom:0" on .php-grid
→ .php-grid--flush
- style="font-size:.84rem;color:var(--text-secondary)" on <label>
→ .log-toolbar label rule in system.css
The one remaining inline style (--disk-pct / --disk-color CSS custom
properties on .disk-bar) is intentionally kept: it carries PHP runtime
values that cannot be expressed in a static stylesheet.
This commit is contained in:
@@ -119,6 +119,14 @@
|
||||
margin: 0 0 1rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
/* Compact variant: no border, no margin — used inside sys-status-header */
|
||||
.srv-section-title--compact {
|
||||
margin: 0;
|
||||
border: none;
|
||||
padding: 0;
|
||||
}
|
||||
/* Sub-section variant: tighter bottom margin — used for PHP/disk sub-headings */
|
||||
.srv-section-title--sub { margin-bottom: .75rem; }
|
||||
|
||||
/* ── PHP info grid ─────────────────────────────────────────────────────── */
|
||||
.php-grid {
|
||||
@@ -127,6 +135,8 @@
|
||||
gap: .5rem .75rem;
|
||||
margin-bottom: 2.5rem;
|
||||
}
|
||||
/* Flush variant: no bottom margin — used inside sys-status-meta cell */
|
||||
.php-grid--flush { margin-bottom: 0; }
|
||||
.php-item {
|
||||
background: #242424;
|
||||
border: 1px solid #555;
|
||||
@@ -208,6 +218,10 @@
|
||||
gap: .6rem;
|
||||
margin-bottom: 1.25rem;
|
||||
}
|
||||
.log-toolbar label {
|
||||
font-size: .84rem;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
.log-toolbar select {
|
||||
background: #242424;
|
||||
border: 1px solid #555;
|
||||
|
||||
Reference in New Issue
Block a user