Add Partials (#1824)
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user