Add @pandacss/dev, srjuggernaut-panda-preset, FontAwesome icons, and fonts to enable styling. Update .gitignore to exclude styled-system directories.
75 lines
1.4 KiB
TypeScript
75 lines
1.4 KiB
TypeScript
/// <reference types="vite/client" />
|
|
|
|
import ORBITRON from '@fontsource/orbitron/900.css?url'
|
|
import ROBOTO from '@fontsource-variable/roboto?url'
|
|
import { config } from '@fortawesome/fontawesome-svg-core'
|
|
import FONTAWESOME_STYLES from '@fortawesome/fontawesome-svg-core/styles.css?url'
|
|
import {
|
|
createRootRoute,
|
|
HeadContent,
|
|
Outlet,
|
|
Scripts
|
|
} from '@tanstack/react-router'
|
|
import type { ReactNode } from 'react'
|
|
import GLOBAL_CSS from '@/styles/global.css?url'
|
|
|
|
config.autoAddCss = false
|
|
|
|
export const Route = createRootRoute({
|
|
head: () => ({
|
|
meta: [
|
|
{
|
|
charSet: 'utf-8'
|
|
},
|
|
{
|
|
name: 'viewport',
|
|
content: 'width=device-width, initial-scale=1'
|
|
},
|
|
{
|
|
title: 'Juggernaut Plays Blog'
|
|
}
|
|
],
|
|
links: [
|
|
{
|
|
rel: 'stylesheet',
|
|
href: GLOBAL_CSS
|
|
},
|
|
{
|
|
rel: 'stylesheet',
|
|
href: ROBOTO
|
|
},
|
|
{
|
|
rel: 'stylesheet',
|
|
href: ORBITRON
|
|
},
|
|
{
|
|
rel: 'stylesheet',
|
|
href: FONTAWESOME_STYLES
|
|
}
|
|
]
|
|
}),
|
|
component: RootComponent
|
|
})
|
|
|
|
function RootComponent() {
|
|
return (
|
|
<RootDocument>
|
|
<Outlet />
|
|
</RootDocument>
|
|
)
|
|
}
|
|
|
|
function RootDocument({ children }: Readonly<{ children: ReactNode }>) {
|
|
return (
|
|
<html lang="es">
|
|
<head>
|
|
<HeadContent />
|
|
</head>
|
|
<body>
|
|
{children}
|
|
<Scripts />
|
|
</body>
|
|
</html>
|
|
)
|
|
}
|