More buttons
This commit is contained in:
parent
90f6709885
commit
fb49d45677
@ -104,18 +104,16 @@ class NoteView(staticFileResolver: StaticFileResolver) : View(staticFileResolver
|
||||
}
|
||||
}
|
||||
}
|
||||
span("flex justify-end mb-4") {
|
||||
span("flex space-x-2 justify-end mb-4") {
|
||||
a(
|
||||
href = "/notes/${note.uuid}/edit",
|
||||
classes = "mx-2 bg-teal-500 hover:bg-teal-600 focus:bg-teal-600" +
|
||||
" focus:outline-none text-white font-bold py-2 px-4 rounded"
|
||||
classes = "btn btn-teal"
|
||||
) { +"Edit" }
|
||||
form(method = FormMethod.post, classes = "inline") {
|
||||
button(
|
||||
type = ButtonType.submit,
|
||||
name = "delete",
|
||||
classes = "mx-2 bg-red-500 hover:bg-red-600 focus:bg-red-600" +
|
||||
" focus:outline-none text-white font-bold py-2 px-4 rounded"
|
||||
classes = "btn btn-red"
|
||||
) { +"Delete" }
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,18 +6,18 @@ import kotlinx.html.*
|
||||
fun BODY.navbar(jwtPayload: JwtPayload?) {
|
||||
nav("nav bg-teal-700 shadow-md flex items-center justify-between px-4") {
|
||||
a(href = "/", classes = "text-2xl text-gray-100 font-bold") { +"SimpleNotes" }
|
||||
ul {
|
||||
ul("space-x-2") {
|
||||
if (jwtPayload != null) {
|
||||
li("inline text-gray-100 ml-2 text-md font-semibold") {
|
||||
li("inline text-gray-100 text-md font-semibold") {
|
||||
a(href = "/notes") { +"Notes" }
|
||||
}
|
||||
li("inline ml-2") {
|
||||
li("inline") {
|
||||
form(classes = "inline", action = "/logout", method = FormMethod.post) {
|
||||
button(type = ButtonType.submit, classes = "btn btn-green") { +"Logout" }
|
||||
}
|
||||
}
|
||||
} else {
|
||||
li("inline pl-2") {
|
||||
li("inline") {
|
||||
a(href = "/login", classes = "btn btn-green") { +"Sign In" }
|
||||
}
|
||||
}
|
||||
|
||||
@ -34,6 +34,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
.btn-red {
|
||||
@apply bg-red-500 text-white;
|
||||
|
||||
&:focus {
|
||||
@apply bg-red-600;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
@apply bg-red-600;
|
||||
}
|
||||
}
|
||||
|
||||
.nav {
|
||||
height: 64px;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user