fix: correctly embed styles.css
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
// deno-lint-ignore-file react-no-danger
|
||||
import { PageProps } from "$fresh/server.ts";
|
||||
import { Partial } from "$fresh/runtime.ts";
|
||||
import { useEffect } from "preact/hooks";
|
||||
|
||||
export default function App({ Component }: PageProps) {
|
||||
const globalCss = Deno
|
||||
.readTextFileSync("./static/global.css")
|
||||
.replaceAll("\n", "");
|
||||
const globalCss = Deno.readTextFileSync("./static/global.css");
|
||||
|
||||
return (
|
||||
<html>
|
||||
@@ -21,7 +19,19 @@ export default function App({ Component }: PageProps) {
|
||||
<meta name="msapplication-TileColor" content="#da532c" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="theme-color" content="#141218" />
|
||||
<style>{globalCss}</style>
|
||||
<link
|
||||
rel="preload"
|
||||
href="/fonts/work-sans-v18-latin-regular.woff2"
|
||||
as="font"
|
||||
type="font/woff2"
|
||||
/>
|
||||
<link
|
||||
rel="preload"
|
||||
href="/fonts/work-sans-v18-latin-700.woff2"
|
||||
as="font"
|
||||
type="font/woff2"
|
||||
/>
|
||||
<style dangerouslySetInnerHTML={{ __html: globalCss }} />
|
||||
<title>Memorium</title>
|
||||
</head>
|
||||
<body f-client-nav>
|
||||
|
||||
Reference in New Issue
Block a user