1
0
forked from SPC/spc-site

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 -> languageMap.takeIf { it.size > 1 }?.let { languageMap ->
div { div {
languageMap.forEach { (key, meta) -> languageMap.entries.forEachIndexed { index, (key, meta) ->
a(classes = "button primary small") { if (index != 0) {
// val pageUrl = URLBuilder(host).appendPathSegments(meta.string ?: "#") a {
// href = pageUrl.buildString().removeSuffix("/") //resolveRef(meta.string ?: "#") +"/"
}
}
a {
href = page.resolvePageRef(meta.string ?: "#", site.parent!!) href = page.resolvePageRef(meta.string ?: "#", site.parent!!)
+key +key
} }