feat: add new episode layout
This commit is contained in:
10 files changed
+318
-288
No files matched your search
@@ -0,0 +1,67 @@
|
||||
import { Divider, Skeleton, Typography } from "@mui/material";
|
||||
import React from "react";
|
||||
|
||||
const EpisodeSkeleton = () => {
|
||||
return Array.from(new Array(8)).map((a, index) => {
|
||||
return <>
|
||||
<div
|
||||
key={index}
|
||||
style={{
|
||||
width: "100%",
|
||||
}}
|
||||
className="item-detail-episode"
|
||||
>
|
||||
<Typography variant="h6"><Skeleton variant="circular" sx={{
|
||||
animationDelay: `${index * 0.2}s`,
|
||||
animationDuration: "1.4s",
|
||||
animationName: "pulse",
|
||||
opacity: 0.1,
|
||||
}} /></Typography>
|
||||
<div className="item-detail-episode-image-container">
|
||||
<Skeleton className="item-detail-episode-image" variant="rectangular" sx={{
|
||||
animationDelay: `${index * 0.2}s`,
|
||||
animationDuration: "1.4s",
|
||||
animationName: "pulse",
|
||||
opacity: 0.1,
|
||||
}} />
|
||||
</div>
|
||||
<div className="item-detail-episode-info">
|
||||
<Typography variant="h4">
|
||||
<Skeleton variant="text" width="10em" sx={{
|
||||
animationDelay: `${index * 0.2}s`,
|
||||
animationDuration: "1.4s",
|
||||
animationName: "pulse",
|
||||
opacity: 0.1,
|
||||
}} />
|
||||
</Typography>
|
||||
<Skeleton variant="rounded" width="5em" style={{ borderRadius: "100px" }} sx={{
|
||||
animationDelay: `${index * 0.2}s`,
|
||||
animationDuration: "1.4s",
|
||||
animationName: "pulse",
|
||||
opacity: 0.1,
|
||||
}} />
|
||||
<Typography style={{
|
||||
width: "100%"
|
||||
}}>
|
||||
<Skeleton width="100%" sx={{
|
||||
animationDelay: `${index * 0.2}s`,
|
||||
animationDuration: "1.4s",
|
||||
animationName: "pulse",
|
||||
opacity: 0.1,
|
||||
}} />
|
||||
<Skeleton width="100%" sx={{
|
||||
animationDelay: `${index * 0.2}s`,
|
||||
animationDuration: "1.4s",
|
||||
animationName: "pulse",
|
||||
opacity: 0.1,
|
||||
}} />
|
||||
</Typography>
|
||||
</div>
|
||||
</div>
|
||||
{index !== 7 && <Divider orientation="horizontal" flexItem />}
|
||||
|
||||
</>
|
||||
})
|
||||
}
|
||||
|
||||
export default EpisodeSkeleton
|
||||
@@ -1,10 +1,8 @@
|
||||
import Card from "@mui/material/Card";
|
||||
import CardContent from "@mui/material/CardContent";
|
||||
import CardMedia from "@mui/material/CardMedia";
|
||||
import Divider from "@mui/material/Divider";
|
||||
import Skeleton from "@mui/material/Skeleton";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import Grid from "@mui/material/Unstable_Grid2";
|
||||
import EpisodeSkeleton from "./episode";
|
||||
|
||||
import { borderRadiusDefault } from "../../palette.module.scss";
|
||||
|
||||
@@ -47,80 +45,7 @@ export const SeasonSelectorSkeleton = () => {
|
||||
paddingBottom: " 0.5em",
|
||||
}}
|
||||
/>
|
||||
{Array.from(new Array(4)).map((a, index) => {
|
||||
return (
|
||||
<Grid xs={1} sm={1} md={1} key={a}>
|
||||
<Card sx={{ background: "transparent" }} elevation={0}>
|
||||
<CardMedia>
|
||||
<Skeleton
|
||||
// animation="wave"
|
||||
variant="rectangular"
|
||||
sx={{
|
||||
aspectRatio: "1.777",
|
||||
height: "auto",
|
||||
m: 1,
|
||||
borderRadius: "10px",
|
||||
animationDelay: `${index * 0.2}s`,
|
||||
animationDuration: "1.4s",
|
||||
animationName: "pulse",
|
||||
opacity: 0.1,
|
||||
}}
|
||||
/>
|
||||
</CardMedia>
|
||||
<CardContent
|
||||
sx={{
|
||||
padding: "0 0.5em",
|
||||
alignItems: "flex-start",
|
||||
backgroundColor: "transparent",
|
||||
}}
|
||||
>
|
||||
<Typography variant="h6">
|
||||
<Skeleton
|
||||
variant="text"
|
||||
sx={{
|
||||
animationDelay: `${index * 0.2}s`,
|
||||
animationDuration: "1.4s",
|
||||
animationName: "pulse",
|
||||
opacity: 0.1,
|
||||
}}
|
||||
/>
|
||||
</Typography>
|
||||
|
||||
<Typography variant="body2">
|
||||
<Skeleton
|
||||
variant="text"
|
||||
sx={{
|
||||
animationDelay: `${index * 0.2}s`,
|
||||
animationDuration: "1.4s",
|
||||
animationName: "pulse",
|
||||
opacity: 0.1,
|
||||
}}
|
||||
/>
|
||||
<Skeleton
|
||||
variant="text"
|
||||
sx={{
|
||||
animationDelay: `${index * 0.2}s`,
|
||||
animationDuration: "1.4s",
|
||||
animationName: "pulse",
|
||||
opacity: 0.1,
|
||||
}}
|
||||
/>
|
||||
|
||||
<Skeleton
|
||||
variant="text"
|
||||
sx={{
|
||||
animationDelay: `${index * 0.2}s`,
|
||||
animationDuration: "1.4s",
|
||||
animationName: "pulse",
|
||||
opacity: 0.1,
|
||||
}}
|
||||
/>
|
||||
</Typography>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</Grid>
|
||||
);
|
||||
})}
|
||||
<EpisodeSkeleton/>
|
||||
</Grid>
|
||||
);
|
||||
};
|
||||
Reference in new issue
Block a user