|
1 | 1 | import { type ReactNode } from "react"; |
2 | | -import blurredDashboardBackground from "~/assets/images/blurred-dashboard-background.jpg"; |
| 2 | +import blurredDashboardBackgroundMenuTop from "~/assets/images/blurred-dashboard-background-menu-top.jpg"; |
| 3 | +import blurredDashboardBackgroundMenuBottom from "~/assets/images/blurred-dashboard-background-menu-bottom.jpg"; |
| 4 | +import blurredDashboardBackgroundTable from "~/assets/images/blurred-dashboard-background-table.jpg"; |
3 | 5 |
|
4 | 6 | export function BackgroundWrapper({ children }: { children: ReactNode }) { |
5 | 7 | return ( |
6 | | - <div |
7 | | - className="h-full w-full bg-cover bg-left-top bg-no-repeat" |
8 | | - style={{ |
9 | | - backgroundImage: `url(${blurredDashboardBackground})`, |
10 | | - }} |
11 | | - > |
12 | | - {children} |
| 8 | + <div className="relative h-full w-full overflow-hidden"> |
| 9 | + {/* Left menu top background - fixed width 260px, maintains aspect ratio */} |
| 10 | + <div |
| 11 | + className="absolute left-0 top-0 w-[260px] bg-contain bg-left-top bg-no-repeat" |
| 12 | + style={{ |
| 13 | + backgroundImage: `url(${blurredDashboardBackgroundMenuTop})`, |
| 14 | + aspectRatio: "auto", |
| 15 | + height: "100vh", |
| 16 | + backgroundSize: "260px auto", |
| 17 | + }} |
| 18 | + /> |
| 19 | + |
| 20 | + {/* Left menu bottom background - fixed width 260px, maintains aspect ratio */} |
| 21 | + <div |
| 22 | + className="absolute bottom-0 left-0 w-[260px] bg-contain bg-left-bottom bg-no-repeat" |
| 23 | + style={{ |
| 24 | + backgroundImage: `url(${blurredDashboardBackgroundMenuBottom})`, |
| 25 | + aspectRatio: "auto", |
| 26 | + height: "100vh", |
| 27 | + backgroundSize: "260px auto", |
| 28 | + }} |
| 29 | + /> |
| 30 | + |
| 31 | + {/* Right table background - fixed width 2000px, positioned next to menu */} |
| 32 | + <div |
| 33 | + className="absolute top-0 bg-left-top bg-no-repeat" |
| 34 | + style={{ |
| 35 | + left: "260px", |
| 36 | + backgroundImage: `url(${blurredDashboardBackgroundTable})`, |
| 37 | + width: "100%", |
| 38 | + height: "100vh", |
| 39 | + backgroundSize: "1200px auto", |
| 40 | + backgroundColor: "#101214", |
| 41 | + }} |
| 42 | + /> |
| 43 | + |
| 44 | + {/* Content layer */} |
| 45 | + <div className="relative z-10 h-full w-full">{children}</div> |
13 | 46 | </div> |
14 | 47 | ); |
15 | 48 | } |
0 commit comments