diff --git a/index.html b/index.html index fb3c490..584da58 100644 --- a/index.html +++ b/index.html @@ -3346,9 +3346,6 @@ const cvAllowed = ['ux', 'dsi']; const cvFile = cvAllowed.includes(cvParam) ? `cv-data-${cvParam}.json` : 'cv-data.json'; - const infraBtn = document.getElementById('infraBtn'); - if (infraBtn && cvParam) infraBtn.href = `infrastructure.html?cv=${cvParam}`; - fetch(cvFile) .then(r => { if (!r.ok) throw new Error('Impossible de charger ' + cvFile + ' (code ' + r.status + ')'); @@ -3358,6 +3355,10 @@ render(data); injectSEO(data); + // Mettre à jour le lien infra APRÈS render (l'élément existe maintenant dans le DOM) + const infraBtn = document.getElementById('infraBtn'); + if (infraBtn && cvParam) infraBtn.href = `infrastructure.html?cv=${cvParam}`; + // Restaurer le thème sauvegardé const saved = localStorage.getItem('cv-theme'); if (saved && ['cyberpunk','bd','itpro','cgi'].includes(saved)) setTheme(saved);