Extract system.php inline <style> and <script> to system.css / $extraJsInline

- Create public/assets/css/system.css with all 280 lines of CSS that were
  inline in system.php: tab bar, status cards, PHP info grid, disk bar,
  log viewer, nginx config viewer, and syntax-highlight classes.
- Disk bar dynamic values (width %, colour) moved from PHP-interpolated CSS
  rules to CSS custom properties (--disk-pct, --disk-color) set on the
  element via an inline style attribute; static .disk-bar rule in system.css
  consumes them via var().
- system.php JS block (tab-select auto-nav + copy-to-clipboard) moved to
  $extraJsInline heredoc; footer.php emits it before </body> — keeps it
  out of the document <head> and removes the bare <script> after </main>.
- system.php now sets $extraCss = ['/assets/css/system.css'] so head.php
  emits a proper <link> in <head>, consistent with all other admin pages.
- No behaviour change; system.php is now zero inline CSS/JS.
This commit is contained in:
Pontoporeia
2026-04-01 17:24:36 +02:00
parent cd58bc13e4
commit f208423e8d
3 changed files with 343 additions and 336 deletions

View File

@@ -21,7 +21,7 @@
- [x] **`common.css`**: Replace `.site-search__icon` with `header form[role="search"] svg`
- [x] **`common.css`**: Replace `.site-search__input` with `header form[role="search"] input`
- [x] **`common.css`**: Replace `.site-search` with `header form[role="search"]`
- [ ] **`system.php`**: Move inline `<style>` block to `system.css` (already in TODO, reinforced here)
- [x] **`system.php`**: Move inline `<style>` block to `system.css` (already in TODO, reinforced here)
### Template HTML changes to match
- [ ] In all admin templates, replace `<p class="admin-hint">` with `<small>` elements