auto button creation (dont work yet)
This commit is contained in:
parent
badf22579b
commit
a1f12881ac
|
@ -1,5 +1,4 @@
|
|||
import happyx, navButton
|
||||
|
||||
import os, happyx, navButton
|
||||
component Nav:
|
||||
`template`:
|
||||
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"
|
||||
tUl(class="list-none"):
|
||||
component NavButton("Home", "/")
|
||||
component NavButton("Test Article", "/test")
|
||||
component NavButton("Page does not exist", "/404")
|
||||
# component NavButton("Test Article", "/test")
|
||||
# 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…
Reference in a new issue