Add /settings link

This commit is contained in:
Hubert Van De Walle 2020-08-14 21:24:50 +02:00
parent 662d6c706b
commit 4984e488ae

View File

@ -8,8 +8,14 @@ fun BODY.navbar(jwtPayload: JwtPayload?) {
a(href = "/", classes = "text-2xl text-gray-100 font-bold") { +"SimpleNotes" }
ul("space-x-2") {
if (jwtPayload != null) {
li("inline text-gray-100 text-md font-semibold") {
a(href = "/notes") { +"Notes" }
val links = listOf(
"/notes" to "Notes",
"/settings" to "Settings",
)
links.forEach { (href, name) ->
li("inline text-gray-100 text-md font-semibold") {
a(href = href) { +name }
}
}
li("inline") {
form(classes = "inline", action = "/logout", method = FormMethod.post) {