11'use client' ;
22
33import { useState } from 'react' ;
4- import { Menu , X , Home , GitPullRequest , ShieldCheck , Settings } from 'lucide-react' ;
4+ import { Menu , X , Home , GitPullRequest , ShieldCheck , Settings , Shield } from 'lucide-react' ;
55import { useTranslation } from 'react-i18next' ;
66import ConnectButton from '@/components/ConnectButton' ;
7- import { Shield } from 'lucide-react' ;
87
98export default function Layout ( { children } : { children : React . ReactNode } ) {
109 const { t } = useTranslation ( ) ;
@@ -18,28 +17,30 @@ export default function Layout({ children }: { children: React.ReactNode }) {
1817 ] ;
1918
2019 return (
21- < div className = "min-h-screen bg-slate-950 flex text-slate-100" >
20+ < div className = "min-h-screen bg-slate-50 dark:bg-slate- 950 text-slate-900 dark: text-slate-100 flex transition-colors duration-200 " >
2221 { /* Sidebar for Desktop */ }
23- < aside className = "hidden md:flex flex-col w-64 border-r border-slate-800 bg-slate-900/50" >
22+ < aside className = "hidden md:flex flex-col w-64 border-r border-slate-200 dark:border-slate- 800 bg-white dark: bg-slate-900/50" >
2423 < div className = "p-6 flex items-center gap-3" >
2524 < div className = "w-10 h-10 bg-gradient-to-br from-indigo-600 to-violet-600 rounded-xl flex items-center justify-center shadow-lg shadow-indigo-900/30" >
26- < Shield className = "w-6 h-6 text-white" />
25+ < Shield className = "w-6 h-6 text-white" aria-hidden = "true" />
2726 </ div >
2827 < div >
29- < h1 className = "text-xl font-bold text-white" > Vero</ h1 >
30- < p className = "text-xs text-slate-400" > Guardian</ p >
28+ < h1 className = "text-xl font-bold text-slate-900 dark:text- white" > Vero</ h1 >
29+ < p className = "text-xs text-slate-500 dark:text-slate- 400" > Guardian</ p >
3130 </ div >
3231 </ div >
33- < nav className = "flex-1 px-4 space-y-2 mt-4" >
32+ < nav className = "flex-1 px-4 space-y-2 mt-4" aria-label = { t ( 'navigation.dashboard' ) } >
3433 { navigation . map ( ( item ) => (
3534 < a
3635 key = { item . name }
3736 href = "#"
3837 className = { `flex items-center gap-3 px-4 py-3 rounded-lg text-sm font-medium transition-colors min-h-[44px] ${
39- item . current ? 'bg-indigo-600/10 text-indigo-400' : 'text-slate-400 hover:text-slate-200 hover:bg-slate-800'
38+ item . current
39+ ? 'bg-indigo-50 dark:bg-indigo-600/10 text-indigo-600 dark:text-indigo-400'
40+ : 'text-slate-600 dark:text-slate-400 hover:text-slate-900 dark:hover:text-slate-200 hover:bg-slate-100 dark:hover:bg-slate-800'
4041 } `}
4142 >
42- < item . icon className = "w-5 h-5" />
43+ < item . icon className = "w-5 h-5" aria-hidden = "true" />
4344 { item . name }
4445 </ a >
4546 ) ) }
@@ -49,20 +50,23 @@ export default function Layout({ children }: { children: React.ReactNode }) {
4950 { /* Main Content */ }
5051 < div className = "flex-1 flex flex-col min-w-0" >
5152 { /* Header */ }
52- < header className = "border-b border-slate-800 bg-slate-900/50 backdrop-blur-sm sticky top-0 z-40" >
53+ < header className = "border-b border-slate-200 dark:border-slate- 800 bg-white/80 dark: bg-slate-900/50 backdrop-blur-sm sticky top-0 z-40" >
5354 < div className = "px-4 sm:px-6 lg:px-8 py-4 flex items-center justify-between md:justify-end" >
5455 < div className = "flex items-center gap-3 md:hidden" >
5556 < div className = "w-8 h-8 bg-gradient-to-br from-indigo-600 to-violet-600 rounded-lg flex items-center justify-center shadow-lg shadow-indigo-900/30" >
56- < Shield className = "w-5 h-5 text-white" />
57+ < Shield className = "w-5 h-5 text-white" aria-hidden = "true" />
5758 </ div >
58- < span className = "font-bold text-white" > Vero Guardian</ span >
59+ < span className = "font-bold text-slate-900 dark:text- white" > Vero Guardian</ span >
5960 </ div >
6061
6162 < div className = "flex items-center gap-4" >
6263 < ConnectButton />
6364 < button
64- className = "md:hidden p-2 text-slate-400 hover:text-white rounded-lg min-h-[44px] min-w-[44px] flex items-center justify-center"
65+ type = "button"
66+ className = "md:hidden p-2 text-slate-500 dark:text-slate-400 hover:text-slate-900 dark:hover:text-white rounded-lg min-h-[44px] min-w-[44px] flex items-center justify-center focus:outline-none focus:ring-2 focus:ring-indigo-500"
6567 onClick = { ( ) => setIsMobileMenuOpen ( ! isMobileMenuOpen ) }
68+ aria-label = { isMobileMenuOpen ? 'Close menu' : 'Open menu' }
69+ aria-expanded = { isMobileMenuOpen }
6670 >
6771 { isMobileMenuOpen ? < X className = "w-6 h-6" /> : < Menu className = "w-6 h-6" /> }
6872 </ button >
@@ -72,17 +76,19 @@ export default function Layout({ children }: { children: React.ReactNode }) {
7276
7377 { /* Mobile Menu */ }
7478 { isMobileMenuOpen && (
75- < div className = "md:hidden border-b border-slate-800 bg-slate-900" >
76- < nav className = "px-4 py-4 space-y-2" >
79+ < div className = "md:hidden border-b border-slate-200 dark:border-slate- 800 bg-white dark: bg-slate-900" >
80+ < nav className = "px-4 py-4 space-y-2" aria-label = "Mobile navigation" >
7781 { navigation . map ( ( item ) => (
7882 < a
7983 key = { item . name }
8084 href = "#"
8185 className = { `flex items-center gap-3 px-4 py-3 rounded-lg text-sm font-medium transition-colors min-h-[44px] ${
82- item . current ? 'bg-indigo-600/10 text-indigo-400' : 'text-slate-400 hover:text-slate-200 hover:bg-slate-800'
86+ item . current
87+ ? 'bg-indigo-50 dark:bg-indigo-600/10 text-indigo-600 dark:text-indigo-400'
88+ : 'text-slate-600 dark:text-slate-400 hover:text-slate-900 dark:hover:text-slate-200 hover:bg-slate-100 dark:hover:bg-slate-800'
8389 } `}
8490 >
85- < item . icon className = "w-5 h-5" />
91+ < item . icon className = "w-5 h-5" aria-hidden = "true" />
8692 { item . name }
8793 </ a >
8894 ) ) }
@@ -91,9 +97,7 @@ export default function Layout({ children }: { children: React.ReactNode }) {
9197 ) }
9298
9399 { /* Page Content */ }
94- < div className = "flex-1" >
95- { children }
96- </ div >
100+ < div className = "flex-1" > { children } </ div >
97101 </ div >
98102 </ div >
99103 ) ;
0 commit comments