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>
|
||||
|
||||
@@ -23,10 +23,7 @@ export default function MyLayout({ Component }: PageProps) {
|
||||
})}
|
||||
</nav>
|
||||
</aside>
|
||||
<main
|
||||
class="py-5"
|
||||
style={{ fontFamily: "Work Sans" }}
|
||||
>
|
||||
<main class="py-5">
|
||||
<Component />
|
||||
</main>
|
||||
</div>
|
||||
|
||||
File diff suppressed because one or more lines are too long
BIN
static/noise.png
Normal file
BIN
static/noise.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
Reference in New Issue
Block a user