mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-04 17:38:10 +00:00
75 lines
1.8 KiB
TypeScript
75 lines
1.8 KiB
TypeScript
import { useState } from "react";
|
|
import { LinksFunction } from "@remix-run/deno";
|
|
import {
|
|
Links,
|
|
Meta,
|
|
Outlet,
|
|
Scripts,
|
|
ScrollRestoration,
|
|
} from "@remix-run/react";
|
|
|
|
import normalizeCss from "./styles/normalize.css?url";
|
|
import tailwindCss from "./styles/tailwind.css?url";
|
|
import baseCss from "./styles/base.css?url";
|
|
|
|
import { TopBar } from "./modules/TopBar";
|
|
import { TopBarInnerContext } from "~/contexts/TopBarInner";
|
|
|
|
export const links: LinksFunction = () => [
|
|
{
|
|
rel: "stylesheet",
|
|
href: normalizeCss,
|
|
},
|
|
{
|
|
rel: "stylesheet",
|
|
href: tailwindCss,
|
|
},
|
|
{
|
|
rel: "stylesheet",
|
|
href: baseCss,
|
|
},
|
|
{
|
|
rel: "preconnect",
|
|
href: "https://fonts.googleapis.com",
|
|
},
|
|
{
|
|
rel: "preconnect",
|
|
href: "https://fonts.gstatic.com",
|
|
crossOrigin: "anonymous",
|
|
},
|
|
{
|
|
rel: "stylesheet",
|
|
href: "https://fonts.googleapis.com/css2?family=Fira+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap",
|
|
},
|
|
];
|
|
|
|
export default function App() {
|
|
const [topBarInnerComponent, setTopBarInnerComponent] =
|
|
useState<JSX.Element | null>(null);
|
|
|
|
return (
|
|
<html lang="en">
|
|
<head>
|
|
<meta charSet="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<Meta />
|
|
<Links />
|
|
</head>
|
|
<body className="overflow-hidden bg-ui-background">
|
|
<TopBarInnerContext.Provider
|
|
value={{
|
|
TopBarInner: topBarInnerComponent,
|
|
setTopBarInner: setTopBarInnerComponent,
|
|
}}
|
|
>
|
|
<div className="topbar-spacer" />
|
|
<Outlet />
|
|
<TopBar />
|
|
</TopBarInnerContext.Provider>
|
|
<ScrollRestoration />
|
|
<Scripts />
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|