Change public/private button css
This commit is contained in:
parent
ead1932d48
commit
4ff97044f0
@ -165,30 +165,34 @@ class NoteView(staticFileResolver: StaticFileResolver) : View(staticFileResolver
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun DIV.noteActionForm(note: PersistedNote) {
|
private fun DIV.noteActionForm(note: PersistedNote) {
|
||||||
span("flex space-x-2 justify-end mb-4") {
|
form(method = FormMethod.post, classes = "inline flex space-x-2 justify-end mb-4") {
|
||||||
a(
|
a(
|
||||||
href = "/notes/${note.uuid}/edit",
|
href = "/notes/${note.uuid}/edit",
|
||||||
classes = "btn btn-green"
|
classes = "btn btn-green"
|
||||||
) { +"Edit" }
|
) { +"Edit" }
|
||||||
form(method = FormMethod.post, classes = "inline") {
|
span {
|
||||||
button(
|
button(
|
||||||
type = ButtonType.submit,
|
type = ButtonType.submit,
|
||||||
name = if (note.public) "private" else "public",
|
name = if (note.public) "private" else "public",
|
||||||
classes = "btn btn-teal"
|
classes = "font-semibold border-b-4 ${if (note.public) "border-teal-200" else "border-green-500"}" +
|
||||||
|
" p-2 rounded-l bg-teal-200 text-gray-800"
|
||||||
) {
|
) {
|
||||||
if (note.public)
|
+"Private"
|
||||||
+"Private ?"
|
|
||||||
else
|
|
||||||
+"Public ?"
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
form(method = FormMethod.post, classes = "inline") {
|
|
||||||
button(
|
button(
|
||||||
type = ButtonType.submit,
|
type = ButtonType.submit,
|
||||||
name = "delete",
|
name = if (note.public) "private" else "public",
|
||||||
classes = "btn btn-red"
|
classes = "font-semibold border-b-4 ${if (!note.public) "border-teal-200" else "border-green-500"}" +
|
||||||
) { +"Delete" }
|
" p-2 rounded-r bg-teal-200 text-gray-800"
|
||||||
|
) {
|
||||||
|
+"Public"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
button(
|
||||||
|
type = ButtonType.submit,
|
||||||
|
name = "delete",
|
||||||
|
classes = "btn btn-red"
|
||||||
|
) { +"Delete" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user