UI improvements

This commit is contained in:
2020-08-23 00:10:50 +02:00
parent 4ffa565626
commit d70663b898
5 changed files with 10 additions and 8 deletions
+5 -3
View File
@@ -24,7 +24,7 @@ class UserView(staticFileResolver: StaticFileResolver) : View(staticFileResolver
"Register"
) {
+"Already have an account? "
a(href = "/login", classes = "no-underline text-blue-500 font-bold") { +"Sign In" }
a(href = "/login", classes = "no-underline text-blue-500 hover:text-blue-400 font-bold") { +"Sign In" }
}
fun login(
@@ -34,7 +34,9 @@ class UserView(staticFileResolver: StaticFileResolver) : View(staticFileResolver
new: Boolean = false,
) = accountForm("Login", "Login page", jwtPayload, error, validationErrors, "Sign In", "Sign In", new) {
+"Don't have an account yet? "
a(href = "/register", classes = "no-underline text-blue-500 font-bold") { +"Create an account" }
a(href = "/register", classes = "no-underline text-blue-500 hover:text-blue-400 font-bold") {
+"Create an account"
}
}
private fun accountForm(
@@ -50,8 +52,8 @@ class UserView(staticFileResolver: StaticFileResolver) : View(staticFileResolver
) = renderPage(title = title, description, jwtPayload = jwtPayload) {
div("centered container mx-auto flex justify-center items-center") {
div("w-full md:w-1/2 lg:w-1/3 m-4") {
h1("font-semibold text-lg mb-6 text-center") { +h1 }
div("p-8 mb-6") {
h1("font-semibold text-lg mb-6 text-center") { +h1 }
if (new) alert(Alert.Success, "Your account has been created")
error?.let { alert(Alert.Warning, error) }
form(method = FormMethod.post) {