From 9284e107d7d7b8872e2b40f936643f733baeead9 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Sat, 3 Sep 2022 18:39:06 +0300 Subject: [PATCH] Update education pages --- data/home/content/consulting/index.md | 1 + data/home/content/education/index.md | 45 ++++++++++++++++++++++ src/main/kotlin/ru/mipt/spc/Application.kt | 11 ++++++ src/main/kotlin/ru/mipt/spc/spcHome.kt | 17 ++++---- src/main/kotlin/ru/mipt/spc/spcMasters.kt | 12 ++---- 5 files changed, 71 insertions(+), 15 deletions(-) create mode 100644 data/home/content/education/index.md diff --git a/data/home/content/consulting/index.md b/data/home/content/consulting/index.md index 447c5f2..7da51b4 100644 --- a/data/home/content/consulting/index.md +++ b/data/home/content/consulting/index.md @@ -15,6 +15,7 @@ Our research, which primarily includes open source projects, has already been ap ## We do +
diff --git a/data/home/content/education/index.md b/data/home/content/education/index.md new file mode 100644 index 0000000..5b4933d --- /dev/null +++ b/data/home/content/education/index.md @@ -0,0 +1,45 @@ +--- +type: page +title: Education +transformation: snark.basic +language: en +--- + +
+
+
+

Masters program

+
+

Masters program "Scientific programming" at MIPT aims to prepare specialists both in application programming and domain field (such as physics, biology, biotechnology, computer science and other research areas).

+

In modern science and technology application level programming is an integral part of any major work. And in order to be successful in this field one needs to know both software engineering and the domain field.

+ +
+
+
+ +## Courses in 2022-2023: + +* Scientific literature seminar + + curated by Aleksandr Svetlichnyi + +* [Statistical methods and data analysis](https://t.me/mipt_statmethods) ([SPC-A-6](https://npm.mipt.ru/youtrack/articles/SPC-A-6)) + + by Alexander Nozik and Vladimir Palmin + + +* Численные методы ([SPC-A-3](https://npm.mipt.ru/youtrack/articles/SPC-A-3)) + + by Konstantin Tikhonov and Rolan Grinis + +* Instruments of development ([SPC-A-5](https://npm.mipt.ru/youtrack/articles/SPC-A-5)) + +* [Advanced Python](https://t.me/mipt_npm_python) ([SPC-A-4](https://npm.mipt.ru/youtrack/articles/SPC-A-4)) + + by Mikhail Zelenyy + +* Computational finance ([SPC-A-10](https://npm.mipt.ru/youtrack/articles/SPC-A-10)) + + by Rolan Grinis \ No newline at end of file diff --git a/src/main/kotlin/ru/mipt/spc/Application.kt b/src/main/kotlin/ru/mipt/spc/Application.kt index a855c87..bab8e04 100644 --- a/src/main/kotlin/ru/mipt/spc/Application.kt +++ b/src/main/kotlin/ru/mipt/spc/Application.kt @@ -1,9 +1,13 @@ package ru.mipt.spc import io.ktor.server.application.Application +import io.ktor.server.application.call import io.ktor.server.application.install import io.ktor.server.plugins.forwardedheaders.ForwardedHeaders import io.ktor.server.plugins.forwardedheaders.XForwardedHeaders +import io.ktor.server.response.respondRedirect +import io.ktor.server.routing.get +import io.ktor.server.routing.routing import space.kscience.snark.SnarkEnvironment import space.kscience.snark.ktor.extractResources import space.kscience.snark.ktor.prepareSnarkDataCacheDirectory @@ -42,6 +46,13 @@ fun Application.spcModule() { spcMasters(dataPath = mastersDataPath) } + + routing{ + get("magprog"){ + call.respondRedirect("education/masters") + } + + } } diff --git a/src/main/kotlin/ru/mipt/spc/spcHome.kt b/src/main/kotlin/ru/mipt/spc/spcHome.kt index 4e2550f..377571e 100644 --- a/src/main/kotlin/ru/mipt/spc/spcHome.kt +++ b/src/main/kotlin/ru/mipt/spc/spcHome.kt @@ -149,11 +149,11 @@ context(WebPage) private fun HTML.spcHome() { header("major") { h3 { a(classes = "link") { - href = resolvePageRef("magprog.index") - +"""Master's program""" + href = resolvePageRef("education") + +"""Education""" } } - p { +"""Master's program: "Scientific programming" """ } + p { +""" Educational projects""" } } } article { @@ -265,11 +265,14 @@ internal fun SiteBuilder.spcHome(dataPath: Path, prefix: Name = Name.EMPTY) { pages("consulting", dataRenderer = FortyDataRenderer) //pages("ru.consulting".parseAsName(), dataRenderer = FortyDataRenderer) - spcSpotlight("team") { _, m -> - m["type"].string == "team" + pages("education", dataRenderer = FortyDataRenderer) + + spcSpotlight("team") { _, meta -> + meta["type"].string == "team" } - spcSpotlight("research") { name, m -> - name.startsWith("projects".asName()) && m["type"].string == "project" + + spcSpotlight("research") { name, meta -> + name.startsWith("projects".asName()) && meta["type"].string == "project" } } diff --git a/src/main/kotlin/ru/mipt/spc/spcMasters.kt b/src/main/kotlin/ru/mipt/spc/spcMasters.kt index 19b702f..41aeade 100644 --- a/src/main/kotlin/ru/mipt/spc/spcMasters.kt +++ b/src/main/kotlin/ru/mipt/spc/spcMasters.kt @@ -9,13 +9,9 @@ import space.kscience.dataforge.meta.Meta import space.kscience.dataforge.meta.get import space.kscience.dataforge.meta.getIndexed import space.kscience.dataforge.meta.string -import space.kscience.dataforge.names.Name -import space.kscience.dataforge.names.asName -import space.kscience.dataforge.names.plus -import space.kscience.dataforge.names.withIndex -import space.kscience.snark.* +import space.kscience.dataforge.names.* +import space.kscience.snark.SnarkContext import space.kscience.snark.html.* -import space.kscience.snark.html.WebPage import java.nio.file.Path import kotlin.collections.component1 import kotlin.collections.component2 @@ -302,7 +298,7 @@ context(WebPage) internal fun BODY.magProgFooter() { context(SnarkContext) private val HtmlData.mentorPageId get() = "mentor-${id}" -internal fun SiteBuilder.spcMasters(dataPath: Path, prefix: Name = "magprog".asName()) { +internal fun SiteBuilder.spcMasters(dataPath: Path, prefix: Name = "education.masters".parseAsName()) { val magProgData: DataTree = snark.readDirectory(dataPath.resolve("content")) @@ -353,7 +349,7 @@ internal fun SiteBuilder.spcMasters(dataPath: Path, prefix: Name = "magprog".asN li { a( classes = "spc-home", - href = resolvePageRef(Name.of("..") + SiteBuilder.INDEX_PAGE_TOKEN) + href = "/" //TODO provide a way to navigate out-of-site ) { i("fa fa-home") { attributes["aria-hidden"] = "true"