32 lines
980 B
Kotlin
32 lines
980 B
Kotlin
package be.simplenotes.app.views.components
|
|
|
|
import kotlinx.html.*
|
|
import kotlinx.html.ButtonType.submit
|
|
import kotlinx.html.FormMethod.post
|
|
|
|
fun DIV.noteListHeader(numberOfDeletedNotes: Int) {
|
|
div("flex justify-between mb-4") {
|
|
h1("text-2xl underline") { +"Notes" }
|
|
span {
|
|
a(
|
|
href = "/notes/trash",
|
|
classes = "underline font-semibold"
|
|
) { +"Trash ($numberOfDeletedNotes)" }
|
|
a(
|
|
href = "/notes/new",
|
|
classes = "ml-2 btn btn-green"
|
|
) { +"New" }
|
|
}
|
|
}
|
|
form(method = post, classes = "mb-4") {
|
|
val colors = "bg-gray-800 border-gray-700 focus:border-teal-500 text-white"
|
|
input(
|
|
name = "search",
|
|
classes = "$colors rounded w-3/4 border appearance-none focus:outline-none text-base p-2"
|
|
)
|
|
button(type = submit, classes = "btn btn-green w-1/4") {
|
|
+"search"
|
|
}
|
|
}
|
|
}
|