basic sidebar toggle

This commit is contained in:
metacryst
2026-02-06 06:41:54 -06:00
parent a68f35faf5
commit 6cbb4c8dad

View File

@@ -8,6 +8,22 @@ class Home extends Shadow {
render() { render() {
ZStack(() => { ZStack(() => {
img("/_/icons/hamburger.svg", "3em")
.position("absolute")
.zIndex(2)
.left(2, em)
.top(2, em)
.onTouch(function (start) {
console.log("touch", start)
if(start) {
this.style.scale = "0.8"
} else if(start === false) {
this.style.scale = ""
$("sidebar-").toggle()
}
})
Sidebar() Sidebar()
ZStack(() => { ZStack(() => {
@@ -32,6 +48,8 @@ class Home extends Shadow {
AppMenu() AppMenu()
}) })
.backgroundColor("var(--main)")
.overflowX("hidden") .overflowX("hidden")
} }
} }