summaryrefslogtreecommitdiffhomepage
path: root/vhosts/blog/nuldoc-src/pages/about.ts
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2023-09-07 22:27:48 +0900
committernsfisis <nsfisis@gmail.com>2023-09-07 22:35:53 +0900
commit994e0114d76ae19768d5c303874a968cf6369fd0 (patch)
tree5fd3f8b169eea00084b24fbae820f75273864d2a /vhosts/blog/nuldoc-src/pages/about.ts
parent57f015992f678bfd7281f171fb9d71349c96a1a0 (diff)
downloadnsfisis.dev-994e0114d76ae19768d5c303874a968cf6369fd0.tar.gz
nsfisis.dev-994e0114d76ae19768d5c303874a968cf6369fd0.tar.zst
nsfisis.dev-994e0114d76ae19768d5c303874a968cf6369fd0.zip
meta: migrate to monorepo
Diffstat (limited to 'vhosts/blog/nuldoc-src/pages/about.ts')
-rw-r--r--vhosts/blog/nuldoc-src/pages/about.ts183
1 files changed, 183 insertions, 0 deletions
diff --git a/vhosts/blog/nuldoc-src/pages/about.ts b/vhosts/blog/nuldoc-src/pages/about.ts
new file mode 100644
index 00000000..acba113b
--- /dev/null
+++ b/vhosts/blog/nuldoc-src/pages/about.ts
@@ -0,0 +1,183 @@
+import { globalFooter } from "../components/global_footer.ts";
+import { globalHeader } from "../components/global_header.ts";
+import { pageLayout } from "../components/page_layout.ts";
+import { staticScriptElement } from "../components/utils.ts";
+import { Config } from "../config.ts";
+import { el, text } from "../dom.ts";
+import { Page } from "../page.ts";
+import { dateToString } from "../revision.ts";
+import { getPostCreatedDate } from "./post.ts";
+import { SlidePage } from "./slide.ts";
+
+export type AboutPage = Page;
+
+export async function generateAboutPage(
+ slides: SlidePage[],
+ config: Config,
+): Promise<AboutPage> {
+ const body = el(
+ "body",
+ [["class", "single"]],
+ globalHeader(config),
+ el(
+ "main",
+ [["class", "main"]],
+ el(
+ "article",
+ [["class", "post-single"]],
+ el(
+ "header",
+ [["class", "post-header"]],
+ el(
+ "h1",
+ [["class", "post-title"]],
+ text("nsfisis"),
+ ),
+ el(
+ "div",
+ [["class", "my-icon"]],
+ await staticScriptElement("/p5.min.js", [], config),
+ await staticScriptElement("/my-icon.js", [], config),
+ el("div", [["id", "p5jsMyIcon"]]),
+ el(
+ "noscript",
+ [],
+ el(
+ "img",
+ [["src", "/favicon.svg"]],
+ ),
+ ),
+ ),
+ ),
+ el(
+ "div",
+ [["class", "post-content"]],
+ el(
+ "section",
+ [],
+ el(
+ "h2",
+ [],
+ text("読み方"),
+ ),
+ el(
+ "p",
+ [],
+ text(
+ "読み方は決めていません。音にする必要があるときは本名である「いまむら」をお使いください。",
+ ),
+ ),
+ ),
+ el(
+ "section",
+ [],
+ el(
+ "h2",
+ [],
+ text("アカウント"),
+ ),
+ el(
+ "ul",
+ [],
+ el(
+ "li",
+ [],
+ el(
+ "a",
+ [["href", "https://twitter.com/nsfisis"]],
+ text("Twitter (現 𝕏): @nsfisis"),
+ ),
+ ),
+ el(
+ "li",
+ [],
+ el(
+ "a",
+ [["href", "https://github.com/nsfisis"]],
+ text("GitHub: @nsfisis"),
+ ),
+ ),
+ ),
+ ),
+ el(
+ "section",
+ [],
+ el(
+ "h2",
+ [],
+ text("仕事"),
+ ),
+ el(
+ "ul",
+ [],
+ el(
+ "li",
+ [],
+ text("2021-01~現在: "),
+ el(
+ "a",
+ [["href", "https://www.dgcircus.com/"]],
+ text("デジタルサーカス株式会社"),
+ ),
+ ),
+ ),
+ ),
+ el(
+ "section",
+ [],
+ el(
+ "h2",
+ [],
+ text("登壇"),
+ ),
+ el(
+ "ul",
+ [],
+ ...Array.from(slides).sort((a, b) => {
+ const ta = dateToString(getPostCreatedDate(a));
+ const tb = dateToString(getPostCreatedDate(b));
+ if (ta > tb) return -1;
+ if (ta < tb) return 1;
+ return 0;
+ }).map((slide) =>
+ el(
+ "li",
+ [],
+ el(
+ "a",
+ [["href", slide.href]],
+ text(
+ `${
+ dateToString(getPostCreatedDate(slide))
+ }: ${slide.event} (${slide.talkType})`,
+ ),
+ ),
+ )
+ ),
+ ),
+ ),
+ ),
+ ),
+ ),
+ globalFooter(config),
+ );
+
+ const html = await pageLayout(
+ {
+ metaCopyrightYear: config.blog.siteCopyrightYear,
+ metaDescription: "このサイトの著者について",
+ metaKeywords: [],
+ metaTitle: `About | ${config.blog.siteName}`,
+ requiresSyntaxHighlight: false,
+ },
+ body,
+ config,
+ );
+
+ return {
+ root: el("__root__", [], html),
+ renderer: "html",
+ destFilePath: "/about/index.html",
+ href: "/about/",
+ };
+}