From 803b38eb46507d7f8b7e3ddc4fb5b76b2276099f Mon Sep 17 00:00:00 2001 From: Lanius Trolling Date: Sun, 10 Jul 2022 14:01:03 -0400 Subject: [PATCH] Refactoring and style fixes --- src/main/kotlin/info/mechyrdia/lore/parser_tags.kt | 4 ++-- src/main/kotlin/info/mechyrdia/lore/view_tpl.kt | 2 +- src/main/resources/static/style.css | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/kotlin/info/mechyrdia/lore/parser_tags.kt b/src/main/kotlin/info/mechyrdia/lore/parser_tags.kt index 86aa4a5..3b98e99 100644 --- a/src/main/kotlin/info/mechyrdia/lore/parser_tags.kt +++ b/src/main/kotlin/info/mechyrdia/lore/parser_tags.kt @@ -12,7 +12,7 @@ sealed class TextParserTagType { } @JvmInline -value class TextParserTags private constructor(val tags: Map>) { +value class TextParserTags private constructor(private val tags: Map>) { operator fun get(name: String) = tags[name.lowercase()] companion object { @@ -289,7 +289,7 @@ enum class TextParserFormattingTag(val type: TextParserTagType) { val asTags: TextParserTags get() = TextParserTags(values().associate { it.name to it.type }) - fun sanitizeLink(html: String) = html.replace(Regex("[^#a-zA-Z0-9._\\-]"), "").replace("..", ".") + fun sanitizeLink(html: String) = html.replace(Regex("[^#a-zA-Z\\d\\-._]"), "").replace("..", ".") fun getSizeParam(tagParam: String?): Pair = tagParam?.let { resolution -> val parts = resolution.split('x') diff --git a/src/main/kotlin/info/mechyrdia/lore/view_tpl.kt b/src/main/kotlin/info/mechyrdia/lore/view_tpl.kt index 1572b8b..5c15229 100644 --- a/src/main/kotlin/info/mechyrdia/lore/view_tpl.kt +++ b/src/main/kotlin/info/mechyrdia/lore/view_tpl.kt @@ -18,9 +18,9 @@ fun ApplicationCall.page(pageTitle: String? = null, navBar: List? = nul meta(name = "viewport", content = "width=device-width, initial-scale=1.0") script(src = "/static/gltf-viewer/bower_components/webcomponentsjs/webcomponents-lite.js") {} + link(rel = "import", href = "/static/gltf-viewer/gltf-viewer.html") link(rel = "icon", type = "image/svg+xml", href = "/static/images/icon.svg") - link(rel = "import", href = "/static/gltf-viewer/gltf-viewer.html") link(rel = "preconnect", href = "https://fonts.googleapis.com") link(rel = "preconnect", href = "https://fonts.gstatic.com") { attributes["crossorigin"] = "anonymous" } diff --git a/src/main/resources/static/style.css b/src/main/resources/static/style.css index ac91693..1986f53 100644 --- a/src/main/resources/static/style.css +++ b/src/main/resources/static/style.css @@ -554,7 +554,7 @@ textarea { box-sizing: border-box; background-color: var(--input-bg); border: none; - border-bottom: 0.1em solid var(--input-ul); + border-bottom: 0.15rem solid var(--input-ul); color: var(--input-fg); font-size: 1.5em; @@ -644,13 +644,13 @@ iframe { .lang-tylan { font-family: Tulasra, monospace; - font-size: 1.5em; + font-size: 1.25em; line-height: 1.0; font-variant: normal !important; } textarea.lang-tylan { font-family: Tulasra, monospace; - font-size: 2.25em; + font-size: 2.5em; line-height: 1.0; } -- 2.25.1