feat: exposer le radar business à la racine

This commit is contained in:
syoul
2025-12-02 21:06:59 +01:00
parent 5c29d2b5a4
commit 364adffd96
6 changed files with 26 additions and 20 deletions

View File

@@ -8,7 +8,7 @@
function handleStrategyRoute() {
// Vérifier si on est sur la route stratégie au chargement initial
if (window.location.pathname === '/business/strategie' || window.location.pathname === '/business/strategie.html' || window.location.hash === '#strategie') {
if (window.location.pathname === '/strategie' || window.location.pathname === '/strategie.html' || window.location.hash === '#strategie') {
createStrategyPage();
}
}
@@ -17,7 +17,7 @@
function interceptStrategyLinks() {
document.addEventListener('click', function(e) {
const link = e.target.closest('a');
if (link && (link.href.includes('/business/strategie') || link.getAttribute('href') === '/business/strategie' || link.id === 'strategie-link')) {
if (link && (link.href.includes('/strategie') || link.getAttribute('href') === '/strategie' || link.id === 'strategie-link')) {
e.preventDefault();
e.stopPropagation();
createStrategyPage();
@@ -55,13 +55,13 @@
// Réinitialiser les liens après restauration
setTimeout(initStrategyLinks, 100);
} else {
window.location.href = '/business/';
window.location.href = '/';
}
});
}
// Mettre à jour l'URL sans recharger la page
window.history.pushState({page: 'strategie'}, 'Stratégie', '/business/strategie');
window.history.pushState({page: 'strategie'}, 'Stratégie', '/strategie');
}
function addStrategyLinkToFooter() {