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:
@@ -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" | wc -l && \
|
||||||
find .techradar/data/radar -name "*.md" | head -10
|
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 && \
|
RUN mkdir -p .techradar/src/pages && \
|
||||||
cat > .techradar/src/pages/team.tsx << 'EOF'
|
cat > .techradar/src/pages/team.tsx << 'EOF'
|
||||||
import Head from "next/head";
|
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 (
|
return (
|
||||||
<>
|
<>
|
||||||
<Head>
|
<Head>
|
||||||
<title>Équipe & Technologies - Laplank</title>
|
<title>Équipe & Technologies - Laplank</title>
|
||||||
|
<style>{`
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
`}</style>
|
||||||
</Head>
|
</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
|
<iframe
|
||||||
src="/team.html"
|
src="/team.html"
|
||||||
style={{
|
style={{
|
||||||
@@ -105,7 +145,8 @@ const TeamPage: CustomPage = () => {
|
|||||||
height: '100%',
|
height: '100%',
|
||||||
border: 'none',
|
border: 'none',
|
||||||
margin: 0,
|
margin: 0,
|
||||||
padding: 0
|
padding: 0,
|
||||||
|
display: 'block'
|
||||||
}}
|
}}
|
||||||
title="Équipe & Technologies"
|
title="Équipe & Technologies"
|
||||||
/>
|
/>
|
||||||
@@ -116,7 +157,7 @@ const TeamPage: CustomPage = () => {
|
|||||||
|
|
||||||
export default TeamPage;
|
export default TeamPage;
|
||||||
EOF
|
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)
|
# Script Python pour ajouter le lien Équipe dans Navigation.tsx (supprime TOUS les doublons)
|
||||||
RUN cat > /tmp/add_team_link.py << 'PYEOF'
|
RUN cat > /tmp/add_team_link.py << 'PYEOF'
|
||||||
|
|||||||
Reference in New Issue
Block a user