summaryrefslogtreecommitdiffhomepage
path: root/vhosts/blog/nuldoc-src/pages/about.tsx
blob: ea74fa32c3c53b453eeffd6bd8c94641385a12a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
import GlobalFooter from "../components/GlobalFooter.tsx";
import GlobalHeader from "../components/GlobalHeader.tsx";
import PageLayout from "../components/PageLayout.tsx";
import StaticScript from "../components/StaticScript.tsx";
import { Config } from "../config.ts";
import { el } from "../dom.ts";
import { renderToDOM } from "../jsx/render.ts";
import { Page } from "../page.ts";
import { dateToString } from "../revision.ts";
import { getPostPublishedDate } from "./post.tsx";
import { SlidePage } from "./slide.tsx";

export type AboutPage = Page;

export async function generateAboutPage(
  slides: SlidePage[],
  config: Config,
): Promise<AboutPage> {
  const html = await renderToDOM(
    <PageLayout
      metaCopyrightYear={config.blog.siteCopyrightYear}
      metaDescription="このサイトの著者について"
      metaTitle={`About|${config.blog.siteName}`}
      config={config}
    >
      <body className="single">
        <GlobalHeader config={config} />
        <main className="main">
          <article className="post-single">
            <header className="post-header">
              <h1 className="post-title">nsfisis</h1>
              <div className="my-icon">
                <StaticScript fileName="/p5.min.js" config={config} />
                <StaticScript fileName="/my-icon.js" config={config} />
                <div id="p5jsMyIcon" />
                <noscript>
                  <img src="/favicon.svg" />
                </noscript>
              </div>
            </header>
            <div className="post-content">
              <section>
                <h2>読み方</h2>
                <p>
                  読み方は決めていません。音にする必要があるときは本名である「いまむら」をお使いください。
                </p>
              </section>
              <section>
                <h2>アカウント</h2>
                <ul>
                  <li>
                    <a href="https://twitter.com/nsfisis">
                      Twitter (現 𝕏): @nsfisis
                    </a>
                  </li>
                  <li>
                    <a href="https://github.com/nsfisis">GitHub: @nsfisis</a>
                  </li>
                </ul>
              </section>
              <section>
                <h2>仕事</h2>
                <ul>
                  <li>
                    {"2021-01~現在: "}
                    <a href="https://www.dgcircus.com/">
                      デジタルサーカス株式会社
                    </a>
                  </li>
                </ul>
              </section>
              <section>
                <h2>登壇</h2>
                <ul>
                  {Array.from(slides).sort((a, b) => {
                    const ta = dateToString(getPostPublishedDate(a));
                    const tb = dateToString(getPostPublishedDate(b));
                    if (ta > tb) return -1;
                    if (ta < tb) return 1;
                    return 0;
                  }).map((slide) => (
                    <li>
                      <a href={slide.href}>
                        {`${
                          dateToString(getPostPublishedDate(slide))
                        }: ${slide.event} (${slide.talkType})`}
                      </a>
                    </li>
                  ))}
                </ul>
              </section>
            </div>
          </article>
        </main>
        <GlobalFooter config={config} />
      </body>
    </PageLayout>,
  );

  return {
    root: el("__root__", {}, html),
    renderer: "html",
    destFilePath: "/about/index.html",
    href: "/about/",
  };
}