diff --git a/src/components/carouselSlide/index.jsx b/src/components/carouselSlide/index.jsx
index b826a2e..2dd362b 100644
--- a/src/components/carouselSlide/index.jsx
+++ b/src/components/carouselSlide/index.jsx
@@ -135,12 +135,11 @@ const CarouselSlide = ({ item }) => {
animationDirection === "right"
? "translateX(-60px)"
: "translateX(60px)",
-
opacity: 0,
}}
transition={{
- duration: 0.25,
- ease: "easeInOut",
+ duration: 0.35,
+ ease: "anticipate",
}}
key={item.Id}
variant="h2"
diff --git a/src/routes/album/album.module.scss b/src/routes/album/album.module.scss
index 466bfe3..0992c56 100644
--- a/src/routes/album/album.module.scss
+++ b/src/routes/album/album.module.scss
@@ -1,6 +1,11 @@
$border-radius: 20px;
+.item-album{
+ .item-hero-image-container{
+ width: 22% !important;
+ }
+}
.item-detail-album {
&-track {
display: grid;
@@ -10,13 +15,14 @@ $border-radius: 20px;
gap: 0.5em;
width: 100%;
padding: 0.25em 0;
- background: hsl(256, 100%, 4%, 40%);
+ background: rgb(0 0 0 / 0.4);
transition: background $transition-time-default;
backdrop-filter: blur(5px);
&:first-child {
border-radius: $border-radius $border-radius 8px 8px;
cursor: default !important;
+
}
&:last-child {
@@ -33,7 +39,7 @@ $border-radius: 20px;
}
&:hover {
- background: hsl(256, 100%, 4%, 50%);
+ background: rgb(0 0 0 / 0.5);
cursor: pointer;
}
@@ -42,3 +48,162 @@ $border-radius: 20px;
}
}
}
+
+.item {
+ gap: 1em;
+ &-hero {
+ height: 50vh;
+ gap: 2em;
+ position: relative;
+ align-items: center;
+ &-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;
+ }
+ &-blurhash {
+ position: absolute !important;
+ width: 100% !important;
+ height: 100% !important;
+ z-index: -1;
+ }
+ }
+ &-logo {
+ max-width: 42rem;
+ max-height: 10rem;
+ opacity: 0;
+ transition: opacity $transition-time-default;
+ object-position: bottom;
+ }
+ &-detail {
+ width: 100%;
+ align-items: flex-start;
+ gap: 1em;
+ justify-content: end;
+ }
+ &-buttons {
+ &-container {
+ align-items: center;
+ justify-content: space-between;
+ width: 100%;
+ }
+ }
+ &-backdrop {
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+ object-position: top;
+ opacity: 0;
+ transition: opacity $transition-time-default;
+ &-container {
+ filter: brightness(0.8);
+ position: absolute;
+ top: -4.4em;
+ left: -1.6em;
+ width: 100vw;
+ height: calc(50vh + 4.4em);
+ z-index: -1;
+ mask-image: linear-gradient(to top, transparent, black);
+ -webkit-mask-image: linear-gradient(
+ to top,
+ transparent,
+ black
+ );
+ }
+ }
+ }
+
+ &-detail {
+ display: grid;
+ grid-template-columns: 1fr 5px 35%;
+ justify-items: center;
+ align-items: start;
+ gap: 1em;
+
+ &-cast {
+ max-height: 50vh;
+ overflow-y: auto;
+ mask-image: linear-gradient(to top, transparent, black 1.2em);
+ -webkit-mask-image: linear-gradient(to top, transparent, black 1.2em);
+ &-title {
+ position: sticky;
+ top: 0;
+ background: $clr-background-dark;
+ padding: 0.35em;
+ border-radius: 10px;
+ 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);
+ }
+ &-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;
+ }
+ }
+ }
+ }
+ &-link {
+ color: white;
+ text-decoration-color: rgb(255 255 255 / 0.5);
+ &:hover {
+ text-decoration-color: white;
+ }
+ }
+ }
+}
+
+@media (max-width: 1320px) {
+ .item-album .item-detail {
+ &-cast {
+ &-grid {
+ grid-template-columns: 1fr;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/routes/album/index.jsx b/src/routes/album/index.jsx
index 9ff7ec4..12db136 100644
--- a/src/routes/album/index.jsx
+++ b/src/routes/album/index.jsx
@@ -1,12 +1,15 @@
import PropTypes from "prop-types";
-import React, { useEffect } from "react";
+import React, { useEffect, useLayoutEffect } from "react";
import Box from "@mui/material/Box";
+import Chip from "@mui/material/Chip";
import CircularProgress from "@mui/material/CircularProgress";
+import Divider from "@mui/material/Divider";
import Paper from "@mui/material/Paper";
+import Stack from "@mui/material/Stack";
import Typography from "@mui/material/Typography";
-import { useParams } from "react-router-dom";
+import { Link, NavLink, useParams } from "react-router-dom";
import { motion } from "framer-motion";
@@ -20,16 +23,20 @@ import { getLibraryApi } from "@jellyfin/sdk/lib/utils/api/library-api";
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
+import { Blurhash } from "react-blurhash";
+
import { useQuery } from "@tanstack/react-query";
-import { getRuntimeMusic } from "../../utils/date/time";
+import { endsAt, getRuntime, getRuntimeMusic } from "../../utils/date/time";
import { Card } from "../../components/card/card";
import { CardScroller } from "../../components/cardScroller/cardScroller";
-import Hero from "../../components/layouts/item/hero";
import LikeButton from "../../components/buttons/likeButton";
+import MarkPlayedButton from "../../components/buttons/markPlayedButton";
+import PlayButton from "../../components/buttons/playButton";
import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
+import { getTypeIcon } from "../../components/utils/iconsCollection";
import { useApi } from "../../utils/store/api";
import { useAudioPlayback } from "../../utils/store/audioPlayback";
import { useBackdropStore } from "../../utils/store/backdrop";
@@ -151,17 +158,14 @@ const MusicAlbumTitlePage = () => {
const [setAppBackdrop] = useBackdropStore((state) => [state.setBackdrop]);
- useEffect(() => {
+ useLayoutEffect(() => {
if (item.isSuccess) {
setAppBackdrop(
- item.data.Type === BaseItemKind.MusicAlbum ||
- item.data.Type === BaseItemKind.Episode
- ? `${api.basePath}/Items/${item.data.ParentBackdropItemId}/Images/Backdrop`
- : `${api.basePath}/Items/${item.data.Id}/Images/Backdrop`,
+ `${api.basePath}/Items/${item.data.ParentBackdropItemId}/Images/Backdrop`,
item.data.Id,
);
}
- });
+ }, [item.isSuccess]);
if (item.isPending || similarItems.isPending) {
return (
@@ -192,24 +196,203 @@ const MusicAlbumTitlePage = () => {
duration: 0.25,
ease: "easeInOut",
}}
- className="scrollY"
- style={{
- padding: "5em 2em 2em 1em",
- display: "flex",
- flexDirection: "column",
- gap: "0.5em",
- }}
+ className="scrollY padded-top item-album"
>
-