Fix quote pages
authorLanius Trolling <lanius@laniustrolling.dev>
Tue, 9 Apr 2024 16:43:54 +0000 (12:43 -0400)
committerLanius Trolling <lanius@laniustrolling.dev>
Tue, 9 Apr 2024 16:43:54 +0000 (12:43 -0400)
src/jvmMain/kotlin/info/mechyrdia/lore/views_quote.kt

index 6dbc735091f7b142b24025d20be092bb178783ee..cffd232a5ef377617cea62ed9b18db101e32d214 100644 (file)
@@ -99,8 +99,8 @@ fun Quote.toJson(): String {
 }
 
 context(Quote)
-private fun FlowContent.quoteWithAttribution() {
-       h1 { +title }
+private fun FlowContent.quoteWithAttribution(pageTitle: String) {
+       h1 { +pageTitle }
        blockQuote {
                +quote
        }
@@ -117,7 +117,7 @@ suspend fun Quote.toHtml(title: String): HTML.() -> Unit {
        return page(title, standardNavBar(), QuoteOriginSidebar(author, fullPortrait, fullLink)) {
                section {
                        a { id = "page-top" }
-                       quoteWithAttribution()
+                       quoteWithAttribution(title)
                }
        }
 }
@@ -125,7 +125,7 @@ suspend fun Quote.toHtml(title: String): HTML.() -> Unit {
 context(ApplicationCall)
 fun Quote.toRawHtml(title: String): HTML.() -> Unit {
        return rawPage(title) {
-               quoteWithAttribution()
+               quoteWithAttribution(title)
                p {
                        style = "align:center"
                        a(href = fullLink) {