mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-07 22:15:49 +01:00
✨ Added a background image input
Added an input in the advanced options for a background image. Also removed an unused import from my previous commit and changed the margin on the header bar to padding instead.
This commit is contained in:
19
src/components/layout/Background.tsx
Normal file
19
src/components/layout/Background.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import { Global } from '@mantine/core';
|
||||
import { useConfig } from '../../tools/state';
|
||||
|
||||
export function Background() {
|
||||
const { config } = useConfig();
|
||||
|
||||
return (
|
||||
<Global
|
||||
styles={{
|
||||
body: {
|
||||
backgroundImage: `url('${config.settings.background}')` || '',
|
||||
backgroundPosition: 'center',
|
||||
backgroundSize: 'cover',
|
||||
backgroundRepeat: 'no-repeat',
|
||||
},
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user