diff options
| author | nsfisis <nsfisis@gmail.com> | 2023-03-18 23:41:47 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2023-03-18 23:41:47 +0900 |
| commit | 0e5fff11e9a455273dad77fc26796af03ddf08d3 (patch) | |
| tree | 756437340bc46afb912595750caace2f4dc88cf6 /nuldoc-src | |
| parent | 3f82b71a657d8b8218ed468acf0552f29cfd1dd0 (diff) | |
| download | blog.nsfisis.dev-0e5fff11e9a455273dad77fc26796af03ddf08d3.tar.gz blog.nsfisis.dev-0e5fff11e9a455273dad77fc26796af03ddf08d3.tar.zst blog.nsfisis.dev-0e5fff11e9a455273dad77fc26796af03ddf08d3.zip | |
feat(content): write contents in about page
Diffstat (limited to 'nuldoc-src')
| -rw-r--r-- | nuldoc-src/commands/build.ts | 6 | ||||
| -rw-r--r-- | nuldoc-src/pages/about.ts | 100 |
2 files changed, 101 insertions, 5 deletions
diff --git a/nuldoc-src/commands/build.ts b/nuldoc-src/commands/build.ts index 38af80a..f4cb013 100644 --- a/nuldoc-src/commands/build.ts +++ b/nuldoc-src/commands/build.ts @@ -29,7 +29,7 @@ export async function runBuildCommand(config: Config) { const tags = await buildTagPages(posts, slides, config); await buildTagListPage(tags, config); await buildHomePage(config); - await buildAboutPage(config); + await buildAboutPage(slides, config); await buildNotFoundPage(config); await copyStaticFiles(config); await copyAssetFiles(slides, config); @@ -114,8 +114,8 @@ async function buildHomePage(config: Config) { await writePage(homePage, config); } -async function buildAboutPage(config: Config) { - const aboutPage = await generateAboutPage(config); +async function buildAboutPage(slides: SlidePage[], config: Config) { + const aboutPage = await generateAboutPage(slides, config); await writePage(aboutPage, config); } diff --git a/nuldoc-src/pages/about.ts b/nuldoc-src/pages/about.ts index ab60c2b..d76b7b5 100644 --- a/nuldoc-src/pages/about.ts +++ b/nuldoc-src/pages/about.ts @@ -4,10 +4,15 @@ import { pageLayout } from "../components/page_layout.ts"; import { Config } from "../config.ts"; import { el, text } from "../dom.ts"; import { Page } from "../page.ts"; +import { getPostCreatedDate } from "./post.ts"; +import { SlidePage } from "./slide.ts"; export type AboutPage = Page; -export async function generateAboutPage(config: Config): Promise<AboutPage> { +export async function generateAboutPage( + slides: SlidePage[], + config: Config, +): Promise<AboutPage> { const body = el( "body", [["class", "single"]], @@ -30,7 +35,98 @@ export async function generateAboutPage(config: Config): Promise<AboutPage> { el( "div", [["class", "post-content"]], - text("WIP"), + el( + "section", + [], + el( + "h2", + [], + text("名前"), + ), + el("p", [], text("nsfisis (いまむら)")), + ), + 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", + [], + ...slides.map((slide) => + el( + "li", + [], + el( + "a", + [["href", slide.href]], + text( + `${ + getPostCreatedDate(slide) + }: ${slide.event} (${slide.talkType})`, + ), + ), + ) + ), + ), + ), ), ), ), |
