fix: masquer le header sur la page /team pour éviter duplication

- La page /team masque maintenant le header/navigation existant
- Évite la duplication du header quand on clique sur le lien Équipe
- L'iframe team.html s'affiche en plein écran sans header dupliqué
- Le header est restauré quand on quitte la page /team
This commit is contained in:
syoul
2025-12-09 11:22:21 +01:00
parent 376e82570f
commit 82fada4f32

View File

@@ -85,19 +85,59 @@ RUN echo "📊 Comptage des fichiers .md dans .techradar/data/radar" && \
find .techradar/data/radar -name "*.md" | wc -l && \
find .techradar/data/radar -name "*.md" | head -10
# Créer la page Next.js /team
# Créer la page Next.js /team avec layout minimal (sans Navigation pour éviter duplication)
RUN mkdir -p .techradar/src/pages && \
cat > .techradar/src/pages/team.tsx << 'EOF'
import Head from "next/head";
import { CustomPage } from "@/pages/_app";
import { useEffect } from "react";
const TeamPage = () => {
useEffect(() => {
// Masquer le header/navigation existant pour éviter la duplication
const header = document.querySelector('header') || document.querySelector('nav') || document.querySelector('[class*="Navigation"]');
const nav = document.querySelector('nav');
if (header) {
header.style.display = 'none';
}
if (nav && nav !== header) {
nav.style.display = 'none';
}
// Masquer aussi les éléments avec className contenant Navigation
const navElements = document.querySelectorAll('[class*="Navigation"]');
navElements.forEach(el => {
if (el !== header && el !== nav) {
(el as HTMLElement).style.display = 'none';
}
});
// Nettoyer au démontage
return () => {
if (header) {
(header as HTMLElement).style.display = '';
}
if (nav && nav !== header) {
(nav as HTMLElement).style.display = '';
}
navElements.forEach(el => {
(el as HTMLElement).style.display = '';
});
};
}, []);
const TeamPage: CustomPage = () => {
return (
<>
<Head>
<title>Équipe & Technologies - Laplank</title>
<style>{`
body {
margin: 0;
padding: 0;
}
`}</style>
</Head>
<div style={{ width: '100%', height: '100vh', border: 'none', margin: 0, padding: 0 }}>
<div style={{ width: '100%', height: '100vh', border: 'none', margin: 0, padding: 0, position: 'fixed', top: 0, left: 0, zIndex: 1 }}>
<iframe
src="/team.html"
style={{
@@ -105,7 +145,8 @@ const TeamPage: CustomPage = () => {
height: '100%',
border: 'none',
margin: 0,
padding: 0
padding: 0,
display: 'block'
}}
title="Équipe & Technologies"
/>
@@ -116,7 +157,7 @@ const TeamPage: CustomPage = () => {
export default TeamPage;
EOF
RUN echo "✅ Page team.tsx créée"
RUN echo "✅ Page team.tsx créée (masque le header pour éviter duplication)"
# Script Python pour ajouter le lien Équipe dans Navigation.tsx (supprime TOUS les doublons)
RUN cat > /tmp/add_team_link.py << 'PYEOF'