From: Lanius Trolling Date: Thu, 25 Apr 2024 10:46:50 +0000 (-0400) Subject: Icon changes and fixes X-Git-Url: https://gitweb.starshipfights.net/?a=commitdiff_plain;h=e9f6e2e5e8226048ce4f5885b1fc8222401231c0;p=factbooks Icon changes and fixes --- diff --git a/src/jvmMain/kotlin/info/mechyrdia/lore/ViewTpl.kt b/src/jvmMain/kotlin/info/mechyrdia/lore/ViewTpl.kt index c5ac244..3b27b41 100644 --- a/src/jvmMain/kotlin/info/mechyrdia/lore/ViewTpl.kt +++ b/src/jvmMain/kotlin/info/mechyrdia/lore/ViewTpl.kt @@ -1,5 +1,6 @@ package info.mechyrdia.lore +import info.mechyrdia.robot.toQueryString import info.mechyrdia.route.ErrorMessageAttributeKey import io.ktor.http.* import io.ktor.server.application.* @@ -30,7 +31,6 @@ private val preloadFonts = listOf( private val preloadImages = listOf( "external-link-dark.png", "external-link.png", - "icon.png", ) context(ApplicationCall) @@ -44,7 +44,8 @@ private fun HEAD.initialHead(pageTitle: String, ogData: OpenGraphData?) { renderOgData(pageTitle, data) } - link(rel = "icon", type = "image/svg+xml", href = "/static/images/icon.png") + link(rel = "icon", type = "image/png", href = "/static/images/icon.png") + link(rel = "icon", type = "image/svg+xml", href = "/static/images/icon.svg") title { +pageTitle @@ -153,9 +154,7 @@ fun ApplicationCall.page(pageTitle: String, navBar: List? = null, sideb id = "error-popup" val paramsWithoutError = parametersOf(request.queryParameters.toMap() - "error") - val newQueryString = if (paramsWithoutError.isEmpty()) - "" - else "?${paramsWithoutError.formUrlEncode()}" + val newQueryString = paramsWithoutError.toQueryString() attributes["data-redirect-url"] = "${request.path()}$newQueryString" div(classes = "bg") diff --git a/src/jvmMain/resources/static/images/icon.png b/src/jvmMain/resources/static/images/icon.png index 6e083e7..063b570 100644 Binary files a/src/jvmMain/resources/static/images/icon.png and b/src/jvmMain/resources/static/images/icon.png differ diff --git a/src/jvmMain/resources/static/images/icon.svg b/src/jvmMain/resources/static/images/icon.svg new file mode 100644 index 0000000..71d1bd4 --- /dev/null +++ b/src/jvmMain/resources/static/images/icon.svg @@ -0,0 +1,38 @@ + + + + + + + + + + + + + diff --git a/stuff/icon.png b/stuff/icon.png new file mode 100644 index 0000000..063b570 Binary files /dev/null and b/stuff/icon.png differ diff --git a/stuff/icon.svg b/stuff/icon.svg new file mode 100644 index 0000000..71d1bd4 --- /dev/null +++ b/stuff/icon.svg @@ -0,0 +1,38 @@ + + + + + + + + + + + + + diff --git a/stuff/map-index.html b/stuff/map-index.html index bd7ed0a..05617e8 100644 --- a/stuff/map-index.html +++ b/stuff/map-index.html @@ -35,7 +35,8 @@ - + +