style: Improve titlePage styling

This commit is contained in:
Prayag Prajapati committed 2024-03-26 23:01:31 +05:30
1 parent 1403f57171
commit c362c7e59f
34 files changed
+635 -615

No files matched your search

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 451 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 KiB

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 15 KiB

+3 -1
View File
@@ -65,7 +65,9 @@
"nsis": { "nsis": {
"sidebarImage": "../public/installerSideBarImage.bmp", "sidebarImage": "../public/installerSideBarImage.bmp",
"headerImage": "../public/installerHeaderImage.bmp", "headerImage": "../public/installerHeaderImage.bmp",
"installerIcon": "icons/icon.ico" "installerIcon": "icons/icon.ico",
"displayLanguageSelector": true,
"license": "../LICENSE"
}, },
"webviewInstallMode": { "webviewInstallMode": {
"silent": true, "silent": true,
+39 -9
View File
@@ -36,6 +36,7 @@ import {
} from "../../utils/store/playback"; } from "../../utils/store/playback";
import type { SxProps } from "@mui/material"; import type { SxProps } from "@mui/material";
import { getRuntimeCompact } from "../../utils/date/time";
const PlayButton = ({ const PlayButton = ({
item, item,
@@ -294,14 +295,22 @@ const PlayButton = ({
); );
} }
return ( return (
<div
className="play-button"
style={{
width: "auto",
position: "relative",
}}
>
<Button <Button
className={className} className={className ?? "play-button"}
variant="contained" variant="contained"
onClick={handleClick} onClick={handleClick}
startIcon={ startIcon={
<div <div
className="material-symbols-rounded fill" className="material-symbols-rounded fill"
style={{ style={{
zIndex: 1,
fontSize: "2em", fontSize: "2em",
}} }}
> >
@@ -313,8 +322,18 @@ const PlayButton = ({
position: "relative", position: "relative",
overflow: "hidden", overflow: "hidden",
}} }}
color="white"
size={size} size={size}
> >
{itemUserData.PlaybackPositionTicks > 0
? "Continue Watching"
: item?.Type === "MusicAlbum" ||
item?.Type === "Audio" ||
item?.Type === "AudioBook" ||
item?.Type === "Playlist" ||
audio
? "Play Now"
: "Watch Now"}
<LinearProgress <LinearProgress
variant="determinate" variant="determinate"
value={ value={
@@ -332,18 +351,29 @@ const PlayButton = ({
background: "transparent", background: "transparent",
opacity: 0.2, opacity: 0.2,
zIndex: 0, zIndex: 0,
mixBlendMode: "difference",
}} }}
color="white" color="white"
/> />
{itemUserData.PlaybackPositionTicks > 0
? "Continue Watching"
: item?.Type === "MusicAlbum" ||
item?.Type === "Audio" ||
item?.Type === "AudioBook" ||
item?.Type === "Playlist"
? "Play Now"
: "Watch Now"}
</Button> </Button>
{itemUserData.PlaybackPositionTicks > 0 && (
<Typography
sx={{
opacity: 0.8,
position: "absolute",
bottom: "-1.8em",
left: "50%",
transform: "translate(-50%)",
}}
variant="caption"
>
{getRuntimeCompact(
item.RunTimeTicks - itemUserData.PlaybackPositionTicks,
)}{" "}
left
</Typography>
)}
</div>
); );
}; };
@@ -24,6 +24,7 @@
border-radius: 20px; border-radius: 20px;
overflow: hidden; overflow: hidden;
border: 1px solid rgb(255 255 255 / 0.2); border: 1px solid rgb(255 255 255 / 0.2);
margin-bottom: 2em;
} }
&-header{ &-header{
background: rgb(0 0 0 / 0.4) !important; background: rgb(0 0 0 / 0.4) !important;
@@ -205,6 +205,8 @@ const AudioPlayer = () => {
setShowWaveform(false); setShowWaveform(false);
}; };
console.log(tracks);
const info = useMemo( const info = useMemo(
() => ( () => (
<div <div
@@ -221,10 +223,10 @@ const AudioPlayer = () => {
> >
<div className="audio-player-image-container"> <div className="audio-player-image-container">
<img <img
alt={tracks[currentTrack].Name} alt={tracks[currentTrack]?.Name}
className="audio-player-image" className="audio-player-image"
src={api.getItemImageUrl( src={api.getItemImageUrl(
Object.keys(tracks[currentTrack].ImageTags).length === 0 Object.keys(tracks[currentTrack]?.ImageTags).length === 0
? item.AlbumId ? item.AlbumId
: item.Id, : item.Id,
"Primary", "Primary",
+1 -7
View File
@@ -10,12 +10,7 @@ const ItemSkeleton = () => {
width: "100vw", width: "100vw",
}} }}
> >
<div <div className="item-hero">
className="item-hero flex flex-row"
style={{
height: "50vh",
}}
>
<div <div
className="item-hero-image-container" className="item-hero-image-container"
style={{ style={{
@@ -89,7 +84,6 @@ const ItemSkeleton = () => {
<Skeleton variant="text" /> <Skeleton variant="text" />
<Skeleton variant="text" /> <Skeleton variant="text" />
</div> </div>
<Divider flexItem orientation="vertical" />
<div <div
style={{ style={{
width: "100%", width: "100%",
-1
View File
@@ -10,7 +10,6 @@ const queryClient = new QueryClient({
defaultOptions: { defaultOptions: {
queries: { queries: {
networkMode: "always", networkMode: "always",
staleTime: 1 * 60 * 1000, // 1 minute
}, },
mutations: { mutations: {
networkMode: "always", networkMode: "always",
+99 -6
View File
@@ -2,9 +2,6 @@
$border-radius: 20px; $border-radius: 20px;
.item-album{ .item-album{
.item-hero-image-container{
width: 22% !important;
}
.item-detail-cast { .item-detail-cast {
max-height: 50vh; max-height: 50vh;
overflow-y: auto; overflow-y: auto;
@@ -107,6 +104,8 @@ $border-radius: 20px;
} }
} }
$cardWidth: 22%;
.item-album.item { .item-album.item {
gap: 1em; gap: 1em;
.item-hero { .item-hero {
@@ -180,13 +179,107 @@ $border-radius: 20px;
} }
} }
} }
.item-hero {
height: 60vh;
gap: 2em;
row-gap: 1.2em;
position: relative;
align-items: flex-end;
margin-bottom: 1em;
display: grid;
grid-template-columns: $cardWidth 1fr;
grid-template-rows: 1fr auto;
&-image {
opacity: 0;
width: 100%;
object-fit: contain;
transition: opacity $transition-time-default;
&-container {
height: fit-content;
max-height: 100%;
overflow: hidden;
border-radius: $border-radius-default;
box-shadow: $shadow-card;
flex-grow: 1;
flex-shrink: 0;
position: relative;
width: 100%;
}
&-blurhash {
position: absolute !important;
width: 100% !important;
height: 100% !important;
z-index: -1;
}
&-icon {
background: linear-gradient(45deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.15));
height: 100%;
display: flex;
align-items: center;
justify-content: center;
.material-symbols-rounded{
font-size: 4em;
}
}
}
&-logo {
max-width: 34rem;
max-height: 10rem;
opacity: 0;
transition: opacity $transition-time-default;
object-position: bottom;
margin-bottom: 2em;
}
&-detail {
width: 100%;
align-items: flex-start;
gap: 0.2em;
justify-content: end;
}
&-buttons {
&-container {
align-items: center;
justify-content: space-between;
width: 100%;
grid-column: 1/3;
display: grid;
grid-template-columns: inherit;
gap: 2em;
}
}
&-backdrop {
width: 100vw;
height: 100vh;
object-fit: cover;
object-position: top;
opacity: 0;
transition: opacity $transition-time-default;
&-container {
filter: brightness(0.8);
position: absolute;
top: -4.4em;
left: -$page-margin;
width: 100vw;
height: calc(54vh + 4.4em);
z-index: -1;
mask-image: linear-gradient(to top, transparent, black);
-webkit-mask-image: linear-gradient(
to top,
transparent,
black
);
}
}
& .play-button {
width: 100% !important;
}
}
.item-detail { .item-detail {
display: grid; display: grid;
grid-template-columns: 1fr 5px 35%; grid-template-columns: 1fr 35%;
justify-items: center; justify-items: center;
align-items: start; align-items: start;
gap: 1em; gap: 3em;
&-cast { &-cast {
max-height: 50vh; max-height: 50vh;
+42 -22
View File
@@ -8,6 +8,7 @@ import Divider from "@mui/material/Divider";
import Paper from "@mui/material/Paper"; import Paper from "@mui/material/Paper";
import Stack from "@mui/material/Stack"; import Stack from "@mui/material/Stack";
import Typography from "@mui/material/Typography"; import Typography from "@mui/material/Typography";
import heroBg from "../../assets/herobg.png";
import { Link, NavLink, useParams } from "react-router-dom"; import { Link, NavLink, useParams } from "react-router-dom";
@@ -233,7 +234,17 @@ const MusicAlbumTitlePage = () => {
}} }}
/> />
) : ( ) : (
<></> <motion.img
alt={item.data.Name}
src={heroBg}
className="item-hero-backdrop"
onLoad={(e) => {
e.currentTarget.style.opacity = 1;
}}
style={{
y: parallax,
}}
/>
)} )}
</div> </div>
<div <div
@@ -265,13 +276,24 @@ const MusicAlbumTitlePage = () => {
/> />
</> </>
) : ( ) : (
<></> <div className="item-hero-image-icon">
{getTypeIcon(item.data.Type)}
</div>
)} )}
</div> </div>
<div className="item-hero-detail flex flex-column"> <div className="item-hero-detail flex flex-column">
<Typography variant="h2">{item.data.Name}</Typography> <Typography variant="h2" fontWeight={200} mb={2}>
{item.data.Name}
</Typography>
<Stack
direction="row"
gap={2}
justifyItems="flex-start"
alignItems="center"
>
<Chip <Chip
size="small"
label={item.data.AlbumArtist} label={item.data.AlbumArtist}
icon={ icon={
<span <span
@@ -286,45 +308,45 @@ const MusicAlbumTitlePage = () => {
artist artist
</span> </span>
} }
size="large"
sx={{ sx={{
"& .MuiChip-label": { "& .MuiChip-label": {
marginLeft: 0.5, marginLeft: 0.5,
}, },
}} }}
/> />
<Stack {item.data.PremiereDate && (
direction="row" <Typography style={{ opacity: "0.8" }} variant="subtitle2">
gap={2}
justifyItems="flex-start"
alignItems="center"
>
<Typography style={{ opacity: "0.8" }} variant="subtitle1">
{item.data.ProductionYear ?? ""} {item.data.ProductionYear ?? ""}
</Typography> </Typography>
<Typography style={{ opacity: "0.8" }} variant="subtitle1"> )}
<Typography style={{ opacity: "0.8" }} variant="subtitle2">
{item.data.ChildCount > 1 {item.data.ChildCount > 1
? `${item.data.ChildCount} Tracks` ? `${item.data.ChildCount} Tracks`
: `${item.data.ChildCount}`} : `${item.data.ChildCount} Track`}
</Typography> </Typography>
{item.data.RunTimeTicks && ( {item.data.RunTimeTicks && (
<Typography style={{ opacity: "0.8" }} variant="subtitle1"> <Typography style={{ opacity: "0.8" }} variant="subtitle2">
{getRuntime(item.data.RunTimeTicks)} {getRuntime(item.data.RunTimeTicks)}
</Typography> </Typography>
)} )}
</Stack> <Typography variant="subtitle2" style={{ opacity: 0.8 }}>
<Typography variant="subtitle1" style={{ opacity: 0.8 }}> {item.data.Genres?.slice(0, 4).join(" / ")}
{item.data.Genres.join(", ")}
</Typography> </Typography>
</Stack>
</div>
<div className="item-hero-buttons-container flex flex-row"> <div className="item-hero-buttons-container">
<div className="flex flex-row"> <div className="flex flex-row fullWidth">
<PlayButton <PlayButton
audio audio
item={item.data}
itemId={item.data.Id} itemId={item.data.Id}
itemType={item.data.Type} itemType={item.data.Type}
itemUserData={item.data.UserData} itemUserData={item.data.UserData}
userId={user.data.Id} userId={user.data.Id}
buttonProps={{
fullWidth: true,
}}
/> />
</div> </div>
<div className="flex flex-row" style={{ gap: "1em" }}> <div className="flex flex-row" style={{ gap: "1em" }}>
@@ -338,7 +360,6 @@ const MusicAlbumTitlePage = () => {
</div> </div>
</div> </div>
</div> </div>
</div>
<div <div
className="item-detail" className="item-detail"
style={{ style={{
@@ -364,7 +385,6 @@ const MusicAlbumTitlePage = () => {
))} ))}
</div> </div>
</div> </div>
<Divider flexItem orientation="vertical" />
<div <div
style={{ style={{
width: "100%", width: "100%",
@@ -436,7 +456,7 @@ const MusicAlbumTitlePage = () => {
{similarItems.data.TotalRecordCount > 0 && ( {similarItems.data.TotalRecordCount > 0 && (
<CardScroller <CardScroller
title="You might also like" title="You might also like"
displayCards={8} displayCards={7}
disableDecoration disableDecoration
> >
{similarItems.data.Items.map((similar, index) => { {similarItems.data.Items.map((similar, index) => {
+34 -9
View File
@@ -1,10 +1,17 @@
$cardWidth: 22%;
.item-artist.item { .item-artist.item {
gap: 1em; gap: 1em;
.item-hero { .item-hero {
height: 50vh; height: 60vh;
gap: 2em; gap: 2em;
row-gap: 1.2em;
position: relative; position: relative;
align-items: center; align-items: flex-end;
margin-bottom: 1em;
display: grid;
grid-template-columns: $cardWidth 1fr;
grid-template-rows: 1fr auto;
&-image { &-image {
opacity: 0; opacity: 0;
width: 100%; width: 100%;
@@ -19,7 +26,7 @@
flex-grow: 1; flex-grow: 1;
flex-shrink: 0; flex-shrink: 0;
position: relative; position: relative;
width: 18% !important; width: 100%;
} }
&-blurhash { &-blurhash {
position: absolute !important; position: absolute !important;
@@ -27,18 +34,29 @@
height: 100% !important; height: 100% !important;
z-index: -1; z-index: -1;
} }
&-icon {
background: linear-gradient(45deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.15));
height: 100%;
display: flex;
align-items: center;
justify-content: center;
.material-symbols-rounded{
font-size: 4em;
}
}
} }
&-logo { &-logo {
max-width: 42rem; max-width: 34rem;
max-height: 10rem; max-height: 10rem;
opacity: 0; opacity: 0;
transition: opacity $transition-time-default; transition: opacity $transition-time-default;
object-position: bottom; object-position: bottom;
margin-bottom: 2em;
} }
&-detail { &-detail {
width: 100%; width: 100%;
align-items: flex-start; align-items: flex-start;
gap: 1em; gap: 0.2em;
justify-content: end; justify-content: end;
} }
&-buttons { &-buttons {
@@ -46,6 +64,10 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;
grid-column: 1/3;
display: grid;
grid-template-columns: inherit;
gap: 2em;
} }
} }
&-backdrop { &-backdrop {
@@ -61,7 +83,7 @@
top: -4.4em; top: -4.4em;
left: -$page-margin; left: -$page-margin;
width: 100vw; width: 100vw;
height: calc(50vh + 4.4em); height: calc(54vh + 4.4em);
z-index: -1; z-index: -1;
mask-image: linear-gradient(to top, transparent, black); mask-image: linear-gradient(to top, transparent, black);
-webkit-mask-image: linear-gradient( -webkit-mask-image: linear-gradient(
@@ -71,14 +93,17 @@
); );
} }
} }
& .play-button {
width: 100% !important;
}
} }
.item-detail { .item-detail {
display: grid; display: grid;
grid-template-columns: 1fr 5px 35%; grid-template-columns: 1fr 35%;
justify-items: center; justify-items: center;
align-items: start; align-items: start;
gap: 1em; gap: 3em;
&-cast { &-cast {
&-container { &-container {
@@ -151,7 +176,7 @@
.grid { .grid {
display: grid; display: grid;
grid-template-columns: repeat(8, minmax(0, 1fr)); grid-template-columns: repeat(7, minmax(0, 1fr));
align-items: start; align-items: start;
} }
+7 -3
View File
@@ -38,6 +38,7 @@ import { setBackdrop, useBackdropStore } from "../../utils/store/backdrop";
import "./artist.module.scss"; import "./artist.module.scss";
import IconLink from "../../components/iconLink"; import IconLink from "../../components/iconLink";
import { getTypeIcon } from "../../components/utils/iconsCollection";
function TabPanel(props) { function TabPanel(props) {
const { children, value, index, ...other } = props; const { children, value, index, ...other } = props;
@@ -263,7 +264,9 @@ const ArtistTitlePage = () => {
/> />
</> </>
) : ( ) : (
<></> <div className="item-hero-image-icon">
{getTypeIcon(item.data.Type)}
</div>
)} )}
</div> </div>
<div className="item-hero-detail flex flex-column"> <div className="item-hero-detail flex flex-column">
@@ -281,7 +284,9 @@ const ArtistTitlePage = () => {
className="item-hero-logo" className="item-hero-logo"
/> />
) : ( ) : (
<Typography variant="h3">{item.data.Name}</Typography> <Typography variant="h2" fontWeight={200}>
{item.data.Name}
</Typography>
)} )}
<LikeButton <LikeButton
@@ -312,7 +317,6 @@ const ArtistTitlePage = () => {
))} ))}
</div> </div>
</div> </div>
<Divider flexItem orientation="vertical" />
<div <div
style={{ style={{
width: "100%", width: "100%",
+32 -8
View File
@@ -1,10 +1,16 @@
$cardWidth: 18%;
.item-boxset.item { .item-boxset.item {
gap: 1em; gap: 1em;
.item-hero { .item-hero {
height: 50vh; height: 60vh;
gap: 2em; gap: 2em;
row-gap: 1.2em;
position: relative; position: relative;
align-items: center; align-items: flex-end;
margin-bottom: 1em;
display: grid;
grid-template-columns: $cardWidth 1fr;
grid-template-rows: 1fr auto;
&-image { &-image {
opacity: 0; opacity: 0;
width: 100%; width: 100%;
@@ -19,7 +25,7 @@
flex-grow: 1; flex-grow: 1;
flex-shrink: 0; flex-shrink: 0;
position: relative; position: relative;
width: 18% !important; width: 100%;
} }
&-blurhash { &-blurhash {
position: absolute !important; position: absolute !important;
@@ -27,18 +33,29 @@
height: 100% !important; height: 100% !important;
z-index: -1; z-index: -1;
} }
&-icon {
background: linear-gradient(45deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.15));
height: 100%;
display: flex;
align-items: center;
justify-content: center;
.material-symbols-rounded{
font-size: 4em;
}
}
} }
&-logo { &-logo {
max-width: 42rem; max-width: 34rem;
max-height: 10rem; max-height: 10rem;
opacity: 0; opacity: 0;
transition: opacity $transition-time-default; transition: opacity $transition-time-default;
object-position: bottom; object-position: bottom;
margin-bottom: 2em;
} }
&-detail { &-detail {
width: 100%; width: 100%;
align-items: flex-start; align-items: flex-start;
gap: 1em; gap: 0.2em;
justify-content: end; justify-content: end;
} }
&-buttons { &-buttons {
@@ -46,6 +63,10 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;
grid-column: 1/3;
display: grid;
grid-template-columns: inherit;
gap: 2em;
} }
} }
&-backdrop { &-backdrop {
@@ -61,7 +82,7 @@
top: -4.4em; top: -4.4em;
left: -$page-margin; left: -$page-margin;
width: 100vw; width: 100vw;
height: calc(50vh + 4.4em); height: calc(54vh + 4.4em);
z-index: -1; z-index: -1;
mask-image: linear-gradient(to top, transparent, black); mask-image: linear-gradient(to top, transparent, black);
-webkit-mask-image: linear-gradient( -webkit-mask-image: linear-gradient(
@@ -71,14 +92,17 @@
); );
} }
} }
& .play-button {
width: 100% !important;
}
} }
.item-detail { .item-detail {
display: grid; display: grid;
grid-template-columns: 1fr 5px 35%; grid-template-columns: 1fr 35%;
justify-items: center; justify-items: center;
align-items: start; align-items: start;
gap: 1em; gap: 3em;
&-cast { &-cast {
&-container { &-container {
+32 -59
View File
@@ -218,10 +218,12 @@ const BoxSetTitlePage = () => {
/> />
</> </>
) : ( ) : (
<></> <div className="item-hero-image-icon">
{getTypeIcon(item.data.Type)}
</div>
)} )}
</div> </div>
<div className="item-hero-detail flex flex-column"> <div className="item-hero-detail">
{Object.keys(item.data.ImageTags).includes("Logo") ? ( {Object.keys(item.data.ImageTags).includes("Logo") ? (
<img <img
alt={item.data.Name} alt={item.data.Name}
@@ -236,7 +238,9 @@ const BoxSetTitlePage = () => {
className="item-hero-logo" className="item-hero-logo"
/> />
) : ( ) : (
<Typography variant="h2">{item.data.Name}</Typography> <Typography variant="h2" fontWeight={200} mb={2}>
{item.data.Name}
</Typography>
)} )}
<Stack <Stack
@@ -245,11 +249,17 @@ const BoxSetTitlePage = () => {
justifyItems="flex-start" justifyItems="flex-start"
alignItems="center" alignItems="center"
> >
<Typography style={{ opacity: "0.8" }} variant="subtitle1"> {item.data.PremiereDate && (
<Typography style={{ opacity: "0.8" }} variant="subtitle2">
{item.data.ProductionYear ?? ""} {item.data.ProductionYear ?? ""}
</Typography> </Typography>
)}
{item.data.OfficialRating && ( {item.data.OfficialRating && (
<Chip variant="filled" label={item.data.OfficialRating} /> <Chip
variant="filled"
size="small"
label={item.data.OfficialRating}
/>
)} )}
{item.data.CommunityRating && ( {item.data.CommunityRating && (
@@ -262,12 +272,10 @@ const BoxSetTitlePage = () => {
className="hero-carousel-info-rating" className="hero-carousel-info-rating"
> >
<div <div
className="material-symbols-rounded " className="material-symbols-rounded fill"
style={{ style={{
// fontSize: "2.2em", // fontSize: "2.2em",
color: yellow[400], color: yellow[400],
fontVariationSettings:
'"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40',
}} }}
> >
star star
@@ -276,7 +284,7 @@ const BoxSetTitlePage = () => {
style={{ style={{
opacity: "0.8", opacity: "0.8",
}} }}
variant="subtitle1" variant="subtitle2"
> >
{Math.round(item.data.CommunityRating * 10) / 10} {Math.round(item.data.CommunityRating * 10) / 10}
</Typography> </Typography>
@@ -292,12 +300,10 @@ const BoxSetTitlePage = () => {
className="hero-carousel-info-rating" className="hero-carousel-info-rating"
> >
<div <div
className="material-symbols-rounded " className="material-symbols-rounded fill"
style={{ style={{
color: color:
item.data.CriticRating > 50 ? green[400] : red[400], item.data.CriticRating > 50 ? green[400] : red[400],
fontVariationSettings:
'"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40',
}} }}
> >
{item.data.CriticRating > 50 ? "thumb_up" : "thumb_down"} {item.data.CriticRating > 50 ? "thumb_up" : "thumb_down"}
@@ -306,7 +312,7 @@ const BoxSetTitlePage = () => {
style={{ style={{
opacity: "0.8", opacity: "0.8",
}} }}
variant="subtitle1" variant="subtitle2"
> >
{item.data.CriticRating} {item.data.CriticRating}
</Typography> </Typography>
@@ -314,26 +320,27 @@ const BoxSetTitlePage = () => {
)} )}
{item.data.RunTimeTicks && ( {item.data.RunTimeTicks && (
<Typography style={{ opacity: "0.8" }} variant="subtitle1"> <Typography style={{ opacity: "0.8" }} variant="subtitle2">
{getRuntime(item.data.RunTimeTicks)} {getRuntime(item.data.RunTimeTicks)}
</Typography> </Typography>
)} )}
{item.data.RunTimeTicks && ( {item.data.RunTimeTicks && (
<Typography style={{ opacity: "0.8" }} variant="subtitle1"> <Typography style={{ opacity: "0.8" }} variant="subtitle2">
{endsAt( {endsAt(
item.data.RunTimeTicks - item.data.RunTimeTicks -
item.data.UserData.PlaybackPositionTicks, item.data.UserData.PlaybackPositionTicks,
)} )}
</Typography> </Typography>
)} )}
</Stack> <Typography variant="subtitle2" style={{ opacity: 0.8 }}>
<Typography variant="subtitle1" style={{ opacity: 0.8 }}> {item.data.Genres?.slice(0, 4).join(" / ")}
{item.data.Genres.join(", ")}
</Typography> </Typography>
</Stack>
</div>
<div className="item-hero-buttons-container flex flex-row"> <div className="item-hero-buttons-container flex flex-row">
<div className="flex flex-row"> <div className="flex flex-row fullWidth">
<PlayButton <PlayButton
item={item.data}
itemId={item.data.Id} itemId={item.data.Id}
itemType={item.data.Type} itemType={item.data.Type}
itemUserData={item.data.UserData} itemUserData={item.data.UserData}
@@ -341,8 +348,8 @@ const BoxSetTitlePage = () => {
currentAudioTrack={0} currentAudioTrack={0}
currentSubTrack={0} currentSubTrack={0}
userId={user.data.Id} userId={user.data.Id}
sx={{ buttonProps={{
background: "hsl(195.56deg 29.03% 18.24%) !important", fullWidth: true,
}} }}
/> />
</div> </div>
@@ -364,42 +371,8 @@ const BoxSetTitlePage = () => {
</div> </div>
</div> </div>
</div> </div>
</div>
<div className="item-detail"> <div className="item-detail">
<div style={{ width: "100%" }}> <ShowMoreText content={item.data.Overview ?? ""} collapsedLines={4} />
{item.data.UserData.PlaybackPositionTicks > 0 && (
<div
style={{
width: "40%",
marginBottom: "1em",
}}
>
<Typography>
{getRuntime(
item.data.RunTimeTicks -
item.data.UserData.PlaybackPositionTicks,
)}{" "}
left
</Typography>
<LinearProgress
color="white"
variant="determinate"
value={item.data.UserData.PlayedPercentage}
style={{
borderRadius: "10px",
}}
/>
</div>
)}
<Typography variant="h5" fontStyle="italic" mb={1}>
{item.data.Taglines[0] ?? ""}
</Typography>
<ShowMoreText
content={item.data.Overview ?? ""}
collapsedLines={4}
/>
</div>
<Divider flexItem orientation="vertical" />
<div <div
style={{ style={{
width: "100%", width: "100%",
@@ -420,7 +393,7 @@ const BoxSetTitlePage = () => {
</div> </div>
</div> </div>
{collectionItems.data.TotalRecordCount > 0 && ( {collectionItems.data.TotalRecordCount > 0 && (
<CardScroller title="Items" displayCards={8} disableDecoration> <CardScroller title="Items" displayCards={7} disableDecoration>
{collectionItems.data.Items.map((similar, index) => { {collectionItems.data.Items.map((similar, index) => {
return ( return (
<Card <Card
@@ -451,7 +424,7 @@ const BoxSetTitlePage = () => {
{similarItems.data.TotalRecordCount > 0 && ( {similarItems.data.TotalRecordCount > 0 && (
<CardScroller <CardScroller
title="You might also like" title="You might also like"
displayCards={8} displayCards={7}
disableDecoration disableDecoration
> >
{similarItems.data.Items.map((similar, index) => { {similarItems.data.Items.map((similar, index) => {
+30 -10
View File
@@ -1,11 +1,16 @@
$cardWidth: 30%;
.item-episode.item { .item-episode.item {
gap: 1em; gap: 1em;
.item-hero { .item-hero {
height: 50vh; height: 50vh;
gap: 2em; gap: 2em;
row-gap: 1.2em;
position: relative; position: relative;
align-items: center; align-items: flex-end;
margin-bottom: 1em;
display: grid;
grid-template-columns: $cardWidth 1fr;
grid-template-rows: 1fr auto;
&-image { &-image {
opacity: 0; opacity: 0;
width: 100%; width: 100%;
@@ -16,13 +21,11 @@
max-height: 100%; max-height: 100%;
overflow: hidden; overflow: hidden;
border-radius: $border-radius-default; border-radius: $border-radius-default;
width: fit-content;
box-shadow: $shadow-card; box-shadow: $shadow-card;
flex-grow: 1; flex-grow: 1;
flex-shrink: 0; flex-shrink: 0;
position: relative; position: relative;
width: 26% !important; width: 100%;
max-width: 26% !important;
} }
&-blurhash { &-blurhash {
position: absolute !important; position: absolute !important;
@@ -30,9 +33,19 @@
height: 100% !important; height: 100% !important;
z-index: -1; z-index: -1;
} }
&-icon {
background: linear-gradient(45deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.15));
height: 100%;
display: flex;
align-items: center;
justify-content: center;
.material-symbols-rounded{
font-size: 4em;
}
}
} }
&-logo { &-logo {
max-width: 42rem; max-width: 34rem;
max-height: 10rem; max-height: 10rem;
opacity: 0; opacity: 0;
transition: opacity $transition-time-default; transition: opacity $transition-time-default;
@@ -41,14 +54,18 @@
&-detail { &-detail {
width: 100%; width: 100%;
align-items: flex-start; align-items: flex-start;
gap: 0.2em;
justify-content: end; justify-content: end;
gap: 0.5em;
} }
&-buttons { &-buttons {
&-container { &-container {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;
grid-column: 1/3;
display: grid;
grid-template-columns: inherit;
gap: 2em;
} }
} }
&-backdrop { &-backdrop {
@@ -64,7 +81,7 @@
top: -4.4em; top: -4.4em;
left: -$page-margin; left: -$page-margin;
width: 100vw; width: 100vw;
height: calc(50vh + 4.4em); height: calc(44vh + 4.4em);
z-index: -1; z-index: -1;
mask-image: linear-gradient(to top, transparent, black); mask-image: linear-gradient(to top, transparent, black);
-webkit-mask-image: linear-gradient( -webkit-mask-image: linear-gradient(
@@ -74,14 +91,17 @@
); );
} }
} }
& .play-button {
width: 100% !important;
}
} }
.item-detail { .item-detail {
display: grid; display: grid;
grid-template-columns: 1fr 5px 35%; grid-template-columns: 1fr 35%;
justify-items: center; justify-items: center;
align-items: start; align-items: start;
gap: 1em; gap: 3em;
&-cast { &-cast {
&-container { &-container {
+41 -229
View File
@@ -280,7 +280,7 @@ const EpisodeTitlePage = () => {
className="scrollY padded-top flex flex-column item item-episode" className="scrollY padded-top flex flex-column item item-episode"
ref={pageRef} ref={pageRef}
> >
<div className="item-hero flex flex-row"> <div className="item-hero">
<div className="item-hero-backdrop-container"> <div className="item-hero-backdrop-container">
{item.data.BackdropImageTags ? ( {item.data.BackdropImageTags ? (
<motion.img <motion.img
@@ -333,11 +333,20 @@ const EpisodeTitlePage = () => {
/> />
</> </>
) : ( ) : (
<></> <div className="item-hero-image-icon">
{getTypeIcon(item.data.Type)}
</div>
)} )}
</div> </div>
<div className="item-hero-detail flex flex-column"> <div className="item-hero-detail">
<TextLink variant={"h2"} location={`/series/${item.data.SeriesId}`}> <TextLink
otherProps={{
fontWeight: 200,
mb: 2,
}}
variant={"h2"}
location={`/series/${item.data.SeriesId}`}
>
{item.data.ParentLogoItemId.length > 0 ? ( {item.data.ParentLogoItemId.length > 0 ? (
<img <img
alt={item.data.SeriesName} alt={item.data.SeriesName}
@@ -355,123 +364,33 @@ const EpisodeTitlePage = () => {
item.data.SeriesName item.data.SeriesName
)} )}
</TextLink> </TextLink>
<Typography variant="h4"> <Typography variant="h4" fontWeight={300} mb={2}>
S{item.data.ParentIndexNumber ?? 0}:E S{item.data.ParentIndexNumber ?? 0}:E
{item.data.IndexNumber} {item.data.Name} {item.data.IndexNumberEnd
? `${item.data.IndexNumber ?? 0} / ${
item.data.IndexNumberEnd ?? 0
}`
: `${item.data.IndexNumber ?? 0}`}{" "}
{item.data.Name}
</Typography> </Typography>
<Stack direction="row" gap={1}>
{!!qualityLabel() && (
<Chip
variant="filled"
label={qualityLabel()}
sx={{
borderRadius: "8px !important",
"& .MuiChip-label": {
fontSize: "2.2em",
},
}}
/>
)}
{!!surroundSoundLabel() && (
<Chip
variant="filled"
label={
<Typography variant="caption" fontWeight={600}>
{surroundSoundLabel()}
</Typography>
}
sx={{
borderRadius: "8px !important",
"& .MuiChip-label": {
fontSize: "2.2em",
},
}}
/>
)}
{!!videoTracks[0]?.VideoRangeType && (
<Chip
variant="filled"
label={
<Typography variant="caption" fontWeight={600}>
{videoTracks[0].VideoRangeType}
</Typography>
}
sx={{
borderRadius: "8px !important",
"& .MuiChip-label": {
fontSize: "2.2em",
},
}}
/>
)}
{!!atmosLabel() && (
<Chip
variant="filled"
label={
<Typography
variant="caption"
fontWeight={600}
style={{
display: "flex",
alignItems: "center",
justifyContent: "center",
gap: "0.5em",
}}
>
<img
alt="Dolby"
src={dolbyIcon}
style={{
height: "1.6em",
}}
/>
{atmosLabel()}
</Typography>
}
sx={{
borderRadius: "8px !important",
"& .MuiChip-label": {
fontSize: "2.2em",
},
}}
/>
)}
{!!subtitleTracks.length > 0 && (
<Chip
variant="filled"
label={
// <Typography
// variant="caption"
// fontWeight={600}
// fontFamily="JetBrains Mono Variable"
// >
// CC
// </Typography>
<span className="material-symbols-rounded">
closed_caption
</span>
}
sx={{
borderRadius: "8px !important",
"& .MuiChip-label": {
fontSize: "2.2em",
},
}}
/>
)}
</Stack>
<Stack <Stack
direction="row" direction="row"
gap={2} gap={2}
justifyItems="flex-start" justifyItems="flex-start"
alignItems="center" alignItems="center"
> >
<Typography style={{ opacity: "0.8" }} variant="subtitle1"> {item.data.PremiereDate && (
<Typography style={{ opacity: "0.8" }} variant="subtitle2">
{item.data.ProductionYear ?? ""} {item.data.ProductionYear ?? ""}
</Typography> </Typography>
)}
{item.data.OfficialRating && ( {item.data.OfficialRating && (
<Chip variant="filled" label={item.data.OfficialRating} /> <Chip
variant="filled"
size="small"
label={item.data.OfficialRating}
/>
)} )}
{item.data.CommunityRating && ( {item.data.CommunityRating && (
@@ -484,12 +403,10 @@ const EpisodeTitlePage = () => {
className="hero-carousel-info-rating" className="hero-carousel-info-rating"
> >
<div <div
className="material-symbols-rounded " className="material-symbols-rounded fill"
style={{ style={{
// fontSize: "2.2em", // fontSize: "2.2em",
color: yellow[400], color: yellow[400],
fontVariationSettings:
'"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40',
}} }}
> >
star star
@@ -498,7 +415,7 @@ const EpisodeTitlePage = () => {
style={{ style={{
opacity: "0.8", opacity: "0.8",
}} }}
variant="subtitle1" variant="subtitle2"
> >
{Math.round(item.data.CommunityRating * 10) / 10} {Math.round(item.data.CommunityRating * 10) / 10}
</Typography> </Typography>
@@ -514,12 +431,10 @@ const EpisodeTitlePage = () => {
className="hero-carousel-info-rating" className="hero-carousel-info-rating"
> >
<div <div
className="material-symbols-rounded " className="material-symbols-rounded fill"
style={{ style={{
color: color:
item.data.CriticRating > 50 ? green[400] : red[400], item.data.CriticRating > 50 ? green[400] : red[400],
fontVariationSettings:
'"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40',
}} }}
> >
{item.data.CriticRating > 50 ? "thumb_up" : "thumb_down"} {item.data.CriticRating > 50 ? "thumb_up" : "thumb_down"}
@@ -528,7 +443,7 @@ const EpisodeTitlePage = () => {
style={{ style={{
opacity: "0.8", opacity: "0.8",
}} }}
variant="subtitle1" variant="subtitle2"
> >
{item.data.CriticRating} {item.data.CriticRating}
</Typography> </Typography>
@@ -536,26 +451,27 @@ const EpisodeTitlePage = () => {
)} )}
{item.data.RunTimeTicks && ( {item.data.RunTimeTicks && (
<Typography style={{ opacity: "0.8" }} variant="subtitle1"> <Typography style={{ opacity: "0.8" }} variant="subtitle2">
{getRuntime(item.data.RunTimeTicks)} {getRuntime(item.data.RunTimeTicks)}
</Typography> </Typography>
)} )}
{item.data.RunTimeTicks && ( {item.data.RunTimeTicks && (
<Typography style={{ opacity: "0.8" }} variant="subtitle1"> <Typography style={{ opacity: "0.8" }} variant="subtitle2">
{endsAt( {endsAt(
item.data.RunTimeTicks - item.data.RunTimeTicks -
item.data.UserData.PlaybackPositionTicks, item.data.UserData.PlaybackPositionTicks,
)} )}
</Typography> </Typography>
)} )}
</Stack> <Typography variant="subtitle2" style={{ opacity: 0.8 }}>
<Typography variant="subtitle1" style={{ opacity: 0.8 }}> {item.data.Genres?.slice(0, 4).join(" / ")}
{item.data.Genres.join(", ")}
</Typography> </Typography>
</Stack>
<div className="item-hero-buttons-container flex flex-row"> </div>
<div className="item-hero-buttons-container">
<div className="flex flex-row"> <div className="flex flex-row">
<PlayButton <PlayButton
item={item.data}
itemId={item.data.Id} itemId={item.data.Id}
itemType={item.data.Type} itemType={item.data.Type}
itemUserData={item.data.UserData} itemUserData={item.data.UserData}
@@ -587,112 +503,8 @@ const EpisodeTitlePage = () => {
</div> </div>
</div> </div>
</div> </div>
</div>
<div className="item-detail"> <div className="item-detail">
<div style={{ width: "100%" }}> <ShowMoreText content={item.data.Overview ?? ""} collapsedLines={4} />
{item.data.UserData.PlaybackPositionTicks > 0 && (
<div
style={{
width: "40%",
marginBottom: "1em",
}}
>
<Typography>
{getRuntime(
item.data.RunTimeTicks -
item.data.UserData.PlaybackPositionTicks,
)}{" "}
left
</Typography>
<LinearProgress
color="white"
variant="determinate"
value={item.data.UserData.PlayedPercentage}
style={{
borderRadius: "10px",
}}
/>
</div>
)}
<Typography variant="h5" fontStyle="italic" mb={1}>
{item.data.Taglines[0] ?? ""}
</Typography>
<ShowMoreText
content={item.data.Overview ?? ""}
collapsedLines={4}
/>
{writers.length > 0 && (
<div className="hero-grid">
<Typography
variant="subtitle1"
style={{
opacity: 0.6,
}}
noWrap
>
Written by
</Typography>
<div className="hero-text-container">
{writers.map((writer, index) => (
<>
<TextLink
key={writer.Id}
variant={"subtitle1"}
location={`/person/${writer.Id}`}
>
{writer.Name}
</TextLink>
{index !== writers.length - 1 && (
<span
style={{
whiteSpace: "pre",
}}
>
,{" "}
</span>
)}
</>
))}
</div>
</div>
)}
{directors.length > 0 && (
<div className="hero-grid">
<Typography
variant="subtitle1"
style={{
opacity: 0.6,
}}
noWrap
>
Directed by
</Typography>
<div className="hero-text-container">
{directors.map((director, index) => (
<>
<TextLink
key={director.Id}
variant={"subtitle1"}
location={`/person/${director.Id}`}
>
{director.Name}
</TextLink>
{index !== directors.length - 1 && (
<span
style={{
whiteSpace: "pre",
}}
>
,{" "}
</span>
)}
</>
))}
</div>
</div>
)}
</div>
<Divider flexItem orientation="vertical" />
<div <div
style={{ style={{
width: "100%", width: "100%",
+44 -144
View File
@@ -30,9 +30,9 @@ import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api"
import { useQuery } from "@tanstack/react-query"; import { useQuery } from "@tanstack/react-query";
import heroBg from "../../assets/herobg.png";
import { Card } from "../../components/card/card"; import { Card } from "../../components/card/card";
import { CardScroller } from "../../components/cardScroller/cardScroller"; import { CardScroller } from "../../components/cardScroller/cardScroller";
import Hero from "../../components/layouts/item/hero";
import "./item.module.scss"; import "./item.module.scss";
@@ -312,9 +312,9 @@ const ItemDetail = () => {
className="scrollY padded-top flex flex-column item item-default" className="scrollY padded-top flex flex-column item item-default"
ref={pageRef} ref={pageRef}
> >
<div className="item-hero flex flex-row"> <div className="item-hero">
<div className="item-hero-backdrop-container"> <div className="item-hero-backdrop-container">
{item.data.BackdropImageTags ? ( {item.data.BackdropImageTags?.length ? (
<motion.img <motion.img
alt={item.data.Name} alt={item.data.Name}
src={api.getItemImageUrl(item.data.Id, "Backdrop", { src={api.getItemImageUrl(item.data.Id, "Backdrop", {
@@ -329,7 +329,17 @@ const ItemDetail = () => {
}} }}
/> />
) : ( ) : (
<></> <motion.img
alt={item.data.Name}
src={heroBg}
className="item-hero-backdrop"
onLoad={(e) => {
e.currentTarget.style.opacity = 1;
}}
style={{
y: parallax,
}}
/>
)} )}
</div> </div>
<div <div
@@ -361,7 +371,9 @@ const ItemDetail = () => {
/> />
</> </>
) : ( ) : (
<></> <div className="item-hero-image-icon">
{getTypeIcon(item.data.Type)}
</div>
)} )}
</div> </div>
<div className="item-hero-detail flex flex-column"> <div className="item-hero-detail flex flex-column">
@@ -380,120 +392,27 @@ const ItemDetail = () => {
className="item-hero-logo" className="item-hero-logo"
/> />
) : ( ) : (
<Typography variant="h2">{item.data.Name}</Typography> <Typography mb={2} fontWeight={200} variant="h2">
)} {item.data.Name}
<Stack direction="row" gap={1}>
{!!qualityLabel() && (
<Chip
variant="filled"
label={qualityLabel()}
sx={{
borderRadius: "8px !important",
"& .MuiChip-label": {
fontSize: "2.2em",
},
}}
/>
)}
{!!surroundSoundLabel() && (
<Chip
variant="filled"
label={
<Typography variant="caption" fontWeight={600}>
{surroundSoundLabel()}
</Typography> </Typography>
}
sx={{
borderRadius: "8px !important",
"& .MuiChip-label": {
fontSize: "2.2em",
},
}}
/>
)} )}
{!!videoTracks[0]?.VideoRangeType && (
<Chip
variant="filled"
label={
<Typography variant="caption" fontWeight={600}>
{videoTracks[0].VideoRangeType}
</Typography>
}
sx={{
borderRadius: "8px !important",
"& .MuiChip-label": {
fontSize: "2.2em",
},
}}
/>
)}
{!!atmosLabel() && (
<Chip
variant="filled"
label={
<Typography
variant="caption"
fontWeight={600}
style={{
display: "flex",
alignItems: "center",
justifyContent: "center",
gap: "0.5em",
}}
>
<img
alt="Dolby"
src={dolbyIcon}
style={{
height: "1.6em",
}}
/>
{atmosLabel()}
</Typography>
}
sx={{
borderRadius: "8px !important",
"& .MuiChip-label": {
fontSize: "2.2em",
},
}}
/>
)}
{!!subtitleTracks.length > 0 && (
<Chip
variant="filled"
label={
// <Typography
// variant="caption"
// fontWeight={600}
// fontFamily="JetBrains Mono Variable"
// >
// CC
// </Typography>
<span className="material-symbols-rounded fill">
subtitles
</span>
}
sx={{
borderRadius: "8px !important",
"& .MuiChip-label": {
fontSize: "2.2em",
},
}}
/>
)}
</Stack>
<Stack <Stack
direction="row" direction="row"
gap={2} gap={2}
justifyItems="flex-start" justifyItems="flex-start"
alignItems="center" alignItems="center"
> >
<Typography style={{ opacity: "0.8" }} variant="subtitle1"> {item.data.PremiereDate && (
<Typography style={{ opacity: "0.8" }} variant="subtitle2">
{item.data.ProductionYear ?? ""} {item.data.ProductionYear ?? ""}
</Typography> </Typography>
)}
{item.data.OfficialRating && ( {item.data.OfficialRating && (
<Chip variant="filled" label={item.data.OfficialRating} /> <Chip
variant="filled"
size="small"
label={item.data.OfficialRating}
/>
)} )}
{item.data.CommunityRating && ( {item.data.CommunityRating && (
@@ -518,7 +437,7 @@ const ItemDetail = () => {
style={{ style={{
opacity: "0.8", opacity: "0.8",
}} }}
variant="subtitle1" variant="subtitle2"
> >
{Math.round(item.data.CommunityRating * 10) / 10} {Math.round(item.data.CommunityRating * 10) / 10}
</Typography> </Typography>
@@ -546,7 +465,7 @@ const ItemDetail = () => {
style={{ style={{
opacity: "0.8", opacity: "0.8",
}} }}
variant="subtitle1" variant="subtitle2"
> >
{item.data.CriticRating} {item.data.CriticRating}
</Typography> </Typography>
@@ -554,26 +473,32 @@ const ItemDetail = () => {
)} )}
{item.data.RunTimeTicks && ( {item.data.RunTimeTicks && (
<Typography style={{ opacity: "0.8" }} variant="subtitle1"> <Typography style={{ opacity: "0.8" }} variant="subtitle2">
{getRuntime(item.data.RunTimeTicks)} {getRuntime(item.data.RunTimeTicks)}
</Typography> </Typography>
)} )}
{item.data.RunTimeTicks && ( {item.data.RunTimeTicks && (
<Typography style={{ opacity: "0.8" }} variant="subtitle1"> <Typography style={{ opacity: "0.8" }} variant="subtitle2">
{endsAt( {endsAt(
item.data.RunTimeTicks - item.data.RunTimeTicks -
item.data.UserData.PlaybackPositionTicks, item.data.UserData.PlaybackPositionTicks,
)} )}
</Typography> </Typography>
)} )}
</Stack> <Typography variant="subtitle2" style={{ opacity: 0.8 }}>
<Typography variant="subtitle1" style={{ opacity: 0.8 }}> {item.data.Genres?.slice(0, 4).join(" / ")}
{item.data.Genres.join(", ")}
</Typography> </Typography>
</Stack>
</div> </div>
<div className="item-hero-buttons-container flex flex-row"> <div className="item-hero-buttons-container">
<div className="flex flex-row"> <div
className="flex flex-row"
style={{
width: "100%",
}}
>
<PlayButton <PlayButton
item={item.data}
itemId={item.data.Id} itemId={item.data.Id}
itemType={item.data.Type} itemType={item.data.Type}
itemUserData={item.data.UserData} itemUserData={item.data.UserData}
@@ -581,8 +506,8 @@ const ItemDetail = () => {
currentAudioTrack={selectedAudioTrack} currentAudioTrack={selectedAudioTrack}
currentSubTrack={selectedSubtitleTrack} currentSubTrack={selectedSubtitleTrack}
userId={user.data.Id} userId={user.data.Id}
sx={{ buttonProps={{
background: "hsl(195.56deg 29.03% 18.24%) !important", fullWidth: true,
}} }}
/> />
</div> </div>
@@ -610,36 +535,11 @@ const ItemDetail = () => {
</div> </div>
<div className="item-detail"> <div className="item-detail">
<div style={{ width: "100%" }}> <div style={{ width: "100%" }}>
{item.data.UserData.PlaybackPositionTicks > 0 && (
<div
style={{
width: "40%",
marginBottom: "1em",
}}
>
<Typography>
{getRuntime(
item.data.RunTimeTicks -
item.data.UserData.PlaybackPositionTicks,
)}{" "}
left
</Typography>
<LinearProgress
color="white"
variant="determinate"
value={item.data.UserData.PlayedPercentage}
style={{
borderRadius: "10px",
}}
/>
</div>
)}
<ShowMoreText <ShowMoreText
content={item.data.Overview ?? ""} content={item.data.Overview ?? ""}
collapsedLines={4} collapsedLines={4}
/> />
</div> </div>
<Divider flexItem orientation="vertical" />
<div <div
style={{ style={{
width: "100%", width: "100%",
+33 -9
View File
@@ -1,11 +1,17 @@
$cardWidth: 18%;
.item-default.item { .item-default.item {
gap: 1em; gap: 1em;
.item-hero { .item-hero {
height: 50vh; height: 60vh;
gap: 2em; gap: 2em;
row-gap: 1.2em;
position: relative; position: relative;
align-items: flex-end; align-items: flex-end;
margin-bottom: 5vh; margin-bottom: 1em;
display: grid;
grid-template-columns: $cardWidth 1fr;
grid-template-rows: 1fr auto;
&-image { &-image {
opacity: 0; opacity: 0;
width: 100%; width: 100%;
@@ -20,7 +26,7 @@
flex-grow: 1; flex-grow: 1;
flex-shrink: 0; flex-shrink: 0;
position: relative; position: relative;
width: 18% !important; width: 100%;
} }
&-blurhash { &-blurhash {
position: absolute !important; position: absolute !important;
@@ -28,18 +34,29 @@
height: 100% !important; height: 100% !important;
z-index: -1; z-index: -1;
} }
&-icon {
background: linear-gradient(45deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.15));
height: 100%;
display: flex;
align-items: center;
justify-content: center;
.material-symbols-rounded{
font-size: 4em;
}
}
} }
&-logo { &-logo {
max-width: 42rem; max-width: 34rem;
max-height: 10rem; max-height: 10rem;
opacity: 0; opacity: 0;
transition: opacity $transition-time-default; transition: opacity $transition-time-default;
object-position: bottom; object-position: bottom;
margin-bottom: 2em;
} }
&-detail { &-detail {
width: 100%; width: 100%;
align-items: flex-start; align-items: flex-start;
gap: 1em; gap: 0.2em;
justify-content: end; justify-content: end;
} }
&-buttons { &-buttons {
@@ -47,6 +64,10 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;
grid-column: 1/3;
display: grid;
grid-template-columns: inherit;
gap: 2em;
} }
} }
&-backdrop { &-backdrop {
@@ -62,7 +83,7 @@
top: -4.4em; top: -4.4em;
left: -$page-margin; left: -$page-margin;
width: 100vw; width: 100vw;
height: calc(60vh + 4.4em); height: calc(54vh + 4.4em);
z-index: -1; z-index: -1;
mask-image: linear-gradient(to top, transparent, black); mask-image: linear-gradient(to top, transparent, black);
-webkit-mask-image: linear-gradient( -webkit-mask-image: linear-gradient(
@@ -72,14 +93,17 @@
); );
} }
} }
& .play-button {
width: 100% !important;
}
} }
.item-detail { .item-detail {
display: grid; display: grid;
grid-template-columns: 1fr 5px 35%; grid-template-columns: 1fr 35%;
justify-items: center; justify-items: center;
align-items: start; align-items: start;
gap: 1em; gap: 3em;
&-cast { &-cast {
&-container { &-container {
@@ -155,7 +179,7 @@
box-sizing: border-box; box-sizing: border-box;
&-container{ &-container{
box-sizing: content-box; box-sizing: content-box;
border: 1.2px solid rgb(255 255 255 / 0.1); box-shadow: 0px 10px 20px -10px rgb(0 0 0 / 0.5) !important;
} }
} }
} }
+9 -8
View File
@@ -285,7 +285,7 @@ const PersonTitlePage = () => {
className="scrollY padded-top item item-person flex flex-column" className="scrollY padded-top item item-person flex flex-column"
ref={pageRef} ref={pageRef}
> >
<div className="item-hero flex flex-row"> <div className="item-hero">
<div className="item-hero-backdrop-container"> <div className="item-hero-backdrop-container">
<motion.img <motion.img
alt={item.data.Name} alt={item.data.Name}
@@ -332,7 +332,9 @@ const PersonTitlePage = () => {
)} )}
</div> </div>
<div className="item-hero-detail flex flex-column"> <div className="item-hero-detail flex flex-column">
<Typography variant="h2">{item.data.Name}</Typography> <Typography variant="h2" fontWeight={200} mb={2}>
{item.data.Name}
</Typography>
<LikeButton <LikeButton
itemName={item.data.Name} itemName={item.data.Name}
@@ -362,7 +364,6 @@ const PersonTitlePage = () => {
))} ))}
</div> </div>
</div> </div>
<Divider flexItem orientation="vertical" />
<div <div
style={{ style={{
width: "100%", width: "100%",
@@ -370,18 +371,18 @@ const PersonTitlePage = () => {
> >
{item.data.PremiereDate && ( {item.data.PremiereDate && (
<> <>
<Typography variant="h5">Born</Typography> <Typography variant="h6">Birth</Typography>
<Typography sx={{ opacity: 0.8 }}> <Typography variant="subtitle1" sx={{ opacity: 0.8 }}>
{new Date(item.data.PremiereDate).toDateString()} {new Date(item.data.PremiereDate).toDateString()}
</Typography> </Typography>
</> </>
)} )}
{item.data.EndDate && ( {item.data.EndDate && (
<> <>
<Typography variant="h5" mt={2}> <Typography variant="h6" mt={2}>
Death Death
</Typography> </Typography>
<Typography sx={{ opacity: 0.8 }}> <Typography variant="subtitle2" sx={{ opacity: 0.8 }}>
{new Date(item.data.EndDate).toDateString()} {new Date(item.data.EndDate).toDateString()}
</Typography> </Typography>
</> </>
@@ -424,7 +425,7 @@ const PersonTitlePage = () => {
tab.title === "Movies" || tab.title === "Movies" ||
tab.title === "TV Shows" || tab.title === "TV Shows" ||
tab.title === "Books" tab.title === "Books"
? "col-8" ? "col-7"
: "col-4" : "col-4"
}`} }`}
key={tab.queryKey} key={tab.queryKey}
+34 -10
View File
@@ -1,4 +1,4 @@
$cardWidth: 18%;
.item-detail-person { .item-detail-person {
&-container { &-container {
position: relative; position: relative;
@@ -13,8 +13,8 @@
} }
} }
.col-8 { .col-7 {
grid-template-columns: repeat(8, minmax(0, 1fr)); grid-template-columns: repeat(7, minmax(0, 1fr));
} }
.col-4 { .col-4 {
grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-columns: repeat(4, minmax(0, 1fr));
@@ -25,8 +25,13 @@
.item-hero { .item-hero {
height: 50vh; height: 50vh;
gap: 2em; gap: 2em;
row-gap: 1.2em;
position: relative; position: relative;
align-items: center; align-items: flex-end;
margin-bottom: 1em;
display: grid;
grid-template-columns: $cardWidth 1fr;
grid-template-rows: 1fr auto;
&-image { &-image {
opacity: 0; opacity: 0;
width: 100%; width: 100%;
@@ -41,7 +46,7 @@
flex-grow: 1; flex-grow: 1;
flex-shrink: 0; flex-shrink: 0;
position: relative; position: relative;
width: 18% !important; width: 100%;
} }
&-blurhash { &-blurhash {
position: absolute !important; position: absolute !important;
@@ -49,18 +54,29 @@
height: 100% !important; height: 100% !important;
z-index: -1; z-index: -1;
} }
&-icon {
background: linear-gradient(45deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.15));
height: 100%;
display: flex;
align-items: center;
justify-content: center;
.material-symbols-rounded{
font-size: 4em;
}
}
} }
&-logo { &-logo {
max-width: 42rem; max-width: 34rem;
max-height: 10rem; max-height: 10rem;
opacity: 0; opacity: 0;
transition: opacity $transition-time-default; transition: opacity $transition-time-default;
object-position: bottom; object-position: bottom;
margin-bottom: 2em;
} }
&-detail { &-detail {
width: 100%; width: 100%;
align-items: flex-start; align-items: flex-start;
gap: 1em; gap: 0.2em;
justify-content: end; justify-content: end;
} }
&-buttons { &-buttons {
@@ -68,6 +84,10 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;
grid-column: 1/3;
display: grid;
grid-template-columns: inherit;
gap: 2em;
} }
} }
&-backdrop { &-backdrop {
@@ -83,7 +103,7 @@
top: -4.4em; top: -4.4em;
left: -$page-margin; left: -$page-margin;
width: 100vw; width: 100vw;
height: calc(50vh + 4.4em); height: calc(44vh + 4.4em);
z-index: -1; z-index: -1;
mask-image: linear-gradient(to top, transparent, black); mask-image: linear-gradient(to top, transparent, black);
-webkit-mask-image: linear-gradient( -webkit-mask-image: linear-gradient(
@@ -93,14 +113,18 @@
); );
} }
} }
& .play-button {
width: 100% !important;
} }
}
.item-detail { .item-detail {
display: grid; display: grid;
grid-template-columns: 1fr 5px 35%; grid-template-columns: 1fr 35%;
justify-items: center; justify-items: center;
align-items: start; align-items: start;
gap: 1em; gap: 3em;
&-cast { &-cast {
&-container { &-container {
@@ -60,12 +60,16 @@ video {
height: 100vh; height: 100vh;
top: 0; top: 0;
left: 0; left: 0;
cursor: none;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-self: stretch; align-self: stretch;
justify-content: space-between; justify-content: space-between;
padding: 1em 2em; padding: 1em 2em;
background: linear-gradient(to top, rgb(0 0 0 / 0.7) 5vh, transparent 26vh 90vh, rgb(0 0 0 / 0.7)); background: linear-gradient(to top, rgb(0 0 0 / 0.7) 5vh, transparent 26vh 90vh, rgb(0 0 0 / 0.7));
&.hovering{
cursor: default;
}
&-controls{ &-controls{
&-progress{ &-progress{
display: flex; display: flex;
+39 -19
View File
@@ -1156,7 +1156,11 @@ const VideoPlayer = () => {
)} )}
</AnimatePresence> </AnimatePresence>
<motion.div <motion.div
className="video-player-osd" className={
hoveringOsd || !playing || isSeeking
? "video-player-osd hovering"
: "video-player-osd"
}
onMouseMove={handleShowOsd} onMouseMove={handleShowOsd}
initial={{ initial={{
opacity: 0, opacity: 0,
@@ -1305,40 +1309,56 @@ const VideoPlayer = () => {
</Typography> </Typography>
</div> </div>
<div className="video-player-osd-controls-buttons"> <div className="video-player-osd-controls-buttons">
<motion.div style={{ <motion.div
style={{
width: "13em", width: "13em",
padding: "0.5em 1.5em", padding: "0.5em 1.5em",
paddingLeft: "0.8em", paddingLeft: "0.8em",
gap:"0.4em", gap: "0.4em",
background: "black", background: "black",
borderRadius: "100px", borderRadius: "100px",
display: 'grid', display: "grid",
justifyContent: "center", justifyContent: "center",
alignItems: "center", alignItems: "center",
gridTemplateColumns: "2em 1fr", gridTemplateColumns: "2em 1fr",
opacity:0, opacity: 0,
}} }}
animate={{ animate={{
opacity: showVolumeControl ? 1:0 opacity: showVolumeControl ? 1 : 0,
}} }}
whileHover={{ whileHover={{
opacity:1 opacity: 1,
}} }}
onMouseLeave={()=> setShowVolumeControl(false)} onMouseLeave={() => setShowVolumeControl(false)}
> >
<Typography textAlign="center">{muted ? 0 : Math.round(volume*100)}</Typography> <Typography textAlign="center">
<Slider step={0.01} max={1} size="small" value={muted ? 0 : volume} onChange={(e, newVal) => { {muted ? 0 : Math.round(volume * 100)}
</Typography>
<Slider
step={0.01}
max={1}
size="small"
value={muted ? 0 : volume}
onChange={(e, newVal) => {
setVolume(newVal); setVolume(newVal);
if (newVal === 0) setMuted(true) if (newVal === 0) setMuted(true);
else setMuted(false) else setMuted(false);
}} /> }}
/>
</motion.div> </motion.div>
<IconButton onClick={() => setMuted((state) => !state)} onMouseMoveCapture={() => { <IconButton
setShowVolumeControl(true) onClick={() => setMuted((state) => !state)}
}}> onMouseMoveCapture={() => {
<span className="material-symbols-rounded">{muted ? "volume_off" : setShowVolumeControl(true);
volume < 0.4 ? "volume_down" : }}
"volume_up"}</span> >
<span className="material-symbols-rounded">
{muted
? "volume_off"
: volume < 0.4
? "volume_down"
: "volume_up"}
</span>
</IconButton> </IconButton>
<IconButton onClick={() => setShowSubtitles((state) => !state)}> <IconButton onClick={() => setShowSubtitles((state) => !state)}>
<span className={"material-symbols-rounded"}> <span className={"material-symbols-rounded"}>
+56 -44
View File
@@ -359,10 +359,9 @@ const SeriesTitlePage = () => {
className="scrollY padded-top flex flex-column item item-series" className="scrollY padded-top flex flex-column item item-series"
ref={pageRef} ref={pageRef}
> >
<div className="item-hero flex flex-row"> <div className="item-hero">
<div className="item-hero-backdrop-container"> <div className="item-hero-backdrop-container">
<AnimatePresence mode="wait"> <AnimatePresence mode="wait">
{item.data.BackdropImageTags ? ( {item.data.BackdropImageTags ? (
<motion.img <motion.img
key={currentSeasonItem.dataUpdatedAt} key={currentSeasonItem.dataUpdatedAt}
@@ -370,19 +369,19 @@ const SeriesTitlePage = () => {
src={backdropImage} src={backdropImage}
className="item-hero-backdrop" className="item-hero-backdrop"
initial={{ initial={{
opacity: 0 opacity: 0,
}} }}
onLoad={() => { onLoad={() => {
setBackdropImageLoaded(true) setBackdropImageLoaded(true);
}} }}
animate={{ animate={{
opacity: backdropImageLoaded ? 1 : 0 opacity: backdropImageLoaded ? 1 : 0,
}} }}
exit={{ exit={{
opacity: 0 opacity: 0,
}} }}
transition={{ transition={{
duration: 0.2 duration: 0.2,
}} }}
style={{ style={{
y: parallax, y: parallax,
@@ -425,7 +424,7 @@ const SeriesTitlePage = () => {
<></> <></>
)} )}
</div> </div>
<div className="item-hero-detail flex flex-column"> <div className="item-hero-detail">
{Object.keys(item.data.ImageTags).includes("Logo") ? ( {Object.keys(item.data.ImageTags).includes("Logo") ? (
<img <img
alt={item.data.Name} alt={item.data.Name}
@@ -440,7 +439,9 @@ const SeriesTitlePage = () => {
className="item-hero-logo" className="item-hero-logo"
/> />
) : ( ) : (
<Typography variant="h2">{item.data.Name}</Typography> <Typography variant="h2" mb={2} fontWeight={200}>
{item.data.Name}
</Typography>
)} )}
<Stack <Stack
direction="row" direction="row"
@@ -448,15 +449,28 @@ const SeriesTitlePage = () => {
justifyItems="flex-start" justifyItems="flex-start"
alignItems="center" alignItems="center"
> >
<Typography style={{ opacity: "0.8" }} variant="subtitle1"> <Typography style={{ opacity: "0.8" }} variant="subtitle2">
{item.data.ProductionYear ?? ""} {item.data.ProductionYear ?? ""}
{item.data.Status === "Continuing" {item.data.Status === "Continuing"
? " - Present" ? " - Present"
: item.data.EndDate && : item.data.EndDate &&
` - ${new Date(item.data.EndDate).getFullYear()}`} ` - ${new Date(item.data.EndDate).getFullYear()}`}
</Typography> </Typography>
{seasons.data?.TotalRecordCount && (
<Typography style={{ opacity: "0.8" }} variant="subtitle2">
{seasons.data.TotalRecordCount > 1
? `${seasons.data.TotalRecordCount} Seasons`
: `${seasons.data.TotalRecordCount} Season`}
</Typography>
)}
{item.data.OfficialRating && ( {item.data.OfficialRating && (
<Chip variant="filled" label={item.data.OfficialRating} /> <Chip
variant="filled"
size="small"
label={item.data.OfficialRating}
/>
)} )}
{item.data.CommunityRating && ( {item.data.CommunityRating && (
@@ -469,12 +483,10 @@ const SeriesTitlePage = () => {
className="hero-carousel-info-rating" className="hero-carousel-info-rating"
> >
<div <div
className="material-symbols-rounded " className="material-symbols-rounded fill"
style={{ style={{
// fontSize: "2.2em", // fontSize: "2.2em",
color: yellow[400], color: yellow[400],
fontVariationSettings:
'"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40',
}} }}
> >
star star
@@ -483,7 +495,7 @@ const SeriesTitlePage = () => {
style={{ style={{
opacity: "0.8", opacity: "0.8",
}} }}
variant="subtitle1" variant="subtitle2"
> >
{Math.round(item.data.CommunityRating * 10) / 10} {Math.round(item.data.CommunityRating * 10) / 10}
</Typography> </Typography>
@@ -499,12 +511,10 @@ const SeriesTitlePage = () => {
className="hero-carousel-info-rating" className="hero-carousel-info-rating"
> >
<div <div
className="material-symbols-rounded " className="material-symbols-rounded fill"
style={{ style={{
color: color:
item.data.CriticRating > 50 ? green[400] : red[400], item.data.CriticRating > 50 ? green[400] : red[400],
fontVariationSettings:
'"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40',
}} }}
> >
{item.data.CriticRating > 50 ? "thumb_up" : "thumb_down"} {item.data.CriticRating > 50 ? "thumb_up" : "thumb_down"}
@@ -513,41 +523,39 @@ const SeriesTitlePage = () => {
style={{ style={{
opacity: "0.8", opacity: "0.8",
}} }}
variant="subtitle1" variant="subtitle2"
> >
{item.data.CriticRating} {item.data.CriticRating}
</Typography> </Typography>
</div> </div>
)} )}
{seasons.data?.TotalRecordCount && (
<Typography style={{ opacity: "0.8" }} variant="subtitle1">
{seasons.data.TotalRecordCount > 1
? `${seasons.data.TotalRecordCount} Seasons`
: `${seasons.data.TotalRecordCount} Season`}
</Typography>
)}
{item.data.RunTimeTicks && ( {item.data.RunTimeTicks && (
<Typography style={{ opacity: "0.8" }} variant="subtitle1"> <Typography style={{ opacity: "0.8" }} variant="subtitle2">
{getRuntime(item.data.RunTimeTicks)} {getRuntime(item.data.RunTimeTicks)}
</Typography> </Typography>
)} )}
{item.data.RunTimeTicks && ( {item.data.RunTimeTicks && (
<Typography style={{ opacity: "0.8" }} variant="subtitle1"> <Typography style={{ opacity: "0.8" }} variant="subtitle2">
{endsAt( {endsAt(
item.data.RunTimeTicks - item.data.RunTimeTicks -
item.data.UserData.PlaybackPositionTicks, item.data.UserData.PlaybackPositionTicks,
)} )}
</Typography> </Typography>
)} )}
</Stack> <Typography variant="subtitle2" style={{ opacity: 0.8 }}>
<Typography variant="subtitle1" style={{ opacity: 0.8 }}> {item.data.Genres?.slice(0, 5).join(" / ")}
{item.data.Genres.join(", ")}
</Typography> </Typography>
</Stack>
</div>
<div className="item-hero-buttons-container flex flex-row"> <div className="item-hero-buttons-container">
<div className="flex flex-row"> <div
className="flex flex-row"
style={{
width: "100%",
}}
>
<PlayButton <PlayButton
itemId={item.data.Id} itemId={item.data.Id}
item={item.data} item={item.data}
@@ -557,6 +565,9 @@ const SeriesTitlePage = () => {
currentVideoTrack={0} currentVideoTrack={0}
currentSubTrack={0} currentSubTrack={0}
userId={user.data.Id} userId={user.data.Id}
buttonProps={{
fullWidth: true,
}}
/> />
</div> </div>
<div className="flex flex-row" style={{ gap: "1em" }}> <div className="flex flex-row" style={{ gap: "1em" }}>
@@ -581,7 +592,6 @@ const SeriesTitlePage = () => {
</div> </div>
</div> </div>
</div> </div>
</div>
<div className="item-detail"> <div className="item-detail">
<div style={{ width: "100%" }}> <div style={{ width: "100%" }}>
{item.data.UserData.PlaybackPositionTicks > 0 && ( {item.data.UserData.PlaybackPositionTicks > 0 && (
@@ -698,7 +708,6 @@ const SeriesTitlePage = () => {
))} ))}
</div> </div>
</div> </div>
<Divider flexItem orientation="vertical" />
<div <div
style={{ style={{
width: "100%", width: "100%",
@@ -1010,9 +1019,10 @@ const SeriesTitlePage = () => {
</div> </div>
<Divider /> <Divider />
<div className="item-detail-episode-container"> <div className="item-detail-episode-container">
{episodes.isPending {episodes.isPending ? (
? <EpisodeSkeleton /> <EpisodeSkeleton />
: episodes.data.Items.map((episode, index) => { ) : (
episodes.data.Items.map((episode, index) => {
return ( return (
<> <>
<motion.div <motion.div
@@ -1164,14 +1174,15 @@ const SeriesTitlePage = () => {
</motion.div> </motion.div>
</> </>
); );
})} })
)}
</div> </div>
</div> </div>
)} )}
{specialFeatures.isSuccess && specialFeatures.data.length > 0 && ( {specialFeatures.isSuccess && specialFeatures.data.length > 0 && (
<CardScroller <CardScroller
title="Special Features" title="Special Features"
displayCards={8} displayCards={7}
disableDecoration disableDecoration
> >
{specialFeatures.data.map((special) => { {specialFeatures.data.map((special) => {
@@ -1192,7 +1203,7 @@ const SeriesTitlePage = () => {
] ]
} }
userId={user.data.Id} userId={user.data.Id}
onClick={() => { }} onClick={() => {}}
/> />
); );
})} })}
@@ -1201,7 +1212,7 @@ const SeriesTitlePage = () => {
{similarItems.data.TotalRecordCount > 0 && ( {similarItems.data.TotalRecordCount > 0 && (
<CardScroller <CardScroller
title="You might also like" title="You might also like"
displayCards={8} displayCards={7}
disableDecoration disableDecoration
> >
{similarItems.data.Items.map((similar) => { {similarItems.data.Items.map((similar) => {
@@ -1220,7 +1231,8 @@ const SeriesTitlePage = () => {
similar.Type === BaseItemKind.Episode similar.Type === BaseItemKind.Episode
? `S${similar.ParentIndexNumber}:E${similar.IndexNumber} - ${similar.Name}` ? `S${similar.ParentIndexNumber}:E${similar.IndexNumber} - ${similar.Name}`
: similar.Type === BaseItemKind.Series : similar.Type === BaseItemKind.Series
? `${similar.ProductionYear} - ${similar.EndDate ? `${similar.ProductionYear} - ${
similar.EndDate
? new Date(similar.EndDate).toLocaleString([], { ? new Date(similar.EndDate).toLocaleString([], {
year: "numeric", year: "numeric",
}) })
+24 -10
View File
@@ -1,10 +1,17 @@
$cardWidth: 18%;
.item-series.item { .item-series.item {
gap: 1em; gap: 1em;
.item-hero { .item-hero {
height: 50vh; height: 60vh;
gap: 2em; gap: 2em;
row-gap: 1.2em;
position: relative; position: relative;
align-items: center; align-items: flex-end;
margin-bottom: 1em;
display: grid;
grid-template-columns: $cardWidth 1fr;
grid-template-rows: 1fr auto;
&-image { &-image {
opacity: 0; opacity: 0;
width: 100%; width: 100%;
@@ -15,12 +22,11 @@
max-height: 100%; max-height: 100%;
overflow: hidden; overflow: hidden;
border-radius: $border-radius-default; border-radius: $border-radius-default;
width: fit-content;
box-shadow: $shadow-card; box-shadow: $shadow-card;
flex-grow: 1; flex-grow: 1;
flex-shrink: 0; flex-shrink: 0;
position: relative; position: relative;
width: 18% !important; width: 100%;
} }
&-blurhash { &-blurhash {
position: absolute !important; position: absolute !important;
@@ -30,16 +36,17 @@
} }
} }
&-logo { &-logo {
max-width: 42rem; max-width: 34rem;
max-height: 10rem; max-height: 10rem;
opacity: 0; opacity: 0;
transition: opacity $transition-time-default; transition: opacity $transition-time-default;
object-position: bottom; object-position: bottom;
margin-bottom: 2em;
} }
&-detail { &-detail {
width: 100%; width: 100%;
align-items: flex-start; align-items: flex-start;
gap: 1em; gap: 0.2em;
justify-content: end; justify-content: end;
} }
&-buttons { &-buttons {
@@ -47,6 +54,10 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;
grid-column: 1/3;
display: grid;
grid-template-columns: inherit;
gap: 2em;
} }
} }
&-backdrop { &-backdrop {
@@ -62,7 +73,7 @@
top: -4.4em; top: -4.4em;
left: -$page-margin; left: -$page-margin;
width: 100vw; width: 100vw;
height: calc(50vh + 4.4em); height: calc(54vh + 4.4em);
z-index: -1; z-index: -1;
mask-image: linear-gradient(to top, transparent, black); mask-image: linear-gradient(to top, transparent, black);
-webkit-mask-image: linear-gradient( -webkit-mask-image: linear-gradient(
@@ -72,14 +83,17 @@
); );
} }
} }
& .play-button {
width: 100% !important;
}
} }
.item-detail { .item-detail {
display: grid; display: grid;
grid-template-columns: 1fr 5px 35%; grid-template-columns: 1fr 35%;
justify-items: center; justify-items: center;
align-items: start; align-items: start;
gap: 1em; gap: 3em;
&-nextUp { &-nextUp {
max-width: 23em; max-width: 23em;
@@ -194,7 +208,7 @@
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 0;
border: 0.85em solid #00c853; border: 0.65em solid #00c853;
border-bottom-color: transparent; border-bottom-color: transparent;
border-left-color: transparent; border-left-color: transparent;
opacity: 0; opacity: 0;
+4
View File
@@ -285,3 +285,7 @@ h1 {
@function neg($var) { @function neg($var) {
@return $var * -1; @return $var * -1;
} }
.fullWidth {
width: 100%;
}
+1 -1
View File
@@ -21,7 +21,7 @@ $clr-gradient-dark: linear-gradient(
$clr-secondary-dark $clr-secondary-dark
); );
$border-radius-default: 6px; $border-radius-default: 8px;
$border-radius_04: 4px; $border-radius_04: 4px;
$transition-time-default: 250ms; $transition-time-default: 250ms;
+4 -4
View File
@@ -6,7 +6,8 @@ import {
clrBackgroundLight, clrBackgroundLight,
clrSecondaryDefault, clrSecondaryDefault,
} from "./palette.module.scss"; } from "./palette.module.scss";
const { palette } = createTheme({});
const { augmentColor } = palette;
export const theme = createTheme({ export const theme = createTheme({
palette: { palette: {
primary: { primary: {
@@ -24,9 +25,8 @@ export const theme = createTheme({
default: clrBackgroundDefault, default: clrBackgroundDefault,
paper: clrBackgroundDark, paper: clrBackgroundDark,
}, },
white: { white: augmentColor({ color: { main: "#ffffff" } }),
main: "#ffffff", black: augmentColor({ color: { main: "#000" } }),
},
mode: "dark", mode: "dark",
}, },
typography: { typography: {
+18
View File
@@ -159,6 +159,24 @@ export const playItem = (
availableSubtitleTracks, availableSubtitleTracks,
mediaSourceId mediaSourceId
) => { ) => {
console.log({
itemName,
episodeTitle,
mediaSource: {
videoTrack,
audioTrack,
subtitleTrack,
container,
availableSubtitleTracks,
id: mediaSourceId,
},
enableSubtitle,
hlsStream,
userId,
startPosition,
itemDuration,
item,
});
usePlaybackStore.setState({ usePlaybackStore.setState({
itemName, itemName,
episodeTitle, episodeTitle,