aboutsummaryrefslogtreecommitdiffhomepage
path: root/services/nuldoc/nuldoc-src/components/BlogGlobalHeader.ts
blob: ae0fc13ad63dffe3287fbc1bcea03659b7ba7f07 (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
import { Config } from "../config.ts";
import { a, div, Element, header, li, nav, ul } from "../dom.ts";

export default function GlobalHeader({ config }: { config: Config }): Element {
  return header(
    { class: "header" },
    div(
      { class: "site-logo" },
      a(
        { href: `https://${config.sites.default.fqdn}/` },
        "nsfisis.dev",
      ),
    ),
    div({ class: "site-name" }, config.sites.blog.siteName),
    nav(
      { class: "nav" },
      ul(
        {},
        li(
          {},
          a({ href: `https://${config.sites.about.fqdn}/` }, "About"),
        ),
        li({}, a({ href: "/posts/" }, "Posts")),
        li({}, a({ href: "/tags/" }, "Tags")),
      ),
    ),
  );
}