mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19: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:
@@ -59,7 +59,7 @@ $ogTags = [
|
||||
'url' => 'https://posterg.erg.be/',
|
||||
'site_name' => 'Posterg – ERG',
|
||||
];
|
||||
$extraCss = ['assets/main.css'];
|
||||
$extraCss = ['/assets/css/main.css'];
|
||||
?>
|
||||
<?php include APP_ROOT . '/templates/public/head.php'; ?>
|
||||
<body class="home-body">
|
||||
|
||||
Reference in New Issue
Block a user