summaryrefslogtreecommitdiffhomepage
path: root/vhosts/blog/nuldoc-src/pages/home.tsx
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-01-12 19:44:19 +0900
committernsfisis <nsfisis@gmail.com>2025-01-12 21:37:23 +0900
commit940eae61767214eb1ee573284dc8b5876d536fb3 (patch)
treeed82c51e568eea064b530e815f12bd2fc701eef6 /vhosts/blog/nuldoc-src/pages/home.tsx
parent98abcc023b99898f3a7e182e2330ea809a4c99e2 (diff)
downloadnsfisis.dev-940eae61767214eb1ee573284dc8b5876d536fb3.tar.gz
nsfisis.dev-940eae61767214eb1ee573284dc8b5876d536fb3.tar.zst
nsfisis.dev-940eae61767214eb1ee573284dc8b5876d536fb3.zip
refactor(blog/nuldoc): convert pages/*.ts to TSX
Diffstat (limited to 'vhosts/blog/nuldoc-src/pages/home.tsx')
-rw-r--r--vhosts/blog/nuldoc-src/pages/home.tsx65
1 files changed, 65 insertions, 0 deletions
diff --git a/vhosts/blog/nuldoc-src/pages/home.tsx b/vhosts/blog/nuldoc-src/pages/home.tsx
new file mode 100644
index 00000000..3e79928a
--- /dev/null
+++ b/vhosts/blog/nuldoc-src/pages/home.tsx
@@ -0,0 +1,65 @@
+import GlobalFooter from "../components/GlobalFooter.tsx";
+import { renderToDOM } from "../jsx/render.ts";
+import GlobalHeader from "../components/GlobalHeader.tsx";
+import PageLayout from "../components/PageLayout.tsx";
+import { Config } from "../config.ts";
+import { el } from "../dom.ts";
+import { Page } from "../page.ts";
+
+export type HomePage = Page;
+
+export async function generateHomePage(config: Config): Promise<HomePage> {
+ const html = await renderToDOM(
+ <PageLayout
+ metaCopyrightYear={config.blog.siteCopyrightYear}
+ metaDescription="nsfisis のブログサイト"
+ metaTitle={config.blog.siteName}
+ metaAtomFeedHref={`https://${config.blog.fqdn}/atom.xml`}
+ config={config}
+ >
+ <body className="single">
+ <GlobalHeader config={config} />
+ <main className="main">
+ <article className="post-single">
+ <article className="post-entry">
+ <a href="/about/">
+ <header className="entry-header">
+ <h2>About</h2>
+ </header>
+ </a>
+ </article>
+ <article className="post-entry">
+ <a href="/posts/">
+ <header className="entry-header">
+ <h2>Posts</h2>
+ </header>
+ </a>
+ </article>
+ <article className="post-entry">
+ <a href="/slides/">
+ <header className="entry-header">
+ <h2>Slides</h2>
+ </header>
+ </a>
+ </article>
+ <article className="post-entry">
+ <a href="/tags/">
+ <header className="entry-header">
+ <h2>Tags</h2>
+ </header>
+ </a>
+ </article>
+ </article>
+ </main>
+ <GlobalFooter config={config} />
+ </body>
+ </PageLayout>,
+ );
+
+ return {
+ root: el("__root__", {}, html),
+ renderer: "html",
+ destFilePath: "/index.html",
+ href: "/",
+ };
+}