mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-07 03:29:19 +02:00
chore: vendor all CDN assets locally; reorganise assets into css/ and js/
All third-party assets are now self-hosted — zero external requests at runtime.
CSS (assets/css/):
- modern-normalize.min.css (was assets/)
- common.css, admin.css, main.css, search.css, tfe.css, apropos.css (was assets/)
- easymde.min.css 2.20.0 (was cdn.jsdelivr.net)
- font-awesome.min.css 4.7.0 (was maxcdn.bootstrapcdn.com; injected at runtime by EasyMDE)
JS (assets/js/):
- easymde.min.js 2.20.0 (was cdn.jsdelivr.net)
Fonts (assets/fonts/fontawesome/):
- fontawesome-webfont.{eot,woff2,woff,ttf,svg}, FontAwesome.otf 4.7.0
Path fixes:
- common.css @font-face: ./fonts/ -> ../fonts/ (one level deeper)
- font-awesome.min.css @font-face: ../fonts/ -> ../fonts/fontawesome/ (dedicated subdir)
- pages-edit.php: autoDownloadFontAwesome:false added to EasyMDE init to
suppress the runtime CDN injection that was still present inside easymde.min.js
Reference updates (all now absolute /assets/css/* or /assets/js/*):
- templates/public/head.php: modern-normalize + common
- templates/admin/head.php: modern-normalize + admin
- public/admin/login.php: modern-normalize + admin (standalone head)
- public/index.php, tfe.php, search.php, apropos.php, licence.php: extraCss paths
- public/admin/pages-edit.php: extraCss + extraJs (font-awesome, easymde CSS/JS)
Nginx static-file location already covers .css/.js/.woff/.woff2/.ttf/.otf with
30-day cache headers — no nginx config change needed.
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title><?= htmlspecialchars($pageTitle ?? 'Admin') ?> – Posterg</title>
|
||||
<link rel="icon" type="image/svg+xml" href="/assets/admin_favicon.svg">
|
||||
<link rel="stylesheet" href="/assets/modern-normalize.min.css">
|
||||
<link rel="stylesheet" href="/assets/admin.css">
|
||||
<link rel="stylesheet" href="/assets/css/modern-normalize.min.css">
|
||||
<link rel="stylesheet" href="/assets/css/admin.css">
|
||||
<?php foreach ($extraCss ?? [] as $css): ?>
|
||||
<link rel="stylesheet" href="<?= htmlspecialchars($css) ?>">
|
||||
<?php endforeach; ?>
|
||||
|
||||
Reference in New Issue
Block a user