33 lines
876 B
JavaScript
33 lines
876 B
JavaScript
class SignIn extends Shadow {
|
|
|
|
inputStyles(el) {
|
|
console.log(el)
|
|
return el
|
|
.border("1px solid var(--accent)")
|
|
}
|
|
|
|
render() {
|
|
ZStack(() => {
|
|
if(window.location.search.includes("new")) {
|
|
p("Welcome to Hyperia! You may now log in.")
|
|
.x(50, vw).y(40, vh)
|
|
.center()
|
|
}
|
|
|
|
form(() => {
|
|
input("Email")
|
|
.attr({name: "email", type: "email"})
|
|
.styles(this.inputStyles)
|
|
input("Password")
|
|
.attr({name: "password", type: "password"})
|
|
.styles(this.inputStyles)
|
|
button("Submit")
|
|
})
|
|
.attr({action: "/login", method: "POST"})
|
|
.x(50, vw).y(50, vh)
|
|
.center()
|
|
})
|
|
}
|
|
}
|
|
|
|
register(SignIn) |