mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-03 17:06:37 -04:00
use camelCase in themes config
This commit is contained in:
@ -1,11 +1,20 @@
|
||||
import { Html, Head, Main, NextScript } from "next/document";
|
||||
import themes, { toCSS } from "../lib/config/themes";
|
||||
import * as config from "../lib/config";
|
||||
|
||||
// https://nextjs.org/docs/advanced-features/custom-document
|
||||
const Document = () => {
|
||||
return (
|
||||
<Html lang={config.siteLocale?.replace("_", "-")}>
|
||||
<Head />
|
||||
<Head>
|
||||
{/* convert themes object into inlined css variables */}
|
||||
<style
|
||||
id="theme-colors"
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: `:root{${toCSS(themes.light)}}[data-theme="dark"]{${toCSS(themes.dark)}}`,
|
||||
}}
|
||||
/>
|
||||
</Head>
|
||||
<body>
|
||||
<Main />
|
||||
<NextScript />
|
||||
|
Reference in New Issue
Block a user