Visual update for language switch

This commit is contained in:
Alexander Nozik 2024-02-29 19:54:03 +03:00
parent f73fb0c2fb
commit a1da3f9a5e
2 changed files with 11 additions and 4 deletions

View File

@ -0,0 +1,4 @@
---
pageName: SPC
language: en
---

View File

@ -169,10 +169,13 @@ internal fun wrapper(contentBody: FlowContent.() -> Unit) = postprocess {
languageMap.takeIf { it.size > 1 }?.let { languageMap ->
div {
languageMap.forEach { (key, meta) ->
a(classes = "button primary small") {
// val pageUrl = URLBuilder(host).appendPathSegments(meta.string ?: "#")
// href = pageUrl.buildString().removeSuffix("/") //resolveRef(meta.string ?: "#")
languageMap.entries.forEachIndexed { index, (key, meta) ->
if (index != 0) {
a {
+"/"
}
}
a {
href = page.resolvePageRef(meta.string ?: "#", site.parent!!)
+key
}