Sidebar fully functional

This commit is contained in:
metacryst
2026-03-21 03:10:50 -05:00
parent 1c6f12c210
commit 21b7b0a252
9 changed files with 129 additions and 84 deletions

View File

@@ -1,6 +1,12 @@
import util from "../util"
class Sidebar extends Shadow {
SIDEBAR_WIDTH
constructor(width) {
super()
this.SIDEBAR_WIDTH = width
}
SidebarItem(text) {
return p(text)
@@ -35,8 +41,9 @@ class Sidebar extends Shadow {
.borderRadius(100, pct)
.background("var(--darkaccent)")
.alignSelf("center")
.onTap(() => {
this.openProfile()
.onClick((done) => {
if(done)
this.openProfile()
})
h2(global.profile.first_name + " " + global.profile.last_name)
@@ -50,8 +57,9 @@ class Sidebar extends Shadow {
.wordBreak("break-word")
.width(100, pct)
.borderBottom("2px solid var(--divider)")
.onTap(() => {
this.openProfile()
.onClick((done) => {
if(done)
this.openProfile()
})
this.SidebarItem("Logout")
@@ -63,7 +71,7 @@ class Sidebar extends Shadow {
.top(-5, vh)
.minWidth(0)
.boxSizing("border-box")
.width((window.outerWidth / 3) * 2, px)
.width(this.SIDEBAR_WIDTH, px)
.borderLeft("1px solid var(--divider)")
.color("var(--text)")
.position("fixed")