renaming, spawning forms if it does not exist, simplifying
This commit is contained in:
36
cave/components/Home.js
Normal file
36
cave/components/Home.js
Normal 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)
|
||||
Reference in New Issue
Block a user