Skip to content

Commit

Permalink
Add full app backdrop
Browse files Browse the repository at this point in the history
  • Loading branch information
prayag17 committed Aug 14, 2023
1 parent 73085f7 commit 94e7ea9
Show file tree
Hide file tree
Showing 7 changed files with 436 additions and 451 deletions.
43 changes: 22 additions & 21 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -359,33 +359,34 @@ function App() {
</Button>
</DialogActions>
</Dialog>
<AnimatePresence>
<AnimatePresence wait>
<Box className="app-backdrop-container">
<motion.img
key={backdropId}
src={backdropUrl}
alt=""
className="app-backdrop"
initial={{
opacity: 0,
}}
animate={{
opacity: 0.5,
}}
exit={{
opacity: 0,
}}
transition={{
duration: 1,
}}
loading="eager"
/>
</Box>
<div
style={{
display: "flex",
width: "calc(100vw - 14px)",
}}
>
<Box className="app-backdrop-container">
<motion.img
key={backdropId}
src={backdropUrl}
alt=""
className="app-backdrop"
initial={{
opacity: 0,
}}
animate={{
opacity: 0.5,
}}
exit={{
opacity: 0,
}}
transition={{
duration: 1,
}}
/>
</Box>
<CssBaseline />
<SideMenu />
<AppBar />
Expand Down
6 changes: 3 additions & 3 deletions src/components/menu/sidemenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,10 @@ export const SideMenu = ({}) => {
},
}}
sx={{
zIndex: 1,
width: `calc(${theme.spacing(7)} + 10px)`,
background: theme.palette.background.paper,
background:
"linear-gradient(to right, rgb(0 0 0 / 0.35) , transparent) !important ",
}}
>
<DrawerHeader
Expand All @@ -139,7 +141,6 @@ export const SideMenu = ({}) => {
justifyContent: "center",
}}
></DrawerHeader>
<Divider />
{libraries.isLoading ? (
<>
<Skeleton
Expand Down Expand Up @@ -207,7 +208,6 @@ export const SideMenu = ({}) => {
)}
</List>
<List sx={{ marginTop: "auto" }}>
<Divider />
<Tooltip
title="Home"
placement="right"
Expand Down
6 changes: 5 additions & 1 deletion src/components/skeleton/carousel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ import { theme } from "../../theme";
export const CarouselSkeleton = () => {
return (
<Paper
className="hero-carousel-slide"
className="hero-carousel-skeleton"
elevation={0}
sx={{
height: "100vh",
position: "relative",
background: theme.palette.primary.background.main,
borderRadius: 0,
}}
>
<div className="hero-carousel-background">
Expand Down
14 changes: 9 additions & 5 deletions src/routes/home/home.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,16 @@
right: 0;
bottom: 0;
opacity: 0.8;
mask-image: linear-gradient(to bottom, black, transparent);
mask-image: linear-gradient(to bottom, black 40%, transparent),
linear-gradient(to left, black 40%, transparent);
-webkit-mask-image: linear-gradient(
to bottom,
black,
transparent
);
to bottom,
black 40%,
transparent
),
linear-gradient(to left, black 40%, transparent);
mask-composite: source-in;
-webkit-mask-composite: source-in;
}
&-image {
position: absolute;
Expand Down
Loading

0 comments on commit 94e7ea9

Please sign in to comment.