mirror of
https://github.com/woodchen-ink/nezha-dash-v1.git
synced 2025-07-18 17:41:56 +08:00
fix: custom background image position
This commit is contained in:
parent
5c2a9b28f3
commit
f4ca2ca2df
14
src/App.tsx
14
src/App.tsx
@ -80,14 +80,14 @@ const App: React.FC = () => {
|
|||||||
return (
|
return (
|
||||||
<Router basename={import.meta.env.BASE_URL}>
|
<Router basename={import.meta.env.BASE_URL}>
|
||||||
<div
|
<div
|
||||||
className={cn("flex min-h-screen w-full flex-col", {
|
className={cn(
|
||||||
" bg-background": !customBackgroundImage,
|
"flex min-h-screen w-full flex-col bg-cover bg-no-repeat bg-center bg-fixed",
|
||||||
})}
|
{
|
||||||
|
"bg-background": !customBackgroundImage,
|
||||||
|
},
|
||||||
|
)}
|
||||||
style={{
|
style={{
|
||||||
backgroundImage: customBackgroundImage ? "url(" + customBackgroundImage + ")" : undefined,
|
backgroundImage: customBackgroundImage ? `url(${customBackgroundImage})` : undefined,
|
||||||
backgroundSize: "cover",
|
|
||||||
backgroundRepeat: "no-repeat",
|
|
||||||
backgroundPosition: "center",
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<main className="flex min-h-[calc(100vh-calc(var(--spacing)*16))] flex-1 flex-col gap-4 p-4 md:p-10 md:pt-8">
|
<main className="flex min-h-[calc(100vh-calc(var(--spacing)*16))] flex-1 flex-col gap-4 p-4 md:p-10 md:pt-8">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user