forked from SPC/spc-site
Implement parent context and proper language switch
This commit is contained in:
parent
bf746a4227
commit
f73fb0c2fb
@ -1,7 +1,5 @@
|
||||
package center.sciprog
|
||||
|
||||
import io.ktor.http.URLBuilder
|
||||
import io.ktor.http.appendPathSegments
|
||||
import kotlinx.html.*
|
||||
import space.kscience.dataforge.meta.string
|
||||
import space.kscience.snark.html.*
|
||||
@ -173,8 +171,9 @@ internal fun wrapper(contentBody: FlowContent.() -> Unit) = postprocess {
|
||||
div {
|
||||
languageMap.forEach { (key, meta) ->
|
||||
a(classes = "button primary small") {
|
||||
val pageUrl = URLBuilder(host).appendPathSegments(meta.string ?: "#")
|
||||
href = pageUrl.buildString().removeSuffix("/") //resolveRef(meta.string ?: "#")
|
||||
// val pageUrl = URLBuilder(host).appendPathSegments(meta.string ?: "#")
|
||||
// href = pageUrl.buildString().removeSuffix("/") //resolveRef(meta.string ?: "#")
|
||||
href = page.resolvePageRef(meta.string ?: "#", site.parent!!)
|
||||
+key
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user