First Commit. Duplicate bunext-sqlite preset
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
export type AuthLegalLinkType = {
|
||||
title: string;
|
||||
url: string;
|
||||
};
|
||||
|
||||
export const AuthLegalLinks: AuthLegalLinkType[] = [
|
||||
{ title: "Terms", url: "/terms" },
|
||||
{ title: "Privacy", url: "/privacy" },
|
||||
{ title: "Contact", url: "/contact" },
|
||||
];
|
||||
@@ -0,0 +1,18 @@
|
||||
import Row from "@moduletrace/twui/layout/Row";
|
||||
import Span from "@moduletrace/twui/layout/Span";
|
||||
import { SiteData } from "@/src/data/site-data";
|
||||
import { AuthLegalLinks } from "../(data)/auth-legal-links";
|
||||
import AuthLegalLink from "./auth-legal-link";
|
||||
|
||||
export default function AuthBottomBar() {
|
||||
return (
|
||||
<Row className="w-full justify-center flex-wrap gap-x-6! gap-y-2! px-4 py-6">
|
||||
<Span className="text-xs text-slate-400 dark:text-slate-500">
|
||||
© {new Date().getFullYear()} {SiteData["SiteName"]}
|
||||
</Span>
|
||||
{AuthLegalLinks.map((link) => (
|
||||
<AuthLegalLink key={link.url} {...link} />
|
||||
))}
|
||||
</Row>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import Link from "@moduletrace/twui/layout/Link";
|
||||
import type { AuthLegalLinkType } from "../(data)/auth-legal-links";
|
||||
|
||||
export default function AuthLegalLink({ title, url }: AuthLegalLinkType) {
|
||||
return (
|
||||
<Link
|
||||
href={url}
|
||||
className="text-xs border-none text-slate-400 dark:text-slate-500"
|
||||
>
|
||||
{title}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import Row from "@moduletrace/twui/layout/Row";
|
||||
import Logo from "@/src/components/general/logo";
|
||||
import ColorSchemeSelector from "@moduletrace/twui/elements/ColorSchemeSelector";
|
||||
|
||||
export default function AuthTopBar() {
|
||||
return (
|
||||
<Row className="w-full justify-between flex-nowrap px-4 sm:px-10 py-5">
|
||||
<Logo icon_size={32} />
|
||||
<ColorSchemeSelector
|
||||
className="text-slate-500 hover:text-foreground-light dark:text-slate-400 dark:hover:text-foreground-dark transition-colors"
|
||||
size="small"
|
||||
/>
|
||||
</Row>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import React from "react";
|
||||
import Stack from "@moduletrace/twui/layout/Stack";
|
||||
import Main from "@moduletrace/twui/layout/Main";
|
||||
import AuthTopBar from "./(partials)/auth-top-bar";
|
||||
import AuthBottomBar from "./(partials)/auth-bottom-bar";
|
||||
|
||||
type Props = {
|
||||
children: React.ReactNode;
|
||||
};
|
||||
|
||||
/**
|
||||
* Distraction-free layout for `/auth/*`: logo and theme switch on top,
|
||||
* centered content, legal links at the bottom. No site header or footer.
|
||||
*/
|
||||
export default function AuthLayout({ children }: Props): React.JSX.Element {
|
||||
return (
|
||||
<Stack className="w-full min-h-screen items-stretch gap-0! bg-light dark:bg-black">
|
||||
<AuthTopBar />
|
||||
<Main className="grow justify-center">{children}</Main>
|
||||
<AuthBottomBar />
|
||||
</Stack>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user