diff --git a/Dockerfile.business b/Dockerfile.business index e922614..e3d2bbd 100644 --- a/Dockerfile.business +++ b/Dockerfile.business @@ -98,14 +98,33 @@ RUN echo "📊 Comptage des fichiers .md dans .techradar/data/radar" && \ # La page Next.js pour le routing, le HTML statique pour garantir l'affichage RUN mkdir -p .techradar/src/pages && \ cat > .techradar/src/pages/team.tsx << 'EOF' -export default function TeamPage() { - // Version ultra-simple pour Ă©viter les erreurs de compilation - if (typeof window !== 'undefined') { - // Remplacer immĂ©diatement le contenu par l'iframe - document.body.innerHTML = ''; - } +import { useEffect } from 'react'; - return null; // Ne rien rendre cĂŽtĂ© serveur +export default function TeamPage() { + useEffect(() => { + // Remplacement AGRESSIF du contenu + console.log('🔄 TEAM PAGE: Remplacement du contenu par iframe'); + + // Supprimer tout contenu existant + document.body.innerHTML = ''; + + // CrĂ©er l'iframe + const iframe = document.createElement('iframe'); + iframe.src = '/team.html'; + iframe.style.cssText = 'width:100vw;height:100vh;border:none;margin:0;padding:0;position:fixed;top:0;left:0;z-index:9999;background:#1a4d3a;'; + iframe.title = 'Équipe & Technologies'; + + // Ajouter l'iframe + document.body.appendChild(iframe); + + // Bloquer tout autre chargement + window.__teamPageLoaded = true; + + console.log('✅ TEAM PAGE: Iframe chargĂ©'); + }, []); + + // Ne rien rendre cĂŽtĂ© serveur + return null; } EOF RUN echo "✅ Page team.tsx créée (version ultra-simplifiĂ©e)" && \ diff --git a/public/strategie-script.js b/public/strategie-script.js index bbe35fd..175cfbe 100644 --- a/public/strategie-script.js +++ b/public/strategie-script.js @@ -1,19 +1,21 @@ -// Script pour la gestion des pages de stratĂ©gie +// SCRIPT ULTRA-PROTECTEUR CONTRE LES PAGES ÉQUIPE (function() { - // PROTECTION ABSOLUE : ArrĂȘter immĂ©diatement si on dĂ©tecte une page Ă©quipe - // Cette vĂ©rification doit ĂȘtre la PREMIÈRE chose exĂ©cutĂ©e - var isTeamPage = window.location.pathname === '/team' || - window.location.pathname === '/team/' || - window.location.pathname.startsWith('/team/') || - window.location.href.includes('/team'); - - if (isTeamPage) { - console.log('đŸš« Script stratĂ©gie BLOQUÉ sur page Ă©quipe - arrĂȘt immĂ©diat'); - return; + // VÉRIFICATION ABSOLUE - S'EXÉCUTE AVANT TOUT + if (window.location.pathname === '/team' || + window.location.pathname.startsWith('/team/') || + window.location.href.includes('/team')) { + console.log('đŸš« INTERDICTION TOTALE - Page Ă©quipe dĂ©tectĂ©e, arrĂȘt du script'); + // Bloquer complĂštement l'exĂ©cution + window.__blockAllScripts = true; + return false; } - // Marquer qu'on n'est pas sur une page Ă©quipe - window.__notTeamPage = true; + // Marquer qu'on autorise les autres scripts + window.__allowScripts = true; +})(); + +// Script pour la gestion des pages de stratĂ©gie UNIQUEMENT SI AUTORISÉ +if (!window.__blockAllScripts && !window.__blockTeamPages) { // PROTECTION : Ne pas interfĂ©rer avec les pages Next.js function shouldSkipExecution() { @@ -1069,4 +1071,7 @@ Interface de pilotage pour les responsables sĂ©curitĂ© des PME. } }, 5000); } -})(); +} + +// Fermeture du bloc conditionnel - script s'exĂ©cute uniquement si pas sur page Ă©quipe +} diff --git a/public/team-block-script.js b/public/team-block-script.js new file mode 100644 index 0000000..3630e8c --- /dev/null +++ b/public/team-block-script.js @@ -0,0 +1,30 @@ +// SCRIPT ANTI-ÉQUIPE - CHARGÉ EN PREMIER +(function() { + 'use strict'; + + // BLOQUER ABSOLUMENT TOUTES LES PAGES ÉQUIPE + if (window.location.pathname === '/team' || + window.location.pathname === '/team/' || + window.location.pathname.startsWith('/team/') || + window.location.href.includes('/team')) { + + console.log('đŸš« BLOQUEUR ÉQUIPE ACTIF - Page Ă©quipe dĂ©tectĂ©e'); + + // EmpĂȘcher tout autre script de s'exĂ©cuter + window.__blockTeamPages = true; + + // Bloquer immĂ©diatement tout chargement de script + var originalAppendChild = Element.prototype.appendChild; + Element.prototype.appendChild = function(child) { + if (child.tagName === 'SCRIPT' && child.src && child.src.includes('strategie-script.js')) { + console.log('đŸš« Script strategie-script.js BLOQUÉ sur page Ă©quipe'); + return child; // Ne pas l'ajouter + } + return originalAppendChild.call(this, child); + }; + + return; // ArrĂȘt immĂ©diat + } + + console.log('✅ Page normale dĂ©tectĂ©e - scripts autorisĂ©s'); +})(); diff --git a/radar-business/config-business.json b/radar-business/config-business.json index bf7fb92..f4c486b 100644 --- a/radar-business/config-business.json +++ b/radar-business/config-business.json @@ -3,7 +3,7 @@ "baseUrl": "", "editUrl": "https://git.open.us.org/syoul/TechradarDev/_edit/main/radar-business/{release}/{id}.md", "logoFile": "logo.svg", - "jsFile": "/strategie-script.js", + "jsFile": "/team-block-script.js", "toggles": { "showChart": true, "showTagFilter": true,