summaryrefslogtreecommitdiffhomepage
path: root/vhosts/blog/nuldoc-src/components/global_header.ts
blob: 93ff5ec9bcc71378650a159012a88d9e3157b9b4 (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
import { Config } from "../config.ts";
import { el, Element } from "../dom.ts";

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