aboutsummaryrefslogtreecommitdiffhomepage
path: root/nuldoc-src/components/global_header.ts
diff options
context:
space:
mode:
Diffstat (limited to 'nuldoc-src/components/global_header.ts')
-rw-r--r--nuldoc-src/components/global_header.ts37
1 files changed, 37 insertions, 0 deletions
diff --git a/nuldoc-src/components/global_header.ts b/nuldoc-src/components/global_header.ts
new file mode 100644
index 0000000..4f7df3b
--- /dev/null
+++ b/nuldoc-src/components/global_header.ts
@@ -0,0 +1,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")),
+ ),
+ ),
+ ),
+ );
+}