diff --git a/inertia/components/common/footer/footer.tsx b/inertia/components/common/footer/footer.tsx index 647fbe5..553f99a 100644 --- a/inertia/components/common/footer/footer.tsx +++ b/inertia/components/common/footer/footer.tsx @@ -1,33 +1,38 @@ import { AUTHOR_GITHUB_URL, AUTHOR_NAME } from '#config/project'; import PATHS from '#core/constants/paths'; +import { route } from '@izzyjs/route/client'; import { Anchor, Group, Text } from '@mantine/core'; +import { withTranslation, WithTranslation } from 'react-i18next'; import ExternalLink from '~/components/common/external_link'; import { ExternalLinkStyled } from '~/components/common/links/external_link_styled'; +import { InternalLink } from '~/components/common/links/internal_link'; import { LocaleSwitcher } from '~/components/common/locale_switcher'; import { ThemeSwitcher } from '~/components/common/theme_switcher'; import packageJson from '../../../../package.json'; import classes from './footer.module.css'; -export const Footer = () => ( +export const Footer = withTranslation()(({ t }: WithTranslation) => ( - Made with ❤️ by{' '} + {t('footer.made_by')}{' '} {AUTHOR_NAME} • - - - {packageJson.version} - - - • - + + • + + + {packageJson.version} + + {t('privacy')} + {t('terms')} + -); +)); diff --git a/inertia/components/footer/footer.module.css b/inertia/components/footer/footer.module.css deleted file mode 100644 index 7704b36..0000000 --- a/inertia/components/footer/footer.module.css +++ /dev/null @@ -1,19 +0,0 @@ -.footer { - width: 100%; -} - -.inner { - display: flex; - justify-content: space-between; - align-items: center; - - @media (max-width: $mantine-breakpoint-xs) { - flex-direction: column; - } -} - -.links { - @media (max-width: $mantine-breakpoint-xs) { - margin-top: var(--mantine-spacing-md); - } -} diff --git a/inertia/components/footer/footer.tsx b/inertia/components/footer/footer.tsx deleted file mode 100644 index fb14127..0000000 --- a/inertia/components/footer/footer.tsx +++ /dev/null @@ -1,59 +0,0 @@ -import PATHS from '#core/constants/paths'; -import { Link } from '@inertiajs/react'; -import { route } from '@izzyjs/route/client'; -import { Anchor, Group, Text } from '@mantine/core'; -import { useTranslation } from 'react-i18next'; -import ExternalLink from '~/components/common/external_link'; -import { LocaleSwitcher } from '~/components/common/locale_switcher'; -import { ThemeSwitcher } from '~/components/common/theme_switcher'; -import packageJson from '../../../package.json'; -import classes from './footer.module.css'; - -export function MantineFooter() { - const { t } = useTranslation('common'); - - const links = [ - { link: route('privacy').path, label: t('privacy'), external: false }, - { link: route('terms').path, label: t('terms'), external: false }, - { link: PATHS.EXTENSION, label: 'Extension', external: true }, - ]; - - const items = links.map((link) => ( - - {link.label} - - )); - - return ( -
-
- - {t('footer.made_by')}{' '} - - Sonny - - {' • '} - - {packageJson.version} - - - - - - - - - - {items} - -
-
- ); -} diff --git a/inertia/layouts/small_content.tsx b/inertia/layouts/small_content.tsx new file mode 100644 index 0000000..5c371e2 --- /dev/null +++ b/inertia/layouts/small_content.tsx @@ -0,0 +1,44 @@ +import { Box, rem } from '@mantine/core'; +import { PropsWithChildren } from 'react'; +import { FloatingNavbar } from '~/components/common/floating_navbar/floating_navbar'; +import { Footer } from '~/components/common/footer/footer'; +import { BaseLayout } from './_base_layout'; + +const SmallContentLayout = ({ children }: PropsWithChildren) => ( + + {children} + +); + +export default SmallContentLayout; + +const LAYOUT_WIDTH = '800px'; +const Layout = ({ children }: PropsWithChildren) => ( + <> + {/* Top navbar */} + + + {/* Page content */} + + + {children} + + + + {/* Footer */} +