aboutsummaryrefslogtreecommitdiffhomepage
path: root/services/nuldoc/nuldoc-src/pages/HomePage.ts
blob: 6e984586210ce4aaf5cca67901b76e5af32f7e50 (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
import GlobalFooter from "../components/GlobalFooter.ts";
import GlobalHeader from "../components/DefaultGlobalHeader.ts";
import PageLayout from "../components/PageLayout.ts";
import { Config } from "../config.ts";
import { a, article, elem, Element, h2, header } from "../dom.ts";

export default async function HomePage(config: Config): Promise<Element> {
  return await PageLayout({
    metaCopyrightYear: config.site.copyrightYear,
    metaDescription: "nsfisis のサイト",
    metaTitle: config.sites.default.siteName,
    metaAtomFeedHref: `https://${config.sites.default.fqdn}/atom.xml`,
    site: "default",
    config,
    children: elem(
      "body",
      { class: "single" },
      GlobalHeader({ config }),
      elem(
        "main",
        { class: "main" },
        article(
          { class: "post-single" },
          article(
            { class: "post-entry" },
            a(
              { href: `https://${config.sites.about.fqdn}/` },
              header(
                { class: "entry-header" },
                h2({}, "About"),
              ),
            ),
          ),
          article(
            { class: "post-entry" },
            a(
              { href: `https://${config.sites.blog.fqdn}/posts/` },
              header({ class: "entry-header" }, h2({}, "Blog")),
            ),
          ),
          article(
            { class: "post-entry" },
            a(
              { href: `https://${config.sites.slides.fqdn}/slides/` },
              header(
                { class: "entry-header" },
                h2({}, "Slides"),
              ),
            ),
          ),
          article(
            { class: "post-entry" },
            a(
              { href: `https://repos.${config.sites.default.fqdn}/` },
              header(
                { class: "entry-header" },
                h2({}, "Repositories"),
              ),
            ),
          ),
        ),
      ),
      GlobalFooter({ config }),
    ),
  });
}