From 940eae61767214eb1ee573284dc8b5876d536fb3 Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Sun, 12 Jan 2025 19:44:19 +0900
Subject: refactor(blog/nuldoc): convert pages/*.ts to TSX

---
 vhosts/blog/nuldoc-src/pages/home.tsx | 65 +++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)
 create mode 100644 vhosts/blog/nuldoc-src/pages/home.tsx

(limited to 'vhosts/blog/nuldoc-src/pages/home.tsx')

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: "/",
+  };
+}
-- 
cgit v1.2.3-70-g09d2

