feat: client side loading
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user