aboutsummaryrefslogtreecommitdiffhomepage
path: root/nuldoc-src/pages/slide_list.ts
diff options
context:
space:
mode:
Diffstat (limited to 'nuldoc-src/pages/slide_list.ts')
-rw-r--r--nuldoc-src/pages/slide_list.ts44
1 files changed, 3 insertions, 41 deletions
diff --git a/nuldoc-src/pages/slide_list.ts b/nuldoc-src/pages/slide_list.ts
index 9c375f3..18bea1f 100644
--- a/nuldoc-src/pages/slide_list.ts
+++ b/nuldoc-src/pages/slide_list.ts
@@ -1,10 +1,11 @@
import { globalFooter } from "../components/global_footer.ts";
import { globalHeader } from "../components/global_header.ts";
import { pageLayout } from "../components/page_layout.ts";
+import { slidePageEntry } from "../components/slide_page_entry.ts";
import { Config } from "../config.ts";
import { el, text } from "../dom.ts";
import { Page } from "../page.ts";
-import { getPostCreatedDate, getPostUpdatedDate } from "./post.ts";
+import { getPostCreatedDate } from "./post.ts";
import { SlidePage } from "./slide.ts";
export type SlideListPage = Page;
@@ -37,46 +38,7 @@ export async function generateSlideListPage(
if (ta > tb) return -1;
if (ta < tb) return 1;
return 0;
- }).map((slide) =>
- el(
- "article",
- [["class", "post-entry"]],
- el(
- "a",
- [["href", slide.href]],
- el(
- "header",
- [["class", "entry-header"]],
- el("h2", [], text(`登壇: ${slide.event} (${slide.talkType})`)),
- ),
- el(
- "section",
- [["class", "entry-content"]],
- el("p", [], text(slide.title)),
- ),
- el(
- "footer",
- [["class", "entry-footer"]],
- el(
- "time",
- [["datetime", getPostCreatedDate(slide)]],
- text(getPostCreatedDate(slide)),
- ),
- text(" 登壇"),
- ...(slide.revisions.length > 1
- ? [
- text("、"),
- el("time", [[
- "datetime",
- getPostUpdatedDate(slide),
- ]], text(getPostUpdatedDate(slide))),
- text(" 更新"),
- ]
- : []),
- ),
- ),
- )
- ),
+ }).map((slide) => slidePageEntry(slide)),
),
globalFooter(config),
);