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 ->
|
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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user