Add Partials (#1824)

This commit is contained in:
Marvin Hagemeister
2023-09-27 13:34:30 +02:00
committed by GitHub
parent d9829e25e6
commit 665d35bbc2
92 changed files with 3271 additions and 116 deletions
@@ -0,0 +1,48 @@
import { AppProps } from "$fresh/server.ts";
import { Partial } from "$fresh/runtime.ts";
import { Fader } from "../../islands/Fader.tsx";
export default function AppLayout({ Component }: AppProps) {
return (
<html>
<head>
<meta charSet="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>fresh title</title>
</head>
<body fresh-client-nav="true">
<Partial name="body">
<Fader>
<Component />
</Fader>
</Partial>
<p>
<a
class="page-a-link"
href="/client_nav/page-a"
>
Page A
</a>
</p>
<p>
<a
class="page-b-link"
href="/client_nav/page-b"
>
Page B
</a>
</p>
<p>
<a
class="page-c-link"
href="/client_nav/page-c"
>
Page C
</a>
</p>
<pre id="logs" />
</body>
</html>
);
}