-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathBackgroundWrapper.tsx
More file actions
48 lines (44 loc) · 1.79 KB
/
BackgroundWrapper.tsx
File metadata and controls
48 lines (44 loc) · 1.79 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
import { type ReactNode } from "react";
import blurredDashboardBackgroundMenuTop from "~/assets/images/blurred-dashboard-background-menu-top.jpg";
import blurredDashboardBackgroundMenuBottom from "~/assets/images/blurred-dashboard-background-menu-bottom.jpg";
import blurredDashboardBackgroundTable from "~/assets/images/blurred-dashboard-background-table.jpg";
export function BackgroundWrapper({ children }: { children: ReactNode }) {
return (
<div className="relative h-full w-full overflow-hidden">
{/* Left menu top background - fixed width 260px, maintains aspect ratio */}
<div
className="absolute left-0 top-0 w-[260px] bg-contain bg-left-top bg-no-repeat"
style={{
backgroundImage: `url(${blurredDashboardBackgroundMenuTop})`,
aspectRatio: "auto",
height: "100vh",
backgroundSize: "260px auto",
}}
/>
{/* Left menu bottom background - fixed width 260px, maintains aspect ratio */}
<div
className="absolute bottom-0 left-0 w-[260px] bg-contain bg-left-bottom bg-no-repeat"
style={{
backgroundImage: `url(${blurredDashboardBackgroundMenuBottom})`,
aspectRatio: "auto",
height: "100vh",
backgroundSize: "260px auto",
}}
/>
{/* Right table background - fixed width 2000px, positioned next to menu */}
<div
className="absolute top-0 bg-left-top bg-no-repeat"
style={{
left: "260px",
backgroundImage: `url(${blurredDashboardBackgroundTable})`,
width: "100%",
height: "100vh",
backgroundSize: "1200px auto",
backgroundColor: "#101214",
}}
/>
{/* Content layer */}
<div className="relative z-10 h-full w-full">{children}</div>
</div>
);
}