main #3
1 changed files with 11 additions and 4 deletions
|
@ -1,5 +1,4 @@
|
||||||
import happyx, navButton
|
import os, happyx, navButton
|
||||||
|
|
||||||
component Nav:
|
component Nav:
|
||||||
`template`:
|
`template`:
|
||||||
tNav(class="text-center text-white w-64 max-md:w-32 max-sm:w-full bg-black"):
|
tNav(class="text-center text-white w-64 max-md:w-32 max-sm:w-full bg-black"):
|
||||||
|
@ -7,5 +6,13 @@ component Nav:
|
||||||
"Sidebar"
|
"Sidebar"
|
||||||
tUl(class="list-none"):
|
tUl(class="list-none"):
|
||||||
component NavButton("Home", "/")
|
component NavButton("Home", "/")
|
||||||
component NavButton("Test Article", "/test")
|
# component NavButton("Test Article", "/test")
|
||||||
component NavButton("Page does not exist", "/404")
|
# component NavButton("Example Article", "/Example 1")
|
||||||
|
# component NavButton("Example 2 Article", "/Example 2")
|
||||||
|
# component NavButton("Page does not exist", "/404")
|
||||||
|
|
||||||
|
# TODO: automatically create a button for each html file in /src/public/Blog
|
||||||
|
|
||||||
|
for kind, path in walkDir("/src/public/Blog"):
|
||||||
|
if kind == pcFile:
|
||||||
|
component NavButton(path, path)
|
Loading…
Add table
Reference in a new issue