rea-add profile button
This commit is contained in:
@@ -51,37 +51,39 @@ class Home extends Shadow {
|
||||
throw new Error("Unknown route!")
|
||||
}
|
||||
|
||||
ProfileButton()
|
||||
.zIndex(1)
|
||||
.cursor("default")
|
||||
.position("fixed")
|
||||
.top(5.5, vh)
|
||||
.right(4.5, vw)
|
||||
|
||||
a("/signout", "Sign Out")
|
||||
.position("fixed")
|
||||
.top(5, vh)
|
||||
.right(2, em)
|
||||
.background("transparent")
|
||||
.border(window.location.pathname === "/" ? "1px solid var(--tan)" : "0.5px solid #bb7c36")
|
||||
.color(window.location.pathname === "/" ? "var(--tan)" : "var(--accent)")
|
||||
.borderRadius(5, px)
|
||||
.onHover(function (hovering) {
|
||||
if(hovering) {
|
||||
this.style.background = "var(--green)"
|
||||
} else {
|
||||
this.style.background = ""
|
||||
}
|
||||
})
|
||||
.onNavigate(function () {
|
||||
if(window.location.pathname === "/") {
|
||||
this.style.border = "1px solid var(--tan)"
|
||||
this.style.color = "var(--tan)"
|
||||
} else {
|
||||
this.style.border = "0.5px solid #bb7c36"
|
||||
this.style.color = "var(--accent)"
|
||||
}
|
||||
})
|
||||
HStack(() => {
|
||||
ProfileButton()
|
||||
.zIndex(1)
|
||||
.cursor("default")
|
||||
|
||||
a("/signout", "Sign Out")
|
||||
.background("transparent")
|
||||
.border(window.location.pathname === "/" ? "1px solid var(--tan)" : "0.5px solid #bb7c36")
|
||||
.color(window.location.pathname === "/" ? "var(--tan)" : "var(--accent)")
|
||||
.borderRadius(5, px)
|
||||
.onHover(function (hovering) {
|
||||
if(hovering) {
|
||||
this.style.background = "var(--green)"
|
||||
} else {
|
||||
this.style.background = ""
|
||||
}
|
||||
})
|
||||
.onNavigate(function () {
|
||||
if(window.location.pathname === "/") {
|
||||
this.style.border = "1px solid var(--tan)"
|
||||
this.style.color = "var(--tan)"
|
||||
} else {
|
||||
this.style.border = "0.5px solid #bb7c36"
|
||||
this.style.color = "var(--accent)"
|
||||
}
|
||||
})
|
||||
})
|
||||
.gap(1, em)
|
||||
.xRight(2, em).y(2.3, em)
|
||||
.position("fixed")
|
||||
.alignVertical("center")
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user