diff options
Diffstat (limited to 'vhosts/blog/nuldoc-src/components/global_header.ts')
| -rw-r--r-- | vhosts/blog/nuldoc-src/components/global_header.ts | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/vhosts/blog/nuldoc-src/components/global_header.ts b/vhosts/blog/nuldoc-src/components/global_header.ts new file mode 100644 index 00000000..a5130612 --- /dev/null +++ b/vhosts/blog/nuldoc-src/components/global_header.ts @@ -0,0 +1,42 @@ +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", + [], + 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")), + ), + el( + "li", + [], + el("a", [["href", "/tags/"]], text("Tags")), + ), + ), + ), + ); +} |
