style: improve page-margin
This commit is contained in:
12 files changed
+226
-235
No files matched your search
@@ -9,14 +9,14 @@
|
||||
position: absolute !important;
|
||||
height: 100%;
|
||||
font-size: 1em !important;
|
||||
width: 3.2em;
|
||||
width: $page-margin;
|
||||
&.right{
|
||||
border-radius: $border-radius-default 0 0 $border-radius-default !important;
|
||||
right: -3.2em;
|
||||
right: -$page-margin;
|
||||
}
|
||||
&.left{
|
||||
border-radius: 0 $border-radius-default $border-radius-default 0 !important;
|
||||
left: -3.2em;
|
||||
left: -$page-margin;
|
||||
}
|
||||
.material-symbols-rounded{
|
||||
font-size: 3.2em;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.carousel {
|
||||
position: relative;
|
||||
height: 70vh;
|
||||
margin: 0.6em 2.8em 2.8em 2.8em;
|
||||
margin-bottom: 3.2em;
|
||||
&-button {
|
||||
position: absolute !important;
|
||||
top: 50%;
|
||||
|
||||
@@ -37,7 +37,8 @@ const ShowMoreText = ({ content, collapsedLines, extraProps }) => {
|
||||
WebkitBoxOrient: "vertical",
|
||||
width: "100%",
|
||||
}}
|
||||
variant="subtitle1"
|
||||
variant="subtitle2"
|
||||
fontWeight={300}
|
||||
>
|
||||
{content}
|
||||
</Typography>
|
||||
|
||||
@@ -11,7 +11,7 @@ export const CarouselSkeleton = () => {
|
||||
elevation={0}
|
||||
sx={{
|
||||
height: "70vh",
|
||||
margin: "0.6em 1.6em 1.6em 1.6em",
|
||||
marginBottom: "3.2em",
|
||||
position: "relative",
|
||||
background: "black",
|
||||
border: "1px solid rgb(255 255 255 / 0.2)",
|
||||
|
||||
@@ -1,14 +1,24 @@
|
||||
import React from "react";
|
||||
|
||||
import { Divider, LinearProgress, Skeleton } from "@mui/material";
|
||||
import { motion } from "framer-motion";
|
||||
|
||||
const ItemSkeleton = () => {
|
||||
return (
|
||||
<div
|
||||
<motion.div
|
||||
className="item item-default scrollY padded-top flex flex-column"
|
||||
style={{
|
||||
width: "100vw",
|
||||
}}
|
||||
initial={{
|
||||
opacity: 0,
|
||||
}}
|
||||
animate={{
|
||||
opacity: 1,
|
||||
}}
|
||||
exit={{
|
||||
opacity: 0,
|
||||
}}
|
||||
>
|
||||
<div className="item-hero">
|
||||
<div
|
||||
@@ -111,7 +121,7 @@ const ItemSkeleton = () => {
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -308,11 +308,6 @@ const MusicAlbumTitlePage = () => {
|
||||
artist
|
||||
</span>
|
||||
}
|
||||
sx={{
|
||||
"& .MuiChip-label": {
|
||||
marginLeft: 0.5,
|
||||
},
|
||||
}}
|
||||
/>
|
||||
{item.data.PremiereDate && (
|
||||
<Typography style={{ opacity: "0.8" }} variant="subtitle2">
|
||||
|
||||
@@ -122,8 +122,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.home {
|
||||
padding: 0;
|
||||
}
|
||||
+195
-205
@@ -200,225 +200,215 @@ const Home = () => {
|
||||
)}
|
||||
</ErrorBoundary>
|
||||
|
||||
<div
|
||||
className="padded-container"
|
||||
style={{
|
||||
padding: "2.8em",
|
||||
scrollPadding: "4.4em",
|
||||
paddingTop: "1em"
|
||||
}}
|
||||
id="libraries"
|
||||
<ErrorBoundary
|
||||
fallback={
|
||||
<div className="error">
|
||||
<Typography>Error with Carousel</Typography>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<ErrorBoundary
|
||||
fallback={
|
||||
<div className="error">
|
||||
<Typography>Error with Carousel</Typography>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
{libraries.isPending ? (
|
||||
<CardsSkeleton />
|
||||
) : (
|
||||
<CardScroller displayCards={4} title="Libraries">
|
||||
{libraries.status === "success" &&
|
||||
libraries.data.Items.map((item) => {
|
||||
return (
|
||||
<Card
|
||||
key={item.Id}
|
||||
item={item}
|
||||
cardTitle={item.Name}
|
||||
imageType="Primary"
|
||||
cardType="thumb"
|
||||
disableOverlay
|
||||
onClick={() => navigate(`/library/${item.Id}`)}
|
||||
imageBlurhash={
|
||||
!!item.ImageBlurHashes?.Primary &&
|
||||
item.ImageBlurHashes?.Primary[
|
||||
Object.keys(item.ImageBlurHashes.Primary)[0]
|
||||
]
|
||||
}
|
||||
overrideIcon={item.CollectionType}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</CardScroller>
|
||||
)}
|
||||
</ErrorBoundary>
|
||||
<ErrorBoundary
|
||||
fallback={
|
||||
<div className="error">
|
||||
<Typography>Error with Libraries</Typography>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
{upNextItems.isPending ? (
|
||||
<CardsSkeleton />
|
||||
) : upNextItems.isSuccess && upNextItems.data.Items.length === 0 ? (
|
||||
<></>
|
||||
) : (
|
||||
<CardScroller displayCards={4} title="Up Next">
|
||||
{upNextItems.data.Items.map((item) => {
|
||||
return (
|
||||
<Card
|
||||
key={item.Id}
|
||||
item={item}
|
||||
cardTitle={
|
||||
item.Type === BaseItemKind.Episode
|
||||
? item.SeriesName
|
||||
: item.Name
|
||||
}
|
||||
imageType={
|
||||
item.Type === BaseItemKind.Episode
|
||||
? "Primary"
|
||||
: Object.keys(item.ImageTags).includes("Thumb")
|
||||
? "Thumb"
|
||||
: "Backdrop"
|
||||
}
|
||||
cardCaption={
|
||||
item.Type === BaseItemKind.Episode
|
||||
? item.ParentIndexNumber === 0
|
||||
? `${item.SeasonName} - ${item.Name}`
|
||||
: item.IndexNumberEnd
|
||||
? `${item.IndexNumber}-${item.IndexNumberEnd}. ${item.Name}`
|
||||
: `${item.IndexNumber}. ${item.Name}`
|
||||
: item.Type === BaseItemKind.Series
|
||||
? `${item.ProductionYear} - ${
|
||||
item.EndDate
|
||||
? new Date(item.EndDate).toLocaleString([], {
|
||||
year: "numeric",
|
||||
})
|
||||
: "Present"
|
||||
}`
|
||||
: item.ProductionYear
|
||||
}
|
||||
cardType="thumb"
|
||||
queryKey={["home", "upNext"]}
|
||||
userId={user.data.Id}
|
||||
imageBlurhash={
|
||||
!!item.ImageBlurHashes?.Primary &&
|
||||
item.ImageBlurHashes?.Primary[
|
||||
Object.keys(item.ImageBlurHashes.Primary)[0]
|
||||
]
|
||||
}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</CardScroller>
|
||||
)}
|
||||
</ErrorBoundary>
|
||||
<ErrorBoundary
|
||||
fallback={
|
||||
<div className="error">
|
||||
<Typography>Error with resumeItemsVideo</Typography>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
{resumeItemsVideo.isPending ? (
|
||||
<CardsSkeleton />
|
||||
) : resumeItemsVideo.isSuccess &&
|
||||
resumeItemsVideo.data.Items.length === 0 ? (
|
||||
<></>
|
||||
) : (
|
||||
<CardScroller displayCards={4} title="Continue Watching">
|
||||
{resumeItemsVideo.data.Items.map((item) => {
|
||||
return (
|
||||
<Card
|
||||
key={item.Id}
|
||||
item={item}
|
||||
cardTitle={
|
||||
item.Type === BaseItemKind.Episode
|
||||
? item.SeriesName
|
||||
: item.Name
|
||||
}
|
||||
imageType={
|
||||
item.Type === BaseItemKind.Episode
|
||||
? "Primary"
|
||||
: Object.keys(item.ImageTags).includes("Thumb")
|
||||
? "Thumb"
|
||||
: "Backdrop"
|
||||
}
|
||||
cardCaption={
|
||||
item.Type === BaseItemKind.Episode
|
||||
? `S${item.ParentIndexNumber}:E${item.IndexNumber} - ${item.Name}`
|
||||
: item.Type === BaseItemKind.Series
|
||||
? `${item.ProductionYear} - ${
|
||||
item.EndDate
|
||||
? new Date(item.EndDate).toLocaleString([], {
|
||||
year: "numeric",
|
||||
})
|
||||
: "Present"
|
||||
}`
|
||||
: item.ProductionYear
|
||||
}
|
||||
cardType="thumb"
|
||||
queryKey={["home", "resume", "video"]}
|
||||
userId={user.data.Id}
|
||||
imageBlurhash={
|
||||
!!item.ImageBlurHashes?.Primary &&
|
||||
item.ImageBlurHashes?.Primary[
|
||||
Object.keys(item.ImageBlurHashes.Primary)[0]
|
||||
]
|
||||
}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</CardScroller>
|
||||
)}
|
||||
</ErrorBoundary>
|
||||
<ErrorBoundary
|
||||
fallback={
|
||||
<div className="error">
|
||||
<Typography>Error with resumeItemsAudio</Typography>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
{resumeItemsAudio.isPending ? (
|
||||
<CardsSkeleton />
|
||||
) : resumeItemsAudio.isSuccess &&
|
||||
resumeItemsAudio.data.Items.length === 0 ? (
|
||||
<></>
|
||||
) : (
|
||||
<CardScroller displayCards={4} title="Continue Listening">
|
||||
{resumeItemsAudio.data.Items.map((item) => {
|
||||
{libraries.isPending ? (
|
||||
<CardsSkeleton />
|
||||
) : (
|
||||
<CardScroller displayCards={4} title="Libraries">
|
||||
{libraries.status === "success" &&
|
||||
libraries.data.Items.map((item) => {
|
||||
return (
|
||||
<Card
|
||||
key={item.Id}
|
||||
item={item}
|
||||
cardTitle={item.Name}
|
||||
imageType={
|
||||
item.Type === BaseItemKind.Episode
|
||||
? "Primary"
|
||||
: Object.keys(item.ImageTags).includes("Thumb")
|
||||
? "Thumb"
|
||||
: "Backdrop"
|
||||
}
|
||||
cardCaption={item.ProductionYear}
|
||||
imageType="Primary"
|
||||
cardType="thumb"
|
||||
queryKey={["home", "resume", "audio"]}
|
||||
userId={user.data.Id}
|
||||
disableOverlay
|
||||
onClick={() => navigate(`/library/${item.Id}`)}
|
||||
imageBlurhash={
|
||||
item.ImageBlurHashes?.Primary?.[
|
||||
!!item.ImageBlurHashes?.Primary &&
|
||||
item.ImageBlurHashes?.Primary[
|
||||
Object.keys(item.ImageBlurHashes.Primary)[0]
|
||||
]
|
||||
}
|
||||
overrideIcon={item.CollectionType}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</CardScroller>
|
||||
)}
|
||||
</ErrorBoundary>
|
||||
<ErrorBoundary
|
||||
fallback={
|
||||
<div className="error">
|
||||
<Typography>Error with LatestMediaSections</Typography>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
{latestMediaLibs.map((lib) => {
|
||||
return <LatestMediaSection key={lib[0]} latestMediaLib={lib} />;
|
||||
})}
|
||||
</ErrorBoundary>
|
||||
</div>
|
||||
</CardScroller>
|
||||
)}
|
||||
</ErrorBoundary>
|
||||
<ErrorBoundary
|
||||
fallback={
|
||||
<div className="error">
|
||||
<Typography>Error with Libraries</Typography>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
{upNextItems.isPending ? (
|
||||
<CardsSkeleton />
|
||||
) : upNextItems.isSuccess && upNextItems.data.Items.length === 0 ? (
|
||||
<></>
|
||||
) : (
|
||||
<CardScroller displayCards={4} title="Up Next">
|
||||
{upNextItems.data.Items.map((item) => {
|
||||
return (
|
||||
<Card
|
||||
key={item.Id}
|
||||
item={item}
|
||||
cardTitle={
|
||||
item.Type === BaseItemKind.Episode
|
||||
? item.SeriesName
|
||||
: item.Name
|
||||
}
|
||||
imageType={
|
||||
item.Type === BaseItemKind.Episode
|
||||
? "Primary"
|
||||
: Object.keys(item.ImageTags).includes("Thumb")
|
||||
? "Thumb"
|
||||
: "Backdrop"
|
||||
}
|
||||
cardCaption={
|
||||
item.Type === BaseItemKind.Episode
|
||||
? item.ParentIndexNumber === 0
|
||||
? `${item.SeasonName} - ${item.Name}`
|
||||
: item.IndexNumberEnd
|
||||
? `${item.IndexNumber}-${item.IndexNumberEnd}. ${item.Name}`
|
||||
: `${item.IndexNumber}. ${item.Name}`
|
||||
: item.Type === BaseItemKind.Series
|
||||
? `${item.ProductionYear} - ${
|
||||
item.EndDate
|
||||
? new Date(item.EndDate).toLocaleString([], {
|
||||
year: "numeric",
|
||||
})
|
||||
: "Present"
|
||||
}`
|
||||
: item.ProductionYear
|
||||
}
|
||||
cardType="thumb"
|
||||
queryKey={["home", "upNext"]}
|
||||
userId={user.data.Id}
|
||||
imageBlurhash={
|
||||
!!item.ImageBlurHashes?.Primary &&
|
||||
item.ImageBlurHashes?.Primary[
|
||||
Object.keys(item.ImageBlurHashes.Primary)[0]
|
||||
]
|
||||
}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</CardScroller>
|
||||
)}
|
||||
</ErrorBoundary>
|
||||
<ErrorBoundary
|
||||
fallback={
|
||||
<div className="error">
|
||||
<Typography>Error with resumeItemsVideo</Typography>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
{resumeItemsVideo.isPending ? (
|
||||
<CardsSkeleton />
|
||||
) : resumeItemsVideo.isSuccess &&
|
||||
resumeItemsVideo.data.Items.length === 0 ? (
|
||||
<></>
|
||||
) : (
|
||||
<CardScroller displayCards={4} title="Continue Watching">
|
||||
{resumeItemsVideo.data.Items.map((item) => {
|
||||
return (
|
||||
<Card
|
||||
key={item.Id}
|
||||
item={item}
|
||||
cardTitle={
|
||||
item.Type === BaseItemKind.Episode
|
||||
? item.SeriesName
|
||||
: item.Name
|
||||
}
|
||||
imageType={
|
||||
item.Type === BaseItemKind.Episode
|
||||
? "Primary"
|
||||
: Object.keys(item.ImageTags).includes("Thumb")
|
||||
? "Thumb"
|
||||
: "Backdrop"
|
||||
}
|
||||
cardCaption={
|
||||
item.Type === BaseItemKind.Episode
|
||||
? `S${item.ParentIndexNumber}:E${item.IndexNumber} - ${item.Name}`
|
||||
: item.Type === BaseItemKind.Series
|
||||
? `${item.ProductionYear} - ${
|
||||
item.EndDate
|
||||
? new Date(item.EndDate).toLocaleString([], {
|
||||
year: "numeric",
|
||||
})
|
||||
: "Present"
|
||||
}`
|
||||
: item.ProductionYear
|
||||
}
|
||||
cardType="thumb"
|
||||
queryKey={["home", "resume", "video"]}
|
||||
userId={user.data.Id}
|
||||
imageBlurhash={
|
||||
!!item.ImageBlurHashes?.Primary &&
|
||||
item.ImageBlurHashes?.Primary[
|
||||
Object.keys(item.ImageBlurHashes.Primary)[0]
|
||||
]
|
||||
}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</CardScroller>
|
||||
)}
|
||||
</ErrorBoundary>
|
||||
<ErrorBoundary
|
||||
fallback={
|
||||
<div className="error">
|
||||
<Typography>Error with resumeItemsAudio</Typography>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
{resumeItemsAudio.isPending ? (
|
||||
<CardsSkeleton />
|
||||
) : resumeItemsAudio.isSuccess &&
|
||||
resumeItemsAudio.data.Items.length === 0 ? (
|
||||
<></>
|
||||
) : (
|
||||
<CardScroller displayCards={4} title="Continue Listening">
|
||||
{resumeItemsAudio.data.Items.map((item) => {
|
||||
return (
|
||||
<Card
|
||||
key={item.Id}
|
||||
item={item}
|
||||
cardTitle={item.Name}
|
||||
imageType={
|
||||
item.Type === BaseItemKind.Episode
|
||||
? "Primary"
|
||||
: Object.keys(item.ImageTags).includes("Thumb")
|
||||
? "Thumb"
|
||||
: "Backdrop"
|
||||
}
|
||||
cardCaption={item.ProductionYear}
|
||||
cardType="thumb"
|
||||
queryKey={["home", "resume", "audio"]}
|
||||
userId={user.data.Id}
|
||||
imageBlurhash={
|
||||
item.ImageBlurHashes?.Primary?.[
|
||||
Object.keys(item.ImageBlurHashes.Primary)[0]
|
||||
]
|
||||
}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</CardScroller>
|
||||
)}
|
||||
</ErrorBoundary>
|
||||
<ErrorBoundary
|
||||
fallback={
|
||||
<div className="error">
|
||||
<Typography>Error with LatestMediaSections</Typography>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
{latestMediaLibs.map((lib) => {
|
||||
return <LatestMediaSection key={lib[0]} latestMediaLib={lib} />;
|
||||
})}
|
||||
</ErrorBoundary>
|
||||
</main>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -306,7 +306,7 @@ const ItemDetail = () => {
|
||||
opacity: 1,
|
||||
}}
|
||||
transition={{
|
||||
duration: 0.25,
|
||||
duration: 0.35,
|
||||
ease: "easeInOut",
|
||||
}}
|
||||
className="scrollY padded-top flex flex-column item item-default"
|
||||
|
||||
@@ -126,7 +126,7 @@ h1 {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
min-height: 100vh;
|
||||
padding: $page-margin;
|
||||
padding: ($page-margin - 1.2em) $page-margin;
|
||||
scrollbar-gutter: stable;
|
||||
&.padded-top {
|
||||
padding-top: 4.4em;
|
||||
|
||||
@@ -32,4 +32,4 @@ $shadow-card-image: 0 2px 8px rgb(0 0 0 / 0.25);
|
||||
|
||||
$clr-background-card-icon: linear-gradient(45deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.2));
|
||||
|
||||
$page-margin: 3.2em;
|
||||
$page-margin: 4em;
|
||||
+9
-10
@@ -10,17 +10,16 @@ const { palette } = createTheme({});
|
||||
const { augmentColor } = palette;
|
||||
export const theme = createTheme({
|
||||
palette: {
|
||||
primary: {
|
||||
main: clrAccentDefault,
|
||||
background: {
|
||||
main: clrBackgroundDefault,
|
||||
light: clrBackgroundLight,
|
||||
dark: clrBackgroundDark,
|
||||
primary: augmentColor({
|
||||
color: {
|
||||
main: clrAccentDefault,
|
||||
},
|
||||
},
|
||||
secondary: {
|
||||
main: clrSecondaryDefault,
|
||||
},
|
||||
}),
|
||||
secondary: augmentColor({
|
||||
color: {
|
||||
main: clrSecondaryDefault,
|
||||
},
|
||||
}),
|
||||
background: {
|
||||
default: clrBackgroundDefault,
|
||||
paper: clrBackgroundDark,
|
||||
|
||||
Reference in new issue
Block a user