Sidebar fully functional
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user