From 4984e488ae20142df8d42c4ad924a67caf7be65c Mon Sep 17 00:00:00 2001 From: Hubert Van De Walle Date: Fri, 14 Aug 2020 21:24:50 +0200 Subject: [PATCH] Add /settings link --- app/src/main/kotlin/views/components/Navbar.kt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/views/components/Navbar.kt b/app/src/main/kotlin/views/components/Navbar.kt index 4653e00..8962994 100644 --- a/app/src/main/kotlin/views/components/Navbar.kt +++ b/app/src/main/kotlin/views/components/Navbar.kt @@ -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) {