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
+896 -876

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,
+73 -43
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,56 +295,85 @@ const PlayButton = ({
); );
} }
return ( return (
<Button <div
className={className} className="play-button"
variant="contained" style={{
onClick={handleClick} width: "auto",
startIcon={
<div
className="material-symbols-rounded fill"
style={{
fontSize: "2em",
}}
>
play_arrow
</div>
}
{...buttonProps}
sx={{
position: "relative", position: "relative",
overflow: "hidden",
}} }}
size={size}
> >
<LinearProgress <Button
variant="determinate" className={className ?? "play-button"}
value={ variant="contained"
100 > itemUserData.PlayedPercentage > 0 onClick={handleClick}
? itemUserData.PlayedPercentage startIcon={
: 0 <div
className="material-symbols-rounded fill"
style={{
zIndex: 1,
fontSize: "2em",
}}
>
play_arrow
</div>
} }
{...buttonProps}
sx={{ sx={{
position: "absolute", position: "relative",
top: 0, overflow: "hidden",
left: 0,
right: 0,
bottom: 0,
height: "100%",
background: "transparent",
opacity: 0.2,
zIndex: 0,
}} }}
color="white" color="white"
/> size={size}
{itemUserData.PlaybackPositionTicks > 0 >
? "Continue Watching" {itemUserData.PlaybackPositionTicks > 0
: item?.Type === "MusicAlbum" || ? "Continue Watching"
item?.Type === "Audio" || : item?.Type === "MusicAlbum" ||
item?.Type === "AudioBook" || item?.Type === "Audio" ||
item?.Type === "Playlist" item?.Type === "AudioBook" ||
? "Play Now" item?.Type === "Playlist" ||
: "Watch Now"} audio
</Button> ? "Play Now"
: "Watch Now"}
<LinearProgress
variant="determinate"
value={
100 > itemUserData.PlayedPercentage > 0
? itemUserData.PlayedPercentage
: 0
}
sx={{
position: "absolute",
top: 0,
left: 0,
right: 0,
bottom: 0,
height: "100%",
background: "transparent",
opacity: 0.2,
zIndex: 0,
mixBlendMode: "difference",
}}
color="white"
/>
</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",
+153 -60
View File
@@ -2,67 +2,64 @@
$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;
mask-image: linear-gradient(to top, transparent, black 1.2em); mask-image: linear-gradient(to top, transparent, black 1.2em);
-webkit-mask-image: linear-gradient(to top, transparent, black 1.2em); -webkit-mask-image: linear-gradient(to top, transparent, black 1.2em);
&-title { &-title {
position: sticky; position: sticky;
top: 0; top: 0;
background: $clr-background-dark; background: $clr-background-dark;
padding: 0.35em; padding: 0.35em;
border-radius: 10px; border-radius: 10px;
z-index: 1; z-index: 1;
}
&-container {
display: flex;
flex-direction: column;
gap: 1em;
}
&-grid {
display: grid;
gap: 1em;
margin-bottom: 1em;
grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
&-card {
display: grid;
grid-template-columns: 6em 1fr;
gap: 0.5em;
align-items: center;
color: white !important;
text-decoration: none;
padding: 0.5em;
background: rgb(255 255 255 / 0);
transition: background $transition-time-default;
border-radius: $border-radius-default;
&:hover {
background: rgb(255 255 255 / 0.1);
} }
&-container { &-image,
&-icon {
width: 6em;
height: 6em;
object-fit: cover;
border-radius: 100%;
box-shadow: $shadow-card-image;
}
&-icon {
display: flex; display: flex;
flex-direction: column;
gap: 1em;
}
&-grid {
display: grid;
gap: 1em;
margin-bottom: 1em;
grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
&-card {
display: grid;
grid-template-columns: 6em 1fr;
gap: 0.5em;
align-items: center; align-items: center;
color: white !important; justify-content: center;
text-decoration: none; font-size: 1em;
padding: 0.5em; background: rgb(255 255 255 / 0.1);
background: rgb(255 255 255 / 0); .material-symbols-rounded {
transition: background $transition-time-default; font-size: 3em;
border-radius: $border-radius-default;
&:hover {
background: rgb(255 255 255 / 0.1);
}
&-image,
&-icon {
width: 6em;
height: 6em;
object-fit: cover;
border-radius: 100%;
box-shadow: $shadow-card-image;
}
&-icon {
display: flex;
align-items: center;
justify-content: center;
font-size: 1em;
background: rgb(255 255 255 / 0.1);
.material-symbols-rounded {
font-size: 3em;
}
} }
} }
} }
}
} }
.item-detail-album { .item-detail-album {
&-track { &-track {
@@ -107,6 +104,8 @@ $border-radius: 20px;
} }
} }
$cardWidth: 22%;
.item-album.item { .item-album.item {
gap: 1em; gap: 1em;
.item-hero { .item-hero {
@@ -173,20 +172,114 @@ $border-radius: 20px;
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(
to top, to top,
transparent, transparent,
black black
); );
} }
} }
} }
.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;
+79 -59
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,77 +276,87 @@ 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>
<Chip
label={item.data.AlbumArtist}
icon={
<span
className="material-symbols-rounded"
style={{
padding: "0.2em",
fontVariationSettings:
'"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40',
}}
>
artist
</span>
}
size="large"
sx={{
"& .MuiChip-label": {
marginLeft: 0.5,
},
}}
/>
<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"> <Chip
{item.data.ProductionYear ?? ""} size="small"
</Typography> label={item.data.AlbumArtist}
<Typography style={{ opacity: "0.8" }} variant="subtitle1"> icon={
<span
className="material-symbols-rounded"
style={{
padding: "0.2em",
fontVariationSettings:
'"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40',
}}
>
artist
</span>
}
sx={{
"& .MuiChip-label": {
marginLeft: 0.5,
},
}}
/>
{item.data.PremiereDate && (
<Typography style={{ opacity: "0.8" }} variant="subtitle2">
{item.data.ProductionYear ?? ""}
</Typography>
)}
<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>
)} )}
<Typography variant="subtitle2" style={{ opacity: 0.8 }}>
{item.data.Genres?.slice(0, 4).join(" / ")}
</Typography>
</Stack> </Stack>
<Typography variant="subtitle1" style={{ opacity: 0.8 }}> </div>
{item.data.Genres.join(", ")}
</Typography>
<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
itemId={item.data.Id} item={item.data}
itemType={item.data.Type} itemId={item.data.Id}
itemUserData={item.data.UserData} itemType={item.data.Type}
userId={user.data.Id} itemUserData={item.data.UserData}
/> userId={user.data.Id}
</div> buttonProps={{
<div className="flex flex-row" style={{ gap: "1em" }}> fullWidth: true,
<LikeButton }}
itemName={item.data.Name} />
itemId={item.data.Id} </div>
queryKey={["item", id]} <div className="flex flex-row" style={{ gap: "1em" }}>
isFavorite={item.data.UserData.IsFavorite} <LikeButton
userId={user.data.Id} itemName={item.data.Name}
/> itemId={item.data.Id}
</div> queryKey={["item", id]}
isFavorite={item.data.UserData.IsFavorite}
userId={user.data.Id}
/>
</div> </div>
</div> </div>
</div> </div>
@@ -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) => {
@@ -455,14 +475,14 @@ const MusicAlbumTitlePage = () => {
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.ProductionYear} - ${
similar.EndDate similar.EndDate
? new Date(similar.EndDate).toLocaleString([], { ? new Date(similar.EndDate).toLocaleString([], {
year: "numeric", year: "numeric",
}) })
: "Present" : "Present"
}` }`
: similar.ProductionYear : similar.ProductionYear
} }
cardType={ cardType={
similar.Type === BaseItemKind.MusicAlbum || similar.Type === BaseItemKind.MusicAlbum ||
+37 -12
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,24 +83,27 @@
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(
to top, to top,
transparent, transparent,
black 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 {
&-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%",
+35 -11
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,24 +82,27 @@
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(
to top, to top,
transparent, transparent,
black 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 {
&-container { &-container {
+65 -92
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 && (
{item.data.ProductionYear ?? ""} <Typography style={{ opacity: "0.8" }} variant="subtitle2">
</Typography> {item.data.ProductionYear ?? ""}
</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,92 +320,59 @@ 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>
)} )}
<Typography variant="subtitle2" style={{ opacity: 0.8 }}>
{item.data.Genres?.slice(0, 4).join(" / ")}
</Typography>
</Stack> </Stack>
<Typography variant="subtitle1" style={{ opacity: 0.8 }}> </div>
{item.data.Genres.join(", ")} <div className="item-hero-buttons-container flex flex-row">
</Typography> <div className="flex flex-row fullWidth">
<PlayButton
<div className="item-hero-buttons-container flex flex-row"> item={item.data}
<div className="flex flex-row"> itemId={item.data.Id}
<PlayButton itemType={item.data.Type}
itemId={item.data.Id} itemUserData={item.data.UserData}
itemType={item.data.Type} currentVideoTrack={0}
itemUserData={item.data.UserData} currentAudioTrack={0}
currentVideoTrack={0} currentSubTrack={0}
currentAudioTrack={0} userId={user.data.Id}
currentSubTrack={0} buttonProps={{
userId={user.data.Id} fullWidth: true,
sx={{ }}
background: "hsl(195.56deg 29.03% 18.24%) !important", />
}} </div>
/> <div className="flex flex-row" style={{ gap: "1em" }}>
</div> <LikeButton
<div className="flex flex-row" style={{ gap: "1em" }}> itemName={item.data.Name}
<LikeButton itemId={item.data.Id}
itemName={item.data.Name} queryKey={["item", id]}
itemId={item.data.Id} isFavorite={item.data.UserData.IsFavorite}
queryKey={["item", id]} userId={user.data.Id}
isFavorite={item.data.UserData.IsFavorite} />
userId={user.data.Id} <MarkPlayedButton
/> itemName={item.data.Name}
<MarkPlayedButton itemId={item.data.Id}
itemName={item.data.Name} queryKey={["item", id]}
itemId={item.data.Id} isPlayed={item.data.UserData.Played}
queryKey={["item", id]} userId={user.data.Id}
isPlayed={item.data.UserData.Played} />
userId={user.data.Id}
/>
</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) => {
@@ -470,14 +443,14 @@ const BoxSetTitlePage = () => {
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.ProductionYear} - ${
similar.EndDate similar.EndDate
? new Date(similar.EndDate).toLocaleString([], { ? new Date(similar.EndDate).toLocaleString([], {
year: "numeric", year: "numeric",
}) })
: "Present" : "Present"
}` }`
: similar.ProductionYear : similar.ProductionYear
} }
cardType={ cardType={
similar.Type === BaseItemKind.MusicAlbum || similar.Type === BaseItemKind.MusicAlbum ||
+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 {
+73 -261
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 && (
{item.data.ProductionYear ?? ""} <Typography style={{ opacity: "0.8" }} variant="subtitle2">
</Typography> {item.data.ProductionYear ?? ""}
</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,163 +451,60 @@ 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>
)} )}
<Typography variant="subtitle2" style={{ opacity: 0.8 }}>
{item.data.Genres?.slice(0, 4).join(" / ")}
</Typography>
</Stack> </Stack>
<Typography variant="subtitle1" style={{ opacity: 0.8 }}> </div>
{item.data.Genres.join(", ")} <div className="item-hero-buttons-container">
</Typography> <div className="flex flex-row">
<PlayButton
<div className="item-hero-buttons-container flex flex-row"> item={item.data}
<div className="flex flex-row"> itemId={item.data.Id}
<PlayButton itemType={item.data.Type}
itemId={item.data.Id} itemUserData={item.data.UserData}
itemType={item.data.Type} currentVideoTrack={selectedVideoTrack}
itemUserData={item.data.UserData} currentAudioTrack={selectedAudioTrack}
currentVideoTrack={selectedVideoTrack} currentSubTrack={selectedSubtitleTrack}
currentAudioTrack={selectedAudioTrack} userId={user.data.Id}
currentSubTrack={selectedSubtitleTrack} />
userId={user.data.Id} </div>
/> <div className="flex flex-row" style={{ gap: "1em" }}>
</div> <TrailerButton
<div className="flex flex-row" style={{ gap: "1em" }}> trailerItem={item.data.RemoteTrailers}
<TrailerButton disabled={item.data.RemoteTrailers?.length === 0}
trailerItem={item.data.RemoteTrailers} />
disabled={item.data.RemoteTrailers?.length === 0} <LikeButton
/> itemName={item.data.Name}
<LikeButton itemId={item.data.Id}
itemName={item.data.Name} queryKey={["item", id]}
itemId={item.data.Id} isFavorite={item.data.UserData.IsFavorite}
queryKey={["item", id]} userId={user.data.Id}
isFavorite={item.data.UserData.IsFavorite} />
userId={user.data.Id} <MarkPlayedButton
/> itemName={item.data.Name}
<MarkPlayedButton itemId={item.data.Id}
itemName={item.data.Name} queryKey={["item", id]}
itemId={item.data.Id} isPlayed={item.data.UserData.Played}
queryKey={["item", id]} userId={user.data.Id}
isPlayed={item.data.UserData.Played} />
userId={user.data.Id}
/>
</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%",
+47 -147
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}
</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 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 && (
{item.data.ProductionYear ?? ""} <Typography style={{ opacity: "0.8" }} variant="subtitle2">
</Typography> {item.data.ProductionYear ?? ""}
</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>
)} )}
<Typography variant="subtitle2" style={{ opacity: 0.8 }}>
{item.data.Genres?.slice(0, 4).join(" / ")}
</Typography>
</Stack> </Stack>
<Typography variant="subtitle1" style={{ opacity: 0.8 }}>
{item.data.Genres.join(", ")}
</Typography>
</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;
} }
} }
} }
+14 -13
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}
@@ -460,16 +461,16 @@ const PersonTitlePage = () => {
tabitem.Type === BaseItemKind.Episode tabitem.Type === BaseItemKind.Episode
? `S${tabitem.ParentIndexNumber}:E${tabitem.IndexNumber} - ${tabitem.Name}` ? `S${tabitem.ParentIndexNumber}:E${tabitem.IndexNumber} - ${tabitem.Name}`
: tabitem.Type === BaseItemKind.Series : tabitem.Type === BaseItemKind.Series
? `${tabitem.ProductionYear} - ${ ? `${tabitem.ProductionYear} - ${
tabitem.EndDate tabitem.EndDate
? new Date( ? new Date(
tabitem.EndDate, tabitem.EndDate,
).toLocaleString([], { ).toLocaleString([], {
year: "numeric", year: "numeric",
}) })
: "Present" : "Present"
}` }`
: tabitem.ProductionYear : tabitem.ProductionYear
} }
cardType={ cardType={
tabitem.Type === BaseItemKind.Episode tabitem.Type === BaseItemKind.Episode
+37 -13
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,24 +103,28 @@
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(
to top, to top,
transparent, transparent,
black 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 {
&-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;
+49 -29
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
width: "13em", style={{
padding: "0.5em 1.5em", width: "13em",
paddingLeft: "0.8em", padding: "0.5em 1.5em",
gap:"0.4em", paddingLeft: "0.8em",
background: "black", gap: "0.4em",
borderRadius: "100px", background: "black",
display: 'grid', borderRadius: "100px",
justifyContent: "center", display: "grid",
alignItems: "center", justifyContent: "center",
gridTemplateColumns: "2em 1fr", alignItems: "center",
opacity:0, gridTemplateColumns: "2em 1fr",
}} 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)}
setVolume(newVal); </Typography>
if (newVal === 0) setMuted(true) <Slider
else setMuted(false) step={0.01}
}} /> max={1}
size="small"
value={muted ? 0 : volume}
onChange={(e, newVal) => {
setVolume(newVal);
if (newVal === 0) setMuted(true);
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"}>
+99 -87
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,
@@ -404,7 +403,7 @@ const SeriesTitlePage = () => {
<Blurhash <Blurhash
hash={ hash={
item.data.ImageBlurHashes.Primary[ item.data.ImageBlurHashes.Primary[
item.data.ImageTags.Primary item.data.ImageTags.Primary
] ]
} }
className="item-hero-image-blurhash" className="item-hero-image-blurhash"
@@ -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,72 +523,72 @@ 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>
)} )}
<Typography variant="subtitle2" style={{ opacity: 0.8 }}>
{item.data.Genres?.slice(0, 5).join(" / ")}
</Typography>
</Stack> </Stack>
<Typography variant="subtitle1" style={{ opacity: 0.8 }}> </div>
{item.data.Genres.join(", ")}
</Typography>
<div className="item-hero-buttons-container flex flex-row"> <div className="item-hero-buttons-container">
<div className="flex flex-row"> <div
<PlayButton className="flex flex-row"
itemId={item.data.Id} style={{
item={item.data} width: "100%",
itemType={item.data.Type} }}
itemUserData={item.data.UserData} >
currentAudioTrack={0} <PlayButton
currentVideoTrack={0} itemId={item.data.Id}
currentSubTrack={0} item={item.data}
userId={user.data.Id} itemType={item.data.Type}
/> itemUserData={item.data.UserData}
</div> currentAudioTrack={0}
<div className="flex flex-row" style={{ gap: "1em" }}> currentVideoTrack={0}
<TrailerButton currentSubTrack={0}
trailerItem={item.data.RemoteTrailers} userId={user.data.Id}
disabled={item.data.RemoteTrailers?.length === 0} buttonProps={{
/> fullWidth: true,
<LikeButton }}
itemName={item.data.Name} />
itemId={item.data.Id} </div>
queryKey={["item", id]} <div className="flex flex-row" style={{ gap: "1em" }}>
isFavorite={item.data.UserData.IsFavorite} <TrailerButton
userId={user.data.Id} trailerItem={item.data.RemoteTrailers}
/> disabled={item.data.RemoteTrailers?.length === 0}
<MarkPlayedButton />
itemName={item.data.Name} <LikeButton
itemId={item.data.Id} itemName={item.data.Name}
queryKey={["item", id]} itemId={item.data.Id}
isPlayed={item.data.UserData.Played} queryKey={["item", id]}
userId={user.data.Id} isFavorite={item.data.UserData.IsFavorite}
/> userId={user.data.Id}
</div> />
<MarkPlayedButton
itemName={item.data.Name}
itemId={item.data.Id}
queryKey={["item", id]}
isPlayed={item.data.UserData.Played}
userId={user.data.Id}
/>
</div> </div>
</div> </div>
</div> </div>
@@ -594,7 +604,7 @@ const SeriesTitlePage = () => {
<Typography> <Typography>
{getRuntime( {getRuntime(
item.data.RunTimeTicks - item.data.RunTimeTicks -
item.data.UserData.PlaybackPositionTicks, item.data.UserData.PlaybackPositionTicks,
)}{" "} )}{" "}
left left
</Typography> </Typography>
@@ -698,7 +708,6 @@ const SeriesTitlePage = () => {
))} ))}
</div> </div>
</div> </div>
<Divider flexItem orientation="vertical" />
<div <div
style={{ style={{
width: "100%", width: "100%",
@@ -900,7 +909,7 @@ const SeriesTitlePage = () => {
cardCaption={episode.Overview} cardCaption={episode.Overview}
imageBlurhash={ imageBlurhash={
episode.ImageBlurHashes?.Primary[ episode.ImageBlurHashes?.Primary[
Object.keys(episode.ImageBlurHashes.Primary)[0] Object.keys(episode.ImageBlurHashes.Primary)[0]
] ]
} }
queryKey={[ queryKey={[
@@ -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) => {
@@ -1188,11 +1199,11 @@ const SeriesTitlePage = () => {
imageBlurhash={ imageBlurhash={
!!special.ImageBlurHashes?.Primary && !!special.ImageBlurHashes?.Primary &&
special.ImageBlurHashes.Primary[ special.ImageBlurHashes.Primary[
Object.keys(special.ImageBlurHashes.Primary)[0] Object.keys(special.ImageBlurHashes.Primary)[0]
] ]
} }
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,17 +1231,18 @@ 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} - ${
? new Date(similar.EndDate).toLocaleString([], { similar.EndDate
year: "numeric", ? new Date(similar.EndDate).toLocaleString([], {
}) year: "numeric",
: "Present" })
}` : "Present"
}`
: similar.ProductionYear : similar.ProductionYear
} }
cardType={ cardType={
similar.Type === BaseItemKind.MusicAlbum || similar.Type === BaseItemKind.MusicAlbum ||
similar.Type === BaseItemKind.Audio similar.Type === BaseItemKind.Audio
? "square" ? "square"
: "portrait" : "portrait"
} }
@@ -1239,7 +1251,7 @@ const SeriesTitlePage = () => {
imageBlurhash={ imageBlurhash={
!!similar.ImageBlurHashes?.Primary && !!similar.ImageBlurHashes?.Primary &&
similar.ImageBlurHashes?.Primary[ similar.ImageBlurHashes?.Primary[
Object.keys(similar.ImageBlurHashes.Primary)[0] Object.keys(similar.ImageBlurHashes.Primary)[0]
] ]
} }
/> />
+25 -11
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,