Injection directe du script stratégie dans le footer
- Script JavaScript injecté directement dans le footer via config.json - Le lien apparaît maintenant dans le footer du radar - Page stratégie créée dynamiquement via JavaScript
This commit is contained in:
52
custom.js
Normal file
52
custom.js
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
// Script personnalisé pour ajouter le lien stratégie - injecté directement
|
||||||
|
(function() {
|
||||||
|
function initStrategyLinks() {
|
||||||
|
addStrategyLinkToFooter();
|
||||||
|
handleStrategyRoute();
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleStrategyRoute() {
|
||||||
|
if (window.location.pathname === '/business/strategie' || window.location.pathname === '/business/strategie.html') {
|
||||||
|
createStrategyPage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function createStrategyPage() {
|
||||||
|
document.body.innerHTML = `
|
||||||
|
<div style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; max-width: 1200px; margin: 0 auto; padding: 20px; background: #f5f5f5;">
|
||||||
|
<div style="background: white; padding: 40px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1);">
|
||||||
|
<a href="/business/" style="display: inline-block; margin-bottom: 20px; color: #2ecc71; text-decoration: none; font-weight: bold;">← Retour au Radar</a>
|
||||||
|
<h1 style="color: #1a4d3a; border-bottom: 3px solid #2ecc71; padding-bottom: 10px;">Stratégie d'Évolution Technique - Laplank</h1>
|
||||||
|
<p><strong>Date de mise à jour</strong> : 02/12/2025</p>
|
||||||
|
<p>La stratégie complète est disponible dans le dépôt Git :</p>
|
||||||
|
<p><a href="https://git.open.us.org/AJR/TechradarDev/-/blob/dev-biz/docs/strategie-evolution-technique.md" target="_blank" style="color: #2ecc71; font-weight: bold;">📋 Voir la stratégie sur GitLab</a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
|
function addStrategyLinkToFooter() {
|
||||||
|
const footer = document.querySelector('footer') || document.querySelector('.footer') || document.querySelector('[class*="footer"]');
|
||||||
|
|
||||||
|
if (footer) {
|
||||||
|
const strategyLink = document.createElement('a');
|
||||||
|
strategyLink.href = '/business/strategie';
|
||||||
|
strategyLink.textContent = '📋 Voir la Stratégie';
|
||||||
|
strategyLink.style.marginLeft = '10px';
|
||||||
|
strategyLink.style.color = '#2ecc71';
|
||||||
|
strategyLink.style.textDecoration = 'none';
|
||||||
|
strategyLink.style.fontWeight = 'bold';
|
||||||
|
strategyLink.style.display = 'inline-block';
|
||||||
|
footer.appendChild(strategyLink);
|
||||||
|
} else {
|
||||||
|
setTimeout(addStrategyLinkToFooter, 1000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (document.readyState === 'loading') {
|
||||||
|
document.addEventListener('DOMContentLoaded', initStrategyLinks);
|
||||||
|
} else {
|
||||||
|
initStrategyLinks();
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
"quadrantOverview": "Vue d'ensemble des quadrants",
|
"quadrantOverview": "Vue d'ensemble des quadrants",
|
||||||
"zoomIn": "Zoomer",
|
"zoomIn": "Zoomer",
|
||||||
"filterByTag": "Filtrer par tag",
|
"filterByTag": "Filtrer par tag",
|
||||||
"footer": "Radar stratégique pour analyser les technologies de l'écosystème Laplank et définir une stratégie d'évolution technique alignée avec les objectifs business.",
|
"footer": "Radar stratégique pour analyser les technologies de l'écosystème Laplank et définir une stratégie d'évolution technique alignée avec les objectifs business. <a href=\"/business/strategie\" id=\"strategie-link\" style=\"margin-left: 10px; color: #2ecc71; text-decoration: none; font-weight: bold;\">📋 Voir la Stratégie</a><script>(function(){function a(){const e=document.querySelector('footer')||document.querySelector('.footer');if(e){const t=document.createElement('a');t.href='/business/strategie',t.textContent='📋 Voir la Stratégie',t.style.marginLeft='10px',t.style.color='#2ecc71',t.style.textDecoration='none',t.style.fontWeight='bold',t.style.display='inline-block',e.appendChild(t)}else setTimeout(a,1e3)}if(window.location.pathname==='/business/strategie'||window.location.pathname==='/business/strategie.html'){document.body.innerHTML='<div style=\"font-family: -apple-system, BlinkMacSystemFont, \\'Segoe UI\\', Roboto, sans-serif; max-width: 1200px; margin: 0 auto; padding: 20px; background: #f5f5f5;\"><div style=\"background: white; padding: 40px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1);\"><a href=\"/business/\" style=\"display: inline-block; margin-bottom: 20px; color: #2ecc71; text-decoration: none; font-weight: bold;\">← Retour au Radar</a><h1 style=\"color: #1a4d3a; border-bottom: 3px solid #2ecc71; padding-bottom: 10px;\">Stratégie d\\'Évolution Technique - Laplank</h1><p><strong>Date de mise à jour</strong> : 02/12/2025</p><p>La stratégie complète est disponible dans le dépôt Git :</p><p><a href=\"https://git.open.us.org/AJR/TechradarDev/-/blob/dev-biz/docs/strategie-evolution-technique.md\" target=\"_blank\" style=\"color: #2ecc71; font-weight: bold;\">📋 Voir la stratégie sur GitLab</a></p></div></div>'}document.readyState==='loading'?document.addEventListener('DOMContentLoaded',a):a()})();</script>",
|
||||||
"notUpdated": "Cet élément n'a pas été mis à jour dans les trois dernières versions du Radar.",
|
"notUpdated": "Cet élément n'a pas été mis à jour dans les trois dernières versions du Radar.",
|
||||||
"notFound": "404 - Page non trouvée",
|
"notFound": "404 - Page non trouvée",
|
||||||
"pageAbout": "Comment utiliser le Radar Business ?",
|
"pageAbout": "Comment utiliser le Radar Business ?",
|
||||||
|
|||||||
Reference in New Issue
Block a user