-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
45 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { useSignal } from "@preact/signals"; | ||
import { asset } from "@fresh/core/runtime"; | ||
import define from "$utils/fresh.ts"; | ||
import Layout from "$components/Layout.tsx"; | ||
import Counter from "$islands/Counter.tsx"; | ||
|
||
export default define.page(function Home() { | ||
const count = useSignal(3); | ||
|
||
return ( | ||
<Layout navShow={true} navActive="/" asideShow={false}> | ||
<div class="px-4 py-8 mx-auto fresh-gradient"> | ||
<div class="max-w-screen-md mx-auto flex flex-col items-center justify-center"> | ||
<img | ||
class="my-6" | ||
src={asset("/svgs/logo.svg")} | ||
width="128" | ||
height="128" | ||
alt="the Fresh logo: a sliced lemon dripping with juice" | ||
/> | ||
<h1 class="text-4xl font-bold">Welcome to Fresh</h1> | ||
<p class="my-4"> | ||
Try updating this message in the | ||
<code class="mx-2">./routes/index.tsx</code> file, and refresh. | ||
</p> | ||
<Counter count={count} /> | ||
</div> | ||
</div> | ||
</Layout> | ||
); | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,10 @@ | ||
import { useSignal } from "@preact/signals"; | ||
import { asset } from "@fresh/core/runtime"; | ||
import define from "$utils/fresh.ts"; | ||
import Layout from "$components/Layout.tsx"; | ||
import Counter from "$islands/Counter.tsx"; | ||
|
||
export default define.page(function Home() { | ||
const count = useSignal(3); | ||
|
||
return ( | ||
<Layout navShow={true} navActive="/" asideShow={false}> | ||
<div class="px-4 py-8 mx-auto fresh-gradient"> | ||
<div class="max-w-screen-md mx-auto flex flex-col items-center justify-center"> | ||
<img | ||
class="my-6" | ||
src={asset("/svgs/logo.svg")} | ||
width="128" | ||
height="128" | ||
alt="the Fresh logo: a sliced lemon dripping with juice" | ||
/> | ||
<h1 class="text-4xl font-bold">Welcome to Fresh</h1> | ||
<p class="my-4"> | ||
Try updating this message in the | ||
<code class="mx-2">./routes/index.tsx</code> file, and refresh. | ||
</p> | ||
<Counter count={count} /> | ||
</div> | ||
</div> | ||
</Layout> | ||
); | ||
}) | ||
export const handler = define.handlers({ | ||
GET: (ctx) => { | ||
return new Response("", { | ||
status: 307, | ||
headers: { location: `/accordion/with-nested-accordion` }, | ||
}); | ||
}, | ||
}); |