-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLayout.js
More file actions
124 lines (115 loc) · 4.3 KB
/
Copy pathLayout.js
File metadata and controls
124 lines (115 loc) · 4.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
import React, { useState } from 'react';
import { Outlet, NavLink } from 'react-router-dom';
import { motion } from 'framer-motion';
const Layout = () => {
const [time, setTime] = useState(new Date());
React.useEffect(() => {
const t = setInterval(() => setTime(new Date()), 1000);
return () => clearInterval(t);
}, []);
const navItems = [
{ to: '/', icon: '⬡', label: 'DASHBOARD' },
{ to: '/threats', icon: '⚠', label: 'THREAT CENTER' },
{ to: '/ai-analysis', icon: '🧠', label: 'AI ANALYSIS' },
{ to: '/reports', icon: '📋', label: 'REPORTS' },
];
return (
<div style={{ display: 'flex', height: '100vh', overflow: 'hidden', background: '#020408' }}>
{/* SIDEBAR */}
<motion.div
initial={{ x: -80, opacity: 0 }}
animate={{ x: 0, opacity: 1 }}
style={{
width: '220px', minWidth: '220px',
background: 'linear-gradient(180deg,#060d14,#020408)',
borderRight: '1px solid rgba(0,212,255,0.15)',
display: 'flex', flexDirection: 'column',
padding: '0', zIndex: 10
}}
>
{/* Logo */}
<div style={{
padding: '24px 20px',
borderBottom: '1px solid rgba(0,212,255,0.1)'
}}>
<div style={{
fontFamily: 'Orbitron,monospace',
fontSize: '20px', fontWeight: '900',
color: '#00d4ff',
textShadow: '0 0 20px rgba(0,212,255,0.7)',
letterSpacing: '2px'
}}>🛡️ NEURO</div>
<div style={{
fontFamily: 'Orbitron,monospace',
fontSize: '20px', fontWeight: '900',
color: '#fff', letterSpacing: '2px'
}}>SHIELD</div>
<motion.div
animate={{ opacity: [1, 0.3, 1] }}
transition={{ duration: 2, repeat: Infinity }}
style={{
fontSize: '10px', color: '#00ff88',
fontFamily: 'monospace', marginTop: '6px',
textShadow: '0 0 8px rgba(0,255,136,0.6)'
}}
>● SYSTEM ACTIVE</motion.div>
</div>
{/* Nav */}
<nav style={{ flex: 1, paddingTop: '16px' }}>
{navItems.map(item => (
<NavLink
key={item.to}
to={item.to}
end={item.to === '/'}
style={({ isActive }) => ({
display: 'flex', alignItems: 'center',
gap: '12px', padding: '13px 20px',
color: isActive ? '#00d4ff' : '#3a6a8a',
textDecoration: 'none',
fontFamily: 'Orbitron,monospace',
fontSize: '10px', letterSpacing: '1px',
borderLeft: isActive ? '2px solid #00d4ff' : '2px solid transparent',
background: isActive ? 'rgba(0,212,255,0.06)' : 'transparent',
transition: 'all 0.3s',
textShadow: isActive ? '0 0 10px rgba(0,212,255,0.5)' : 'none'
})}
>
<span style={{ fontSize: '14px' }}>{item.icon}</span>
{item.label}
</NavLink>
))}
</nav>
{/* Clock */}
<div style={{
padding: '20px',
borderTop: '1px solid rgba(0,212,255,0.1)',
fontFamily: 'monospace'
}}>
<div style={{
fontSize: '18px', color: '#00d4ff',
textShadow: '0 0 10px rgba(0,212,255,0.5)',
fontWeight: 'bold'
}}>{time.toLocaleTimeString()}</div>
<div style={{ fontSize: '11px', color: '#3a6a8a', marginTop: '2px' }}>
{time.toLocaleDateString()}
</div>
</div>
</motion.div>
{/* MAIN */}
<div style={{ flex: 1, overflow: 'auto', position: 'relative' }}>
{/* Scan line */}
<motion.div
animate={{ y: ['0vh', '100vh'] }}
transition={{ duration: 5, repeat: Infinity, ease: 'linear' }}
style={{
position: 'fixed', left: '220px', right: 0,
height: '1px', zIndex: 999, pointerEvents: 'none',
background: 'linear-gradient(90deg,transparent,rgba(0,212,255,0.3),transparent)'
}}
/>
<Outlet />
</div>
</div>
);
};
export default Layout;