Leaflet Blog in Deno Fresh
1import { Footer } from "../components/footer.tsx";
2import PostList from "../islands/post-list.tsx";
3import { Title } from "../components/typography.tsx";
4import { getPosts } from "../lib/api.ts";
5
6export const dynamic = "force-static";
7export const revalidate = 3600; // 1 hour
8
9export default async function Home() {
10 const posts = await getPosts();
11
12 return (
13 <div className="grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-dvh p-8 pb-20 gap-16 sm:p-20">
14 <main className="flex flex-col gap-8 row-start-2 items-center sm:items-start w-full max-w-[600px]">
15 <div className="self-center flex flex-col">
16 <Title level="h1" className="m-0">
17 knotbin
18 </Title>
19 <span className="font-bold text-xs opacity-50 text-right flex-1 mr-6">
20 looking into it
21 </span>
22 </div>
23
24 <div className="flex flex-col gap-4 w-full">
25 <PostList posts={posts} />
26 </div>
27 </main>
28 <Footer />
29 </div>
30 );
31}