responsive app menu

This commit is contained in:
metacryst
2025-10-29 16:03:47 -05:00
parent 6d46875546
commit 0e36cd30cc
8 changed files with 104 additions and 76 deletions

View File

@@ -3,12 +3,6 @@ import "./AppMenu.js"
import "./ProfileButton.js"
import "./InputBox.js"
import "./Sidebar.js"
css(`
#divider.minimized {
display: none;
}
`)
class Home extends Shadow {
@@ -23,7 +17,24 @@ class Home extends Shadow {
.backgroundPosition("48% 65%")
.backgroundRepeat("no-repeat")
AppWindow()
switch(window.location.pathname) {
case "/":
AppWindow()
AppMenu()
break
case "/app/forum":
AppWindow("Forum")
AppMenu("Forum")
break;
case "/app/messages":
AppWindow("Messages")
AppMenu("Messages")
break;
case "/app/market":
AppWindow("Market")
AppMenu("Market")
break;
}
ProfileButton()
.zIndex(1)
@@ -44,15 +55,6 @@ class Home extends Shadow {
.background("var(--tan)")
.color("var(--red)")
.borderRadius(5, px)
AppMenu()
img("_/images/divider.svg", "40vw")
.attr({"id": "divider"})
.position("fixed")
.bottom("2em")
.left("50vw")
.transform("translateX(-50%)")
})
}