From 5839093e617c9929f3d9f12ac096b21fd2444e56 Mon Sep 17 00:00:00 2001 From: syoul Date: Tue, 2 Dec 2025 18:33:07 +0100 Subject: [PATCH] =?UTF-8?q?Correction=20:=20Page=20strat=C3=A9gie=20cr?= =?UTF-8?q?=C3=A9=C3=A9e=20dynamiquement=20via=20JavaScript?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - La page stratégie est maintenant créée dynamiquement via JS - Lien vers le fichier Markdown dans le dépôt GitLab - Fonctionne avec le basePath /business de Next.js --- public/strategie-link.js | 95 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 91 insertions(+), 4 deletions(-) diff --git a/public/strategie-link.js b/public/strategie-link.js index bf13c41..ef57e1f 100644 --- a/public/strategie-link.js +++ b/public/strategie-link.js @@ -1,4 +1,4 @@ -// Script pour ajouter un lien vers la stratégie dans le footer et le header +// Script pour ajouter un lien vers la stratégie et créer une page dynamique (function() { // Attendre que le DOM soit chargé if (document.readyState === 'loading') { @@ -10,6 +10,94 @@ function initStrategyLinks() { addStrategyLinkToFooter(); addStrategyLinkToHeader(); + handleStrategyRoute(); + } + + function handleStrategyRoute() { + // Vérifier si on est sur la route stratégie + if (window.location.pathname === '/business/strategie' || window.location.pathname === '/business/strategie.html') { + createStrategyPage(); + } + } + + function createStrategyPage() { + // Créer une page complète pour la stratégie + document.body.innerHTML = ` + + + + + + Stratégie d'Évolution Technique - Laplank + + + +
+ ← Retour au Radar +

Stratégie d'Évolution Technique - Laplank

+

Date de mise à jour : 02/12/2025

+

Cette page est en cours de chargement...

+
+ + + `; + + // Charger le contenu depuis le fichier Markdown ou l'afficher directement + loadStrategyContent(); + } + + function loadStrategyContent() { + // Pour l'instant, afficher un message et rediriger vers le fichier Markdown dans le repo + const container = document.querySelector('.container'); + if (container) { + container.innerHTML = ` + ← Retour au Radar +

Stratégie d'Évolution Technique - Laplank

+

Date de mise à jour : 02/12/2025

+

La stratégie complète est disponible dans le dépôt Git :

+

Voir la stratégie sur GitLab

+

Ou consultez le fichier local : docs/strategie-evolution-technique.md

+ `; + } } function addStrategyLinkToFooter() { @@ -19,7 +107,7 @@ if (footer) { // Créer le lien vers la stratégie const strategyLink = document.createElement('a'); - strategyLink.href = '/strategie.html'; + strategyLink.href = '/business/strategie'; strategyLink.textContent = '📋 Voir la Stratégie'; strategyLink.style.marginLeft = '10px'; strategyLink.style.color = '#2ecc71'; @@ -41,7 +129,7 @@ if (header) { const strategyLink = document.createElement('a'); - strategyLink.href = '/strategie.html'; + strategyLink.href = '/business/strategie'; strategyLink.textContent = 'Stratégie'; strategyLink.style.marginLeft = '15px'; strategyLink.style.color = '#2ecc71'; @@ -52,4 +140,3 @@ } } })(); -