From c72deaf8843a2bce00dd96f90d4a8ce7b8f7c5d3 Mon Sep 17 00:00:00 2001 From: Lanius Trolling Date: Thu, 16 Jun 2022 16:52:46 -0400 Subject: [PATCH] Fix main page title --- src/main/kotlin/info/mechyrdia/lore/views_lore.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/info/mechyrdia/lore/views_lore.kt b/src/main/kotlin/info/mechyrdia/lore/views_lore.kt index e0ad344..0a855a4 100644 --- a/src/main/kotlin/info/mechyrdia/lore/views_lore.kt +++ b/src/main/kotlin/info/mechyrdia/lore/views_lore.kt @@ -15,9 +15,11 @@ fun ApplicationCall.loreArticlePage(): HTML.() -> Unit { if (pageFile.isDirectory) { val navbar = standardNavBar(pagePathParts.takeIf { it.isNotEmpty() }) - return page("~/${pagePath}", navbar, null) { + val title = pagePath.takeIf { it.isNotEmpty() }?.let { "~/$it" } ?: "Mechyrdia Infobase" + + return page(title, navbar, null) { section { - h1 { +"~/${pagePath}" } + h1 { +title } ul { pageNode.subNodes.renderInto(this, pagePath.takeIf { it.isNotEmpty() }) } -- 2.25.1