diff --git a/src/routes/boxset/index.jsx b/src/routes/boxset/index.jsx index 3682d4f..0c96150 100644 --- a/src/routes/boxset/index.jsx +++ b/src/routes/boxset/index.jsx @@ -38,7 +38,7 @@ import LikeButton from "../../components/buttons/likeButton"; import MarkPlayedButton from "../../components/buttons/markPlayedButton"; import PlayButton from "../../components/buttons/playButton"; -import meshBg from "../../assets/herobg.png"; +import heroBg from "../../assets/herobg.png"; import "./boxset.module.scss"; import IconLink from "../../components/iconLink"; @@ -128,7 +128,16 @@ const BoxSetTitlePage = () => { useEffect(() => { if (item.isSuccess) { - setBackdrop("", ""); + if (item.data.BackdropImageTags?.length > 0) { + setBackdrop( + api?.getItemImageUrl(item.data.Id, "Backdrop", { + tag: item.data.BackdropImageTags[0], + }), + item.data.Id, + ); + } else { + setBackdrop("", ""); + } } }, [item.isSuccess]); @@ -173,10 +182,12 @@ const BoxSetTitlePage = () => { >
- {item.data.BackdropImageTags ? ( + {item.data.BackdropImageTags?.length ? ( { e.currentTarget.style.opacity = 1; @@ -186,7 +197,17 @@ const BoxSetTitlePage = () => { }} /> ) : ( - <> + { + e.currentTarget.style.opacity = 1; + }} + style={{ + y: parallax, + }} + /> )}
{
-
+
{
{collectionItems.data.TotalRecordCount > 0 && ( - + {collectionItems.data.Items.map((similar, index) => { return ( { 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`, - item.data.Id, - ); + if (item.data.BackdropImageTags?.length > 0) { + setBackdrop( + api?.getItemImageUrl(item.data.Id, "Backdrop", { + tag: item.data.BackdropImageTags[0], + }), + item.data.Id, + ); + } else { + setBackdrop("", ""); + } const direTp = item.data.People.filter((itm) => itm.Type === "Director"); setDirectors(direTp); const writeTp = item.data.People.filter((itm) => itm.Type === "Writer"); @@ -687,7 +690,7 @@ const ItemDetail = () => {
{item.data.Taglines?.length > 0 && ( - + {item.data.Taglines[0]} )} diff --git a/src/routes/item/item.module.scss b/src/routes/item/item.module.scss index 2f1c912..522dee5 100644 --- a/src/routes/item/item.module.scss +++ b/src/routes/item/item.module.scss @@ -1,14 +1,12 @@ $cardWidth: 18%; .item-default.item { - gap: 1em; .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; @@ -176,7 +174,9 @@ $cardWidth: 18%; } .item { + gap: 1.5em; &-hero{ + // margin-bottom: 1em; &-image{ box-sizing: border-box; &-container{