From: Lanius Trolling Date: Thu, 15 Jun 2023 15:35:57 +0000 (-0400) Subject: Add Thedish alphabet X-Git-Url: https://gitweb.starshipfights.net/?a=commitdiff_plain;h=963b6aee0f7258390bbb9409bf5209270d9f5223;p=factbooks Add Thedish alphabet --- diff --git a/src/main/kotlin/info/mechyrdia/data/views_comment.kt b/src/main/kotlin/info/mechyrdia/data/views_comment.kt index 904123f..5c6573c 100644 --- a/src/main/kotlin/info/mechyrdia/data/views_comment.kt +++ b/src/main/kotlin/info/mechyrdia/data/views_comment.kt @@ -482,7 +482,16 @@ suspend fun ApplicationCall.commentHelpPage(): HTML.() -> Unit = page("Commentin } } tr { - td { +"[lang=gothic]Gutiska Razda[/lang]" } + td { +"[lang=thedish]Theodisc Rasda[/lang]" } + td { + +"Writes text in the Thedish alphabet: " + span(classes = "lang-thedish") { + +"Theodisc Rasda" + } + } + } + tr { + td { +"[lang=gothic]\uD800\uDF32\uD800\uDF3F\uD800\uDF44\uD800\uDF39\uD800\uDF43\uD800\uDF3A\uD800\uDF30 \uD800\uDF42\uD800\uDF30\uD800\uDF36\uD800\uDF33\uD800\uDF30[/lang]" } td { +"Writes text in the Gothic alphabet: " span(classes = "lang-gothic") { diff --git a/src/main/kotlin/info/mechyrdia/lore/parser_tags.kt b/src/main/kotlin/info/mechyrdia/lore/parser_tags.kt index ac9e139..8aaef54 100644 --- a/src/main/kotlin/info/mechyrdia/lore/parser_tags.kt +++ b/src/main/kotlin/info/mechyrdia/lore/parser_tags.kt @@ -273,8 +273,10 @@ enum class TextParserFormattingTag(val type: TextParserTagType) { val tylan = TylanAlphabet.tylanToFontAlphabet(uncensored) val recensored = TextParserState.censorText(tylan) "$recensored" - } else if (tagParam != null) - "$content" + } else if (tagParam?.equals("thedish", ignoreCase = true) == true) + "$content" + else if (tagParam?.equals("gothic", ignoreCase = true) == true) + "$content" else content } ), @@ -288,7 +290,16 @@ enum class TextParserFormattingTag(val type: TextParserTagType) { |

Tylan Alphabet:

| | - """.trimMargin() + """.trimMargin() + } else if (content.equals("thedish", ignoreCase = true)) { + """ + |
+ |

Latin Alphabet:

+ | + |

Thedish Alphabet:

+ | + |
+ """.trimMargin() } else content } ), diff --git a/src/main/resources/static/font/thedish-language-alphabet.woff b/src/main/resources/static/font/thedish-language-alphabet.woff new file mode 100644 index 0000000..c1100f0 Binary files /dev/null and b/src/main/resources/static/font/thedish-language-alphabet.woff differ diff --git a/src/main/resources/static/init.js b/src/main/resources/static/init.js index 0e5707b..1f4890b 100644 --- a/src/main/resources/static/init.js +++ b/src/main/resources/static/init.js @@ -32,6 +32,19 @@ } }); + window.addEventListener("load", function () { + // Thedish alphabet + const thedishAlphabetBoxes = document.getElementsByClassName("thedish-alphabet-box"); + for (const thedishAlphabetBox of thedishAlphabetBoxes) { + const inputBox = thedishAlphabetBox.getElementsByClassName("input-box")[0]; + const outputBox = thedishAlphabetBox.getElementsByClassName("output-box")[0]; + + inputBox.addEventListener("input", () => { + outputBox.value = inputBox.value; + }); + } + }); + window.addEventListener("load", function () { // Preview themes const themeChoices = document.getElementsByName("theme"); diff --git a/src/main/resources/static/style.css b/src/main/resources/static/style.css index b2d1d20..7452f27 100644 --- a/src/main/resources/static/style.css +++ b/src/main/resources/static/style.css @@ -864,6 +864,10 @@ iframe { text-align: center; } +.lang-gothic { + font-family: 'Noto Sans Gothic', sans-serif; +} + @font-face { font-family: 'Tulasra'; src: url(/static/font/tylan-language-alphabet-3.woff) format('woff'); @@ -882,8 +886,22 @@ textarea.lang-tylan { line-height: 1.0; } -.lang-gothic { - font-family: 'Noto Sans Gothic', sans-serif; +@font-face { + font-family: 'Theodisc'; + src: url(/static/font/thedish-language-alphabet.woff) format('woff'); +} + +.lang-thedish { + font-family: Theodisc, monospace; + font-size: 1.25em; + line-height: 1.0; + font-variant: normal !important; +} + +textarea.lang-thedish { + font-family: Theodisc, monospace; + font-size: 2.5em; + line-height: 1.0; } #thumb-view {