forked from SPC/spc-site
Visual update for language switch
This commit is contained in:
parent
f73fb0c2fb
commit
a1da3f9a5e
4
data/home/content/index.md
Normal file
4
data/home/content/index.md
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
pageName: SPC
|
||||
language: en
|
||||
---
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user