From 87c099433be9fa7f5d13b0eb709f16b431ead288 Mon Sep 17 00:00:00 2001 From: anthonycoyaud-prog Date: Thu, 21 May 2026 09:58:04 +0200 Subject: [PATCH] Ajout des cgu --- DataSentinel/index.html | 5 +- DataSentinel/src/App.jsx | 9 +- DataSentinel/src/components/Layout/Header.jsx | 41 +++-- .../src/components/Layout/Header.module.css | 40 +++++ DataSentinel/src/components/Layout/Layout.jsx | 7 +- .../src/components/Layout/Sidebar.jsx | 43 +++-- DataSentinel/src/index.css | 77 +++++++++ DataSentinel/src/pages/CGU/CGU.jsx | 161 ++++++++++++++++++ DataSentinel/src/pages/CGU/CGU.module.css | 134 +++++++++++++++ .../src/pages/Dashboard/Dashboard.module.css | 46 +++++ .../src/pages/Documentation/Documentation.jsx | 85 +++++++++ .../Documentation/Documentation.module.css | 108 ++++++++++++ DataSentinel/src/pages/Journal/Journal.jsx | 60 +++++++ .../src/pages/Journal/Journal.module.css | 18 ++ 14 files changed, 802 insertions(+), 32 deletions(-) create mode 100644 DataSentinel/src/pages/CGU/CGU.jsx create mode 100644 DataSentinel/src/pages/CGU/CGU.module.css create mode 100644 DataSentinel/src/pages/Documentation/Documentation.jsx create mode 100644 DataSentinel/src/pages/Documentation/Documentation.module.css create mode 100644 DataSentinel/src/pages/Journal/Journal.jsx create mode 100644 DataSentinel/src/pages/Journal/Journal.module.css diff --git a/DataSentinel/index.html b/DataSentinel/index.html index 831aeaf..5d61b1c 100644 --- a/DataSentinel/index.html +++ b/DataSentinel/index.html @@ -1,10 +1,11 @@ - + - datasentinel + + Data Sentinel — by XEFI
diff --git a/DataSentinel/src/App.jsx b/DataSentinel/src/App.jsx index 1fd104a..f11b569 100644 --- a/DataSentinel/src/App.jsx +++ b/DataSentinel/src/App.jsx @@ -12,7 +12,9 @@ import Fournisseur from './pages/Fournisseur/Fournisseur'; import Historique from './pages/Historique/Historique'; import Admin from './pages/Admin/Admin'; import Users from './pages/Users/Users'; +import Documentation from './pages/Documentation/Documentation'; import MentionsLegales from './pages/MentionsLegales/MentionsLegales'; +import CGU from './pages/CGU/CGU'; /* Composant pour protéger les routes nécessitant une authentification */ function ProtectedRoute({ children }) { @@ -31,7 +33,7 @@ function App() { - {/* Route publique : login */} + {/* Routes publiques */} } /> - - {/* Route publique : mentions légales (sans sidebar) */} } /> + } /> {/* Routes protégées avec Layout */} } /> } /> } /> + } /> {/* Redirection par défaut */} @@ -73,4 +75,3 @@ function App() { } export default App; - diff --git a/DataSentinel/src/components/Layout/Header.jsx b/DataSentinel/src/components/Layout/Header.jsx index 753f783..31a2449 100644 --- a/DataSentinel/src/components/Layout/Header.jsx +++ b/DataSentinel/src/components/Layout/Header.jsx @@ -5,7 +5,7 @@ import { useAuth } from '../../context/AuthContext'; import { useNavigate } from 'react-router-dom'; import styles from './Header.module.css'; -export default function Header({ onToggleSidebar }) { +export default function Header({ onToggleSidebar, sidebarOpen }) { const { user, logout } = useAuth(); const navigate = useNavigate(); @@ -15,26 +15,45 @@ export default function Header({ onToggleSidebar }) { } return ( -
+
+ {/* Lien d'évitement pour l'accessibilité clavier */} + + Aller au contenu principal + +
{/* Bouton burger pour mobile */} - -
- +
+ Data Sentinel
- by XEFI + by XEFI
- {user && {user.nom}} -
diff --git a/DataSentinel/src/components/Layout/Header.module.css b/DataSentinel/src/components/Layout/Header.module.css index 9768425..a26694a 100644 --- a/DataSentinel/src/components/Layout/Header.module.css +++ b/DataSentinel/src/components/Layout/Header.module.css @@ -99,3 +99,43 @@ .logoutBtn:hover { text-decoration: underline; } + +/* Lien d'évitement accessible (skip link) */ +.skipLink { + position: absolute; + top: -100px; + left: 8px; + background: var(--color-white); + color: var(--color-text); + padding: 8px 16px; + border-radius: var(--radius); + font-size: 13px; + font-weight: 600; + text-decoration: none; + z-index: 9999; + transition: top 0.1s; +} + +.skipLink:focus { + top: 8px; +} + +/* Focus visible sur tous les éléments interactifs */ +.burgerBtn:focus-visible, +.iconBtn:focus-visible, +.logoutBtn:focus-visible { + outline: 2px solid var(--color-white); + outline-offset: 2px; + border-radius: 2px; +} + +/* Responsive : masquer le nom utilisateur sur très petit écran */ +@media (max-width: 480px) { + .username { + display: none; + } + + .byXefi { + display: none; + } +} diff --git a/DataSentinel/src/components/Layout/Layout.jsx b/DataSentinel/src/components/Layout/Layout.jsx index 9b15545..2f77506 100644 --- a/DataSentinel/src/components/Layout/Layout.jsx +++ b/DataSentinel/src/components/Layout/Layout.jsx @@ -11,9 +11,12 @@ export default function Layout() { return (
-
setSidebarOpen(o => !o)} /> +
setSidebarOpen(o => !o)} + sidebarOpen={sidebarOpen} + /> setSidebarOpen(false)} /> -
+
diff --git a/DataSentinel/src/components/Layout/Sidebar.jsx b/DataSentinel/src/components/Layout/Sidebar.jsx index 6b53c6c..3a54ea3 100644 --- a/DataSentinel/src/components/Layout/Sidebar.jsx +++ b/DataSentinel/src/components/Layout/Sidebar.jsx @@ -10,6 +10,7 @@ import { List, Book, Shield, + FileText, } from 'lucide-react'; import styles from './Sidebar.module.css'; @@ -21,8 +22,9 @@ function NavItem({ to, icon: Icon, label }) { className={({ isActive }) => `${styles.navItem} ${isActive ? styles.active : ''}` } + aria-current={undefined} > - +