mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
feat: single entry point routing — convert to front controller pattern
- Create app/public/index.php as front controller (bootstrap + Dispatcher) - Rewrite app/router.php for PHP dev server → all non-asset requests to index.php - Update Dispatcher to render full page layouts (head+header+view+footer) - Move public view templates into templates/public/ (home, search, tfe, about, repertoire) - Delete dead direct-access public/*.php files (apropos, search, tfe, licence, repertoire) - Add clean URL routes to Dispatcher (/search, /tfe, /repertoire, /apropos, /licence, /media) - Remove .php extensions from all internal links (header, views, templates, URLs) - Update OG tags in controllers to use clean URLs - Update nginx posterg.conf → front-controller try_files pattern, block direct .php access - Update header.php and search-bar.php form actions to clean URLs - Switch AboutController nav key from 'nav' to 'currentNav' for consistency
This commit is contained in:
@@ -46,7 +46,7 @@ function repToggleUrl(array $sets, string $dim, string $value): string {
|
||||
foreach ($sets['fi'] as $v) $params[] = 'fi[]=' . urlencode($v);
|
||||
foreach ($sets['kw'] as $v) $params[] = 'kw[]=' . urlencode($v);
|
||||
$qs = implode('&', $params);
|
||||
return '/repertoire.php' . ($qs ? '?' . $qs : '');
|
||||
return '/repertoire' . ($qs ? '?' . $qs : '');
|
||||
}
|
||||
|
||||
$anyActive = !empty($activeSets['years']) || !empty($activeSets['ap'])
|
||||
@@ -163,7 +163,7 @@ $hx = 'hx-target="#repertoire-index" hx-swap="outerHTML" hx-push-url="true" hx-i
|
||||
<?php else: ?>
|
||||
<?php foreach ($studentMap as $name => $id): ?>
|
||||
<li>
|
||||
<a href="tfe.php?id=<?= (int)$id ?>" class="rep-entry rep-entry--link">
|
||||
<a href="/tfe?id=<?= (int)$id ?>" class="rep-entry rep-entry--link">
|
||||
<?= htmlspecialchars($name) ?>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user