renaming, spawning forms if it does not exist, simplifying

This commit is contained in:
metacryst
2025-12-28 06:49:04 -06:00
parent 97bd02c59a
commit 263a9795b9
17 changed files with 293 additions and 230 deletions

36
cave/components/Home.js Normal file
View File

@@ -0,0 +1,36 @@
import "./NavMenu.js"
import "./HomePanel.js"
import "./DownloadsPanel.js"
class Home extends Shadow {
render() {
ZStack(() => {
NavMenu()
switch(window.location.pathname) {
case "/":
HomePanel()
break;
case "/downloads":
DownloadsPanel()
break;
}
})
.backgroundColor("var(--main)")
.display("block")
.width(100, vw).height("auto")
.color("var(--accent)")
.fontFamily("Arial")
.onAppear(() => {
document.body.style.backgroundColor = "var(--main)"
})
.onNavigate(() => {
console.log("navved")
this.rerender()
})
}
}
register(Home)