From 464a4508e30a4fbaafd9749f5b7630573e09a709 Mon Sep 17 00:00:00 2001 From: Prayag Prajapati Date: Sun, 20 Aug 2023 21:58:17 +0530 Subject: [PATCH] Update hero carousel [6/-] #136 --- package-lock.json | 10 +- package.json | 2 +- src/App.jsx | 6 +- src/components/buttons/markPlayedButton.jsx | 5 +- src/components/carouselSlide/index.jsx | 123 ++++++++---------- src/routes/home/home.module.scss | 4 +- src/routes/home/index.jsx | 132 ++++++-------------- src/styles/global.scss | 5 +- src/theme.js | 2 +- 9 files changed, 108 insertions(+), 181 deletions(-) diff --git a/package-lock.json b/package-lock.json index ebb2881..0266698 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@emotion/react": "^11.11.1", "@emotion/styled": "^11.10.5", - "@fontsource/open-sans": "^5.0.5", + "@fontsource-variable/open-sans": "^5.0.9", "@jellyfin/sdk": "^0.8.2", "@mdi/js": "^7.2.96", "@mui/lab": "^5.0.0-alpha.134", @@ -840,10 +840,10 @@ "node": ">=12" } }, - "node_modules/@fontsource/open-sans": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/@fontsource/open-sans/-/open-sans-5.0.8.tgz", - "integrity": "sha512-d3Shc6QHoZMzZIL6m4M/geyK0EXHqLvUm9fmlkr1L/AEWgIasoLEBMKEdMczV2e66SHYAYKagIsBwfWnVhmPGQ==" + "node_modules/@fontsource-variable/open-sans": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@fontsource-variable/open-sans/-/open-sans-5.0.9.tgz", + "integrity": "sha512-J44/EFkcEpSlceL4frtK0g5nEjPlJLYSnPN+eQed9ePp6HXf4WUwCeU7QhAS0ScIm6whK9auVygc8lkDshlM+Q==" }, "node_modules/@jellyfin/sdk": { "version": "0.8.2", diff --git a/package.json b/package.json index 9385a97..b68c5be 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "dependencies": { "@emotion/react": "^11.11.1", "@emotion/styled": "^11.10.5", - "@fontsource/open-sans": "^5.0.5", + "@fontsource-variable/open-sans": "^5.0.9", "@jellyfin/sdk": "^0.8.2", "@mdi/js": "^7.2.96", "@mui/lab": "^5.0.0-alpha.134", diff --git a/src/App.jsx b/src/App.jsx index 1806530..ce225d2 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -54,7 +54,9 @@ import { SideMenu } from "./components/menu/sidemenu.jsx"; import { AppBar } from "./components/appBar/appBar.jsx"; // Fonts -import "@fontsource/open-sans"; +import "@fontsource-variable/open-sans"; // Defaults to wght axis +import "@fontsource-variable/open-sans/wght.css"; // Specify axis +import "@fontsource-variable/open-sans/wght-italic.css"; // Specify axis and style // Jellyfin SDK TypeScript import { @@ -394,7 +396,7 @@ function App() { - + }> { const navigate = useNavigate(); @@ -45,6 +45,8 @@ const CarouselSlide = ({ item }) => { networkMode: "always", }); + // consoe; + // const favouriteButtonMutation = return ( @@ -53,6 +55,7 @@ const CarouselSlide = ({ item }) => { className="hero-carousel-slide" sx={{ background: "transparent", + px: 3, }} >
@@ -80,12 +83,9 @@ const CarouselSlide = ({ item }) => {
@@ -116,6 +116,7 @@ const CarouselSlide = ({ item }) => { y: 0, opacity: 1, }} + overflow="visible" > {!item.ImageTags.Logo ? ( item.Name @@ -166,21 +167,14 @@ const CarouselSlide = ({ item }) => { } className="hero-carousel-info" > - + {!!item.ProductionYear ? item.ProductionYear : "Unknown"} { {item.Overview} - {item.UserData.PlaybackPositionTicks > 0 && ( - - - {getRuntime( - item.RunTimeTicks - - item.UserData - .PlaybackPositionTicks, - )} - - - - )} {/* TODO Link PLay and More info buttons in carousel */} { mt={3} direction="row" gap={3} + width="100%" className="hero-carousel-button-container" + alignItems="center" > - + + +