forked from FWS/FWS-TEMPLATE-Website-OnePage
fix(pages): make page URLs and assets base-aware
Root-absolute asset paths and ?p= links broke when the site is served from a subfolder (WAMP). Screenshots from the database and avatars from creators.json go through fws_url() as well.
This commit is contained in:
7 files changed
+25
-25
No files matched your search
+2
-2
@@ -14,7 +14,7 @@ if (!defined('FWS_PAGE_SHELL')) {
|
||||
|
||||
$title = 'Paquets | FWS Linux';
|
||||
$description = 'Les outils développés pour FWS Linux — historique de chaque paquet, captures d\'écran et liens utiles.';
|
||||
$extraJs[] = '/p/assets/js/packages-ui.js';
|
||||
$extraJs[] = fws_url('/p/assets/js/packages-ui.js');
|
||||
|
||||
function fws_packages_empty(string $message): string
|
||||
{
|
||||
@@ -94,7 +94,7 @@ function fws_packages_card(array $pkg, int $position): string
|
||||
. '<h2>' . e($pkg['name']) . '</h2>'
|
||||
. '<span class="paquet-since" title="' . (!empty($pkg['since']) ? e('Depuis le ' . fws_format_date((string) $pkg['since'])) : '') . '">'
|
||||
. e($pkg['sinceLabel'] !== '' ? $pkg['sinceLabel'] : 'FWS') . '</span>'
|
||||
. '<a class="paquet-detail-link" href="/?p/paquets/' . $position . '/">Voir en grand</a>'
|
||||
. '<a class="paquet-detail-link" href="' . e(fws_url('/?p/paquets/' . $position . '/')) . '">Voir en grand</a>'
|
||||
. '</div>'
|
||||
. (!empty($pkg['tagline']) ? '<p class="paquet-tagline">' . e($pkg['tagline']) . '</p>' : '')
|
||||
. '<p class="paquet-latest">' . e($latestText) . '</p>'
|
||||
|
||||
Reference in new issue
Block a user