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 { PageProps } from "$fresh/server.ts";
|
||||||
import { Partial } from "$fresh/runtime.ts";
|
import { Partial } from "$fresh/runtime.ts";
|
||||||
import { useEffect } from "preact/hooks";
|
|
||||||
|
|
||||||
export default function App({ Component }: PageProps) {
|
export default function App({ Component }: PageProps) {
|
||||||
const globalCss = Deno
|
const globalCss = Deno.readTextFileSync("./static/global.css");
|
||||||
.readTextFileSync("./static/global.css")
|
|
||||||
.replaceAll("\n", "");
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<html>
|
<html>
|
||||||
@@ -21,7 +19,19 @@ export default function App({ Component }: PageProps) {
|
|||||||
<meta name="msapplication-TileColor" content="#da532c" />
|
<meta name="msapplication-TileColor" content="#da532c" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<meta name="theme-color" content="#141218" />
|
<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>
|
<title>Memorium</title>
|
||||||
</head>
|
</head>
|
||||||
<body f-client-nav>
|
<body f-client-nav>
|
||||||
|
|||||||
@@ -23,10 +23,7 @@ export default function MyLayout({ Component }: PageProps) {
|
|||||||
})}
|
})}
|
||||||
</nav>
|
</nav>
|
||||||
</aside>
|
</aside>
|
||||||
<main
|
<main class="py-5">
|
||||||
class="py-5"
|
|
||||||
style={{ fontFamily: "Work Sans" }}
|
|
||||||
>
|
|
||||||
<Component />
|
<Component />
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</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