diff --git a/src/components/skeleton/carousel.jsx b/src/components/skeleton/carousel.jsx
index e99b303..db005a7 100644
--- a/src/components/skeleton/carousel.jsx
+++ b/src/components/skeleton/carousel.jsx
@@ -20,6 +20,7 @@ export const CarouselSkeleton = () => {
sx={{
width: "100vw",
height: "100vh",
+ position: "absolute",
}}
>
diff --git a/src/routes/home/home.module.scss b/src/routes/home/home.module.scss
index 13fb0af..efab4e3 100644
--- a/src/routes/home/home.module.scss
+++ b/src/routes/home/home.module.scss
@@ -43,6 +43,12 @@
right: 0;
bottom: 0;
opacity: 0.8;
+ mask-image: linear-gradient(to bottom, black, transparent);
+ -webkit-mask-image: linear-gradient(
+ to bottom,
+ black,
+ transparent
+ );
}
&-image {
position: absolute;
@@ -54,19 +60,6 @@
bottom: 0;
background-position: center;
opacity: 1;
- &::after {
- content: "";
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background: linear-gradient(
- to top,
- rgb(0 0 0 / 0.45),
- transparent
- );
- }
}
&-icon {
position: absolute;
@@ -104,7 +97,7 @@
z-index: 0;
display: flex;
height: 100%;
- width: 70%;
+ width: 80%;
padding: 2em;
flex-direction: column;
justify-content: flex-end;
diff --git a/src/routes/home/index.jsx b/src/routes/home/index.jsx
index bde15e5..cdb6803 100644
--- a/src/routes/home/index.jsx
+++ b/src/routes/home/index.jsx
@@ -52,6 +52,7 @@ import { BaseItemKind, ItemFields } from "@jellyfin/sdk/lib/generated-client";
import { ErrorBoundary } from "react-error-boundary";
import CarouselSlideError from "../../components/errors/carousel";
+import { motion } from "framer-motion";
const Home = () => {
const authUser = useQuery({
queryKey: ["home", "authenticateUser"],
@@ -298,6 +299,7 @@ const Home = () => {
sx={{
marginBottom: "1.5em",
}}
+ duration={400}
interval={10000}
>
{latestMedia.isLoading ? (
@@ -318,10 +320,7 @@ const Home = () => {
className="hero-carousel-slide"
sx={{
background:
- theme.palette
- .primary
- .background
- .dark,
+ "transparent",
}}
key={index}
>
@@ -422,11 +421,30 @@ const Home = () => {
{!item.ImageTags
.Logo ? (
@@ -449,16 +467,27 @@ const Home = () => {
)}
{
}}
>
}
- //
-
className="hero-carousel-info"
>
{
)}
{
overflow:
"hidden",
WebkitLineClamp:
- "3",
+ "4",
WebkitBoxOrient:
"vertical",
opacity: 0.7,
@@ -572,23 +613,81 @@ const Home = () => {
{item.UserData
.PlaybackPositionTicks >
0 && (
-
+ transition={{
+ duration: 0.25,
+ delay: 0.3,
+ }}
+ whileInView={{
+ y: 0,
+ opacity: 1,
+ }}
+ exit={{
+ y: 10,
+ opacity: 0,
+ }}
+ direction="row"
+ gap="1em"
+ mt={2}
+ width="50%"
+ alignItems="center"
+ justifyContent="center"
+ >
+
+ {getRuntime(
+ item.RunTimeTicks -
+ item
+ .UserData
+ .PlaybackPositionTicks,
+ )}{" "}
+
+
+
)}
{/* TODO Link PLay and More info buttons in carousel */}