Update to match upstream

This commit is contained in:
Alexander Nozik 2024-04-30 19:03:41 +03:00
parent 7e7a89424c
commit 7d2a2ead3f

View File

@ -5,9 +5,6 @@ import kotlinx.html.*
import space.kscience.dataforge.data.Data
import space.kscience.dataforge.data.await
import space.kscience.dataforge.data.getByType
import space.kscience.dataforge.io.Binary
import space.kscience.dataforge.io.readWith
import space.kscience.dataforge.io.yaml.YamlMetaFormat
import space.kscience.dataforge.meta.Meta
import space.kscience.dataforge.meta.get
import space.kscience.dataforge.meta.getIndexed
@ -72,7 +69,7 @@ private val ENROLL_PATH: Name = CONTENT_NODE_NAME + "enroll"
private val CONTACTS_PATH: Name = CONTENT_NODE_NAME + "contacts"
private val PROGRAM_PATH: Name = CONTENT_NODE_NAME + "program"
private val RECOMMENDED_COURSES_PATH: Name = CONTENT_NODE_NAME + "recommendedCourses"
private val PARTNERS_PATH: Name = CONTENT_NODE_NAME + "partners.yaml".asName()
private val PARTNERS_PATH: Name = CONTENT_NODE_NAME + "partners"
private val programSection = PageFragment {
val programBlock = data.resolveHtmlOrNull(PROGRAM_PATH)!!
@ -95,7 +92,7 @@ private val programSection = PageFragment {
private val partners = PageFragment {
val partnersData: Meta = runBlocking {
//TODO add meta reading step to data preparation
data.getByType<Binary>(PARTNERS_PATH)?.await()?.readWith(YamlMetaFormat)
data.getByType<Meta>(PARTNERS_PATH)?.await()
} ?: Meta.EMPTY
div("inner") {
h2 { +"Партнеры" }