feat: client side loading

This commit is contained in:
2025-01-20 23:37:03 +01:00
parent 463141981b
commit 19a1344d3d
7 changed files with 75 additions and 15 deletions

View File

@@ -1,14 +1,15 @@
import { PageProps } from "$fresh/server.ts";
import { Partial } from "$fresh/runtime.ts";
import { useEffect } from "preact/hooks";
import { Head } from "$fresh/runtime.ts";
export default function App({ Component }: PageProps) {
const globalCss = Deno
.readTextFileSync("./static/global.css")
.replaceAll("\n", "");
return (
<>
<Head>
<html>
<head>
<link rel="stylesheet" href="/prism-material-dark.css" />
<link rel="stylesheet" href="/styles.css" />
<link
@@ -21,9 +22,13 @@ export default function App({ Component }: PageProps) {
<meta name="theme-color" content="#141218" />
<style>{globalCss}</style>
<title>Memorium</title>
</Head>
<Component />
</head>
<body f-client-nav>
<Partial name="body">
<Component />
</Partial>
</body>
<script src="/thumbnails.js" type="module" async defer />
</>
</html>
);
}