aboutsummaryrefslogtreecommitdiffhomepage
path: root/nuldoc-src/components/global_header.ts
blob: 4f7df3b1aea1efa335c948a063bb79fcae0ad831 (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
import { Config } from "../config.ts";
import { el, Element, text } from "../dom.ts";

export function globalHeader(config: Config): Element {
  return el(
    "header",
    [["class", "header"]],
    el(
      "nav",
      [["class", "nav"]],
      el(
        "ul",
        [],
        el(
          "li",
          [["class", "logo"]],
          el("a", [["href", "/"]], text(config.blog.siteName)),
        ),
        el(
          "li",
          [],
          el("a", [["href", "/about"]], text("About")),
        ),
        el(
          "li",
          [],
          el("a", [["href", "/posts"]], text("Posts")),
        ),
        el(
          "li",
          [],
          el("a", [["href", "/slides"]], text("Slides")),
        ),
      ),
    ),
  );
}