Skip to content

Commit

Permalink
Fix backgrounds again.. (#948)
Browse files Browse the repository at this point in the history
  • Loading branch information
harshithmohan authored Jul 25, 2024
1 parent 17a6a3a commit 375abc1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,8 @@
"eslint --cache --format=node_modules/eslint-formatter-pretty"
],
"*.css": "stylelint"
},
"volta": {
"node": "20.16.0"
}
}
6 changes: 3 additions & 3 deletions src/pages/collection/Series.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,12 @@ const Series = () => {
<Outlet context={{ fanart, scrollRef } satisfies SeriesContextType} />

<div
className="fixed left-0 top-0 -z-10 w-full bg-cover bg-center opacity-5"
className="fixed left-0 top-0 -z-10 w-full bg-cover bg-fixed opacity-5"
// If this height feels like a hack, you figure out how to fix it
// 48px accounts for the top and bottom padding of the container
// 3rem accounts for the top and bottom padding of the container (1.5rem each side)
style={{
backgroundImage: fanart ? `url('${getImagePath(fanart)}')` : undefined,
height: containerBounds.height + 48,
height: `calc(${containerBounds.height}px + 3rem)`,
}}
/>
</div>
Expand Down
9 changes: 6 additions & 3 deletions src/pages/settings/SettingsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,13 @@ function SettingsPage() {
)}
</div>
<div
className="fixed left-0 top-0 -z-10 w-full bg-cover bg-center opacity-20"
className="fixed left-0 top-0 -z-10 w-full bg-cover bg-fixed opacity-20"
// If this height feels like a hack, you figure out how to fix it
// 48px accounts for the top and bottom padding of the container
style={{ backgroundImage: 'url(/api/v3/Image/Random/Fanart)', height: containerBounds.height + 48 }}
// 3rem accounts for the top and bottom padding of the container (1.5rem each side)
style={{
backgroundImage: 'url(/api/v3/Image/Random/Fanart)',
height: `calc(${containerBounds.height}px + 3rem)`,
}}
/>
</div>
);
Expand Down

0 comments on commit 375abc1

Please sign in to comment.