2022-05-15 12:42:53 +02:00
|
|
|
import { Group, Image, Text } from '@mantine/core';
|
2022-05-21 00:52:55 +02:00
|
|
|
import { NextLink } from '@mantine/next';
|
2022-04-25 00:11:32 +02:00
|
|
|
import * as React from 'react';
|
2022-06-07 00:07:56 +00:00
|
|
|
import { useConfig } from '../../tools/state';
|
2022-04-25 00:11:32 +02:00
|
|
|
|
|
|
|
|
export function Logo({ style }: any) {
|
2022-06-07 00:07:56 +00:00
|
|
|
const { config } = useConfig();
|
|
|
|
|
|
2022-05-12 14:24:15 +02:00
|
|
|
return (
|
2022-05-17 01:01:26 +02:00
|
|
|
<Group spacing="xs">
|
2022-05-15 12:42:53 +02:00
|
|
|
<Image
|
|
|
|
|
width={50}
|
2022-06-07 01:35:50 +00:00
|
|
|
src={config.settings.logo || '/imgs/logo.png'}
|
2022-05-15 12:42:53 +02:00
|
|
|
style={{
|
|
|
|
|
position: 'relative',
|
|
|
|
|
}}
|
|
|
|
|
/>
|
2022-05-21 00:52:55 +02:00
|
|
|
<NextLink
|
2022-06-01 19:53:57 +02:00
|
|
|
href="/"
|
2022-05-21 00:52:55 +02:00
|
|
|
style={{
|
|
|
|
|
textDecoration: 'none',
|
|
|
|
|
position: 'relative',
|
|
|
|
|
}}
|
2022-05-14 21:41:30 +02:00
|
|
|
>
|
2022-05-21 00:52:55 +02:00
|
|
|
<Text
|
|
|
|
|
sx={style}
|
|
|
|
|
weight="bold"
|
|
|
|
|
variant="gradient"
|
2022-06-07 16:53:51 +00:00
|
|
|
gradient={{
|
|
|
|
|
from: config.settings.primary_color || 'red',
|
|
|
|
|
to: config.settings.secondary_color || 'orange',
|
|
|
|
|
deg: 145,
|
|
|
|
|
}}
|
2022-05-21 00:52:55 +02:00
|
|
|
>
|
2022-06-07 01:35:50 +00:00
|
|
|
{config.settings.title || 'Homarr'}
|
2022-05-21 00:52:55 +02:00
|
|
|
</Text>
|
|
|
|
|
</NextLink>
|
2022-05-14 21:41:30 +02:00
|
|
|
</Group>
|
2022-05-12 14:24:15 +02:00
|
|
|
);
|
2022-04-25 00:11:32 +02:00
|
|
|
}
|