mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-08 22:53:25 +00:00
55 lines
1.3 KiB
TypeScript
55 lines
1.3 KiB
TypeScript
import styled from '@emotion/styled';
|
|
import { Link } from '@inertiajs/react';
|
|
import { route } from '@izzyjs/route/client';
|
|
import { useTranslation } from 'react-i18next';
|
|
import Quotes from '~/components/quotes';
|
|
|
|
const HeroStyle = styled.header(({ theme }) => ({
|
|
height: '250px',
|
|
minHeight: '250px',
|
|
width: '100%',
|
|
backgroundColor: theme.colors.darkestBlue,
|
|
marginTop: '0.5em',
|
|
borderRadius: theme.border.radius,
|
|
padding: '1em',
|
|
display: 'flex',
|
|
gap: '1em',
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
flexDirection: 'column',
|
|
|
|
'& *': {
|
|
color: `${theme.colors.white} !important`,
|
|
textAlign: 'center',
|
|
},
|
|
}));
|
|
|
|
const HeroTitle = styled.h1({
|
|
fontSize: '32px',
|
|
});
|
|
|
|
const HeroQuote = styled(Quotes)({
|
|
fontSize: '20px',
|
|
});
|
|
|
|
const LinkButton = styled(Link)(({ theme }) => ({
|
|
fontSize: '1rem',
|
|
width: 'fit-content',
|
|
backgroundColor: theme.colors.primary,
|
|
borderRadius: '5rem',
|
|
padding: '0.5em 1.5em',
|
|
}));
|
|
|
|
export default function HeroHeader() {
|
|
const { t } = useTranslation();
|
|
return (
|
|
<HeroStyle>
|
|
<HeroTitle>{t('about:hero.title')}</HeroTitle>
|
|
<HeroQuote>{t('common:slogan')}</HeroQuote>
|
|
<LinkButton href={route('dashboard').url}>
|
|
{t('about:hero.cta')}
|
|
</LinkButton>
|
|
</HeroStyle>
|
|
);
|
|
}
|