From 09444f58bc7d0ccc6523b077ab0a8db4605bad68 Mon Sep 17 00:00:00 2001 From: Starstrike Date: Thu, 1 May 2025 15:38:37 -0400 Subject: [PATCH] Fix background image overlay - Combined background and overlay into single CSS property --- frontend/src/components/EventAdmin.tsx | 12 +----------- frontend/src/components/EventView.tsx | 12 +----------- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/frontend/src/components/EventAdmin.tsx b/frontend/src/components/EventAdmin.tsx index dea20a9..1ea3684 100644 --- a/frontend/src/components/EventAdmin.tsx +++ b/frontend/src/components/EventAdmin.tsx @@ -455,7 +455,7 @@ const EventAdmin: React.FC = () => { sx={{ minHeight: '100vh', width: '100%', - backgroundImage: event?.wallpaper ? `url(${event.wallpaper})` : 'url(https://www.rydertech.us/backgrounds/space1.jpg)', + backgroundImage: event?.wallpaper ? `linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url(${event.wallpaper})` : 'url(https://www.rydertech.us/backgrounds/space1.jpg)', backgroundSize: 'cover', backgroundPosition: 'center', backgroundRepeat: 'no-repeat', @@ -464,16 +464,6 @@ const EventAdmin: React.FC = () => { position: 'relative', overflowY: 'auto', py: 4, - '&::before': event?.wallpaper ? { - content: '""', - position: 'fixed', - top: 0, - left: 0, - right: 0, - bottom: 0, - backgroundColor: 'rgba(0, 0, 0, 0.5)', - zIndex: 0, - } : {}, }} > diff --git a/frontend/src/components/EventView.tsx b/frontend/src/components/EventView.tsx index 86ce805..88b0a3d 100644 --- a/frontend/src/components/EventView.tsx +++ b/frontend/src/components/EventView.tsx @@ -137,7 +137,7 @@ const EventView: React.FC = () => { sx={{ minHeight: '100vh', width: '100%', - backgroundImage: event?.wallpaper ? `url(${event.wallpaper})` : 'url(https://www.rydertech.us/backgrounds/space1.jpg)', + backgroundImage: event?.wallpaper ? `linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url(${event.wallpaper})` : 'url(https://www.rydertech.us/backgrounds/space1.jpg)', backgroundSize: 'cover', backgroundPosition: 'center', backgroundRepeat: 'no-repeat', @@ -146,16 +146,6 @@ const EventView: React.FC = () => { position: 'relative', overflowY: 'auto', py: 4, - '&::before': event?.wallpaper ? { - content: '""', - position: 'fixed', - top: 0, - left: 0, - right: 0, - bottom: 0, - backgroundColor: 'rgba(0, 0, 0, 0.5)', - zIndex: 0, - } : {}, }} >