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
|
import { el, Element, text } from "../dom.ts";
import { getPostCreatedDate, getPostUpdatedDate } from "../pages/post.ts";
import { SlidePage } from "../pages/slide.ts";
import { dateToString } from "../revision.ts";
export function slidePageEntry(slide: SlidePage): Element {
return 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", dateToString(getPostCreatedDate(slide))]],
text(dateToString(getPostCreatedDate(slide))),
),
text(" 登壇"),
...(slide.revisions.length > 1
? [
text("、"),
el("time", [[
"datetime",
dateToString(getPostUpdatedDate(slide)),
]], text(dateToString(getPostUpdatedDate(slide)))),
text(" 更新"),
]
: []),
),
),
);
}
|