From: Lanius Trolling Date: Thu, 16 Jun 2022 20:52:46 +0000 (-0400) Subject: Fix main page title X-Git-Url: https://gitweb.starshipfights.net/?a=commitdiff_plain;h=c72deaf8843a2bce00dd96f90d4a8ce7b8f7c5d3;p=factbooks Fix main page title --- 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() }) }