36 lines
1.3 KiB
TypeScript
36 lines
1.3 KiB
TypeScript
import React, { ReactNode } from 'react';
|
|
import { minifyCSS, minifyJS } from './utils';
|
|
|
|
// @ts-expect-error - Importing as text, not a module
|
|
import styles from './styles.css' with { type: "text" };
|
|
// @ts-expect-error - Importing as text, not a module
|
|
import headScript from './onLoad' with { type: "text" };
|
|
|
|
import { ThemePicker } from './components/theme-picker';
|
|
import { ProfileBadge } from './components/profile-badge';
|
|
import { TagPicker } from './components/tag-picker';
|
|
import { PostArchive } from './components/post-archive';
|
|
|
|
export function AppShell({ children, searchParams }: { children: ReactNode, searchParams?: URLSearchParams }) {
|
|
return (
|
|
<html lang="en">
|
|
<head>
|
|
<meta charSet="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>Caleb's Blog</title>
|
|
<style dangerouslySetInnerHTML={{ __html: minifyCSS(styles) }} />
|
|
</head>
|
|
<body>
|
|
{children}
|
|
<aside>
|
|
<ThemePicker />
|
|
<ProfileBadge />
|
|
<TagPicker searchParams={searchParams} />
|
|
<PostArchive />
|
|
</aside>
|
|
</body>
|
|
<script dangerouslySetInnerHTML={{ __html: minifyJS(headScript) }} />
|
|
</html>
|
|
)
|
|
}
|