-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhero-grid.tsx
More file actions
39 lines (36 loc) · 1.66 KB
/
hero-grid.tsx
File metadata and controls
39 lines (36 loc) · 1.66 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
'use client';
import React from 'react';
// Optimized static grid for landing page (no mousemove, no highlight, no blur)
export const HeroGrid = () => {
// Use a much smaller grid for performance
const cols = 12;
const rows = 6;
return (
<div className="relative w-full h-full overflow-hidden pointer-events-none">
<div
className="absolute inset-0 z-0 grid"
style={{
gridTemplateColumns: `repeat(${cols}, 1fr)`,
gridTemplateRows: `repeat(${rows}, 1fr)`,
width: '100%',
height: '100%',
}}
>
{Array.from({ length: cols * rows }).map((_, i) => (
<div
key={i}
className="border border-slate-300/10 dark:border-white/10"
style={{ minHeight: 0, minWidth: 0 }}
/>
))}
</div>
{/* Gradient overlay */}
<div className="absolute inset-0 bg-gradient-to-b from-slate-900/0 dark:from-slate-900/0 to-background opacity-70 pointer-events-none" />
{/* Glow effects */}
<div className="absolute top-1/4 left-1/4 w-[200px] h-[200px] rounded-full bg-blue-400/10 dark:bg-blue-400/20 blur-[60px] pointer-events-none" />
<div className="absolute bottom-1/4 right-1/4 w-[150px] h-[150px] rounded-full bg-purple-400/10 dark:bg-purple-500/20 blur-[50px] pointer-events-none" style={{ animationDelay: '1s' }} />
<div className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[250px] h-[250px] rounded-full bg-gradient-radial from-cyan-400/5 dark:from-cyan-400/10 to-transparent blur-[70px] opacity-70 pointer-events-none" style={{ animationDelay: '2s' }} />
</div>
);
};
export default HeroGrid;