Compare commits
No commits in common. "06bed316b51b2d42be7fb1cf1837a4b8a367525c" and "a711e44aeabdf39b9331968c5421e73680610cd2" have entirely different histories.
06bed316b5
...
a711e44aea
2
.gitignore
vendored
@ -1,7 +1,7 @@
|
|||||||
.gradle/
|
.gradle/
|
||||||
build/
|
build/
|
||||||
.idea/
|
.idea/
|
||||||
logs/
|
/logs/
|
||||||
|
|
||||||
!gradle/wrapper/gradle-wrapper.jar
|
!gradle/wrapper/gradle-wrapper.jar
|
||||||
/deploy.ps1
|
/deploy.ps1
|
||||||
|
14
.space.kts
@ -4,15 +4,15 @@ job("Deploy") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
container(image = "gradle:jdk17-alpine") {
|
container(image = "gradle:jdk17-alpine") {
|
||||||
env["SPC_HOST"] = "{{ project:spc-host }}"
|
env["SPC_HOST"] = Params("spc-host")
|
||||||
env["SPC_USER"] = "{{ project:spc-webmaster-user }}"
|
env["SPC_USER"] = Secrets("spc-webmaster-user")
|
||||||
env["SPC_ID"] = "{{ project:spc-webmaster-id }}"
|
env["SPC_ID"] = Secrets("spc-webmaster-id")
|
||||||
kotlinScript { api ->
|
kotlinScript { api ->
|
||||||
api.space().projects.automation.deployments.start(
|
api.space().projects.automation.deployments.start(
|
||||||
project = api.projectIdentifier(),
|
project = api.projectIdentifier(),
|
||||||
targetIdentifier = TargetIdentifier.Key("spc-site"),
|
targetIdentifier = TargetIdentifier.Key("spc-site"),
|
||||||
version = "current",
|
version = "current",
|
||||||
// automatically update deployment status based on the status of the job
|
// automatically update deployment status based on a status of a job
|
||||||
syncWithAutomationJob = true
|
syncWithAutomationJob = true
|
||||||
)
|
)
|
||||||
api.gradle("uploadDistribution")
|
api.gradle("uploadDistribution")
|
||||||
@ -26,9 +26,9 @@ job("Restart service"){
|
|||||||
}
|
}
|
||||||
|
|
||||||
container(image = "gradle:jdk17-alpine") {
|
container(image = "gradle:jdk17-alpine") {
|
||||||
env["SPC_HOST"] = "{{ project:spc-host }}"
|
env["SPC_HOST"] = Params("spc-host")
|
||||||
env["SPC_USER"] = "{{ project:spc-webmaster-user }}"
|
env["SPC_USER"] = Secrets("spc-webmaster-user")
|
||||||
env["SPC_ID"] = "{{ project:spc-webmaster-id }}"
|
env["SPC_ID"] = Secrets("spc-webmaster-id")
|
||||||
kotlinScript { api ->
|
kotlinScript { api ->
|
||||||
api.gradle("reloadDistribution")
|
api.gradle("reloadDistribution")
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ dependencies {
|
|||||||
implementation("io.ktor:ktor-server-netty:$ktorVersion")
|
implementation("io.ktor:ktor-server-netty:$ktorVersion")
|
||||||
implementation("io.ktor:ktor-server-http-redirect:$ktorVersion")
|
implementation("io.ktor:ktor-server-http-redirect:$ktorVersion")
|
||||||
implementation("io.ktor:ktor-server-forwarded-header:$ktorVersion")
|
implementation("io.ktor:ktor-server-forwarded-header:$ktorVersion")
|
||||||
implementation("ch.qos.logback:logback-classic:1.4.12")
|
implementation("ch.qos.logback:logback-classic:1.2.11")
|
||||||
|
|
||||||
testImplementation("io.ktor:ktor-server-tests:$ktorVersion")
|
testImplementation("io.ktor:ktor-server-tests:$ktorVersion")
|
||||||
}
|
}
|
||||||
@ -52,23 +52,22 @@ apiValidation{
|
|||||||
|
|
||||||
val host = System.getenv("SPC_HOST")
|
val host = System.getenv("SPC_HOST")
|
||||||
val user = System.getenv("SPC_USER")
|
val user = System.getenv("SPC_USER")
|
||||||
val password = System.getenv("SPC_PASSWORD")
|
//val password = System.getenv("SPC_PASSWORD")
|
||||||
val privateKey = System.getenv("SPC_ID")
|
val identityString = System.getenv("SPC_ID")
|
||||||
//val publicKey = System.getenv("SPC_PUBKEY")
|
|
||||||
val serviceName = "sciprog-site"
|
val serviceName = "sciprog-site"
|
||||||
|
|
||||||
if (host != null && user != null || privateKey != null) {
|
if (host != null && user != null || identityString != null) {
|
||||||
val uploadDistribution by tasks.creating {
|
val uploadDistribution by tasks.creating {
|
||||||
group = "distribution"
|
group = "distribution"
|
||||||
dependsOn("installDist")
|
dependsOn("installDist")
|
||||||
doLast {
|
doLast {
|
||||||
JSch {
|
JSch {
|
||||||
addIdentity("webmaster", privateKey.encodeToByteArray(), null, null)
|
addIdentity("spc-webmaster", identityString.encodeToByteArray(), null, null)
|
||||||
}.useSession(host, user) {
|
}.useSession(host, user) {
|
||||||
//stopping service during the upload
|
//stopping service during the upload
|
||||||
execute("sudo systemctl stop $serviceName")
|
execute("sudo systemctl stop $serviceName")
|
||||||
uploadDirectory(buildDir.resolve("install/spc-site"), "/opt")
|
uploadDirectory(buildDir.resolve("install/spc-site"), "/opt")
|
||||||
//adding an executable flag to the entry point
|
//adding executable flag to the entry point
|
||||||
execute("sudo chmod +x /opt/spc-site/bin/spc-site")
|
execute("sudo chmod +x /opt/spc-site/bin/spc-site")
|
||||||
execute("sudo systemctl start $serviceName")
|
execute("sudo systemctl start $serviceName")
|
||||||
}
|
}
|
||||||
@ -79,7 +78,7 @@ if (host != null && user != null || privateKey != null) {
|
|||||||
group = "distribution"
|
group = "distribution"
|
||||||
doLast {
|
doLast {
|
||||||
JSch {
|
JSch {
|
||||||
addIdentity("webmaster", privateKey.encodeToByteArray(), null, null)
|
addIdentity("spc-webmaster", identityString.encodeToByteArray(), null, null)
|
||||||
}.useSession(host, user) {
|
}.useSession(host, user) {
|
||||||
execute("sudo systemctl restart $serviceName")
|
execute("sudo systemctl restart $serviceName")
|
||||||
}
|
}
|
||||||
|
@ -12,15 +12,15 @@ language: en
|
|||||||
<h2>Master program</h2>
|
<h2>Master program</h2>
|
||||||
</header>
|
</header>
|
||||||
<p>Master 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).</p>
|
<p>Master 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).</p>
|
||||||
<p> 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. </p>
|
<p> 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. </p>
|
||||||
<ul class="actions">
|
<ul class="actions">
|
||||||
<li><a href="/education/masters" class="button next">More</a></li>
|
<li><a href="${resolvePageRef("education.masters")}" class="button next">More</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|
||||||
## Courses in 2022–2023:
|
## Courses in 2022-2023:
|
||||||
|
|
||||||
### [Scientific literature seminar](#)
|
### [Scientific literature seminar](#)
|
||||||
*curated by [Aleksandr Svetlichnyi](${resolvePageRef("team")}#svetlichnyi)*
|
*curated by [Aleksandr Svetlichnyi](${resolvePageRef("team")}#svetlichnyi)*
|
||||||
@ -46,6 +46,11 @@ Actual program: [SPC-A-6](https://npm.mipt.ru/youtrack/articles/SPC-A-6)
|
|||||||
|
|
||||||
Actual program: [SPC-A-3](https://npm.mipt.ru/youtrack/articles/SPC-A-3)
|
Actual program: [SPC-A-3](https://npm.mipt.ru/youtrack/articles/SPC-A-3)
|
||||||
|
|
||||||
|
### [Instruments of development](https://npm.mipt.ru/youtrack/articles/SPC-A-5)
|
||||||
|
*curated by [Alexander Nozik](${resolvePageRef("team.index")}#nozik)*
|
||||||
|
|
||||||
|
Actual program: [SPC-A-5](https://npm.mipt.ru/youtrack/articles/SPC-A-5)
|
||||||
|
|
||||||
### [Advanced Python](https://npm.mipt.ru/youtrack/articles/SPC-A-4)
|
### [Advanced Python](https://npm.mipt.ru/youtrack/articles/SPC-A-4)
|
||||||
*by Mikhail Zelenyy*
|
*by Mikhail Zelenyy*
|
||||||
|
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
---
|
|
||||||
pageName: SPC
|
|
||||||
language: en
|
|
||||||
---
|
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
type: team
|
type: team
|
||||||
title: Varvara Kaplenko
|
title: Varvara Kaplenko
|
||||||
|
@ -1,7 +1,3 @@
|
|||||||
---
|
|
||||||
language: en
|
|
||||||
---
|
|
||||||
|
|
||||||
**Director of the centre**
|
**Director of the centre**
|
||||||
|
|
||||||
* PhD in particle physics.
|
* PhD in particle physics.
|
||||||
|
@ -4,7 +4,6 @@ title: Vladimir Palmin
|
|||||||
id: palmin
|
id: palmin
|
||||||
order: 10
|
order: 10
|
||||||
language: en
|
language: en
|
||||||
published: false
|
|
||||||
image:
|
image:
|
||||||
path: images/people/palmin.jpg
|
path: images/people/palmin.jpg
|
||||||
position: left
|
position: left
|
||||||
|
@ -1,5 +1 @@
|
|||||||
---
|
|
||||||
language: en
|
|
||||||
---
|
|
||||||
|
|
||||||
**Vice-director for education**
|
**Vice-director for education**
|
@ -1,109 +0,0 @@
|
|||||||
---
|
|
||||||
type: project
|
|
||||||
title: BM@N infrastructure
|
|
||||||
order: 150
|
|
||||||
language: en
|
|
||||||
image: images/projects/bmn/nica.png
|
|
||||||
---
|
|
||||||
## Information Systems for BM@N
|
|
||||||
|
|
||||||
Our team works on development of information systems and services for BM@N (Baryonic Matter at Nuclotron) experiment, part of NICA (Nuclotron-based Ion Collider fAсility) megaproject (located in Dubna, Russia). These works are performed together with scientists from JINR and other institutions.
|
|
||||||
|
|
||||||
The overall view of NICA complex with already running experiment BM@N and future collider experiments MPD and SPD is shown in Fig. 1. BM@N studies collisions of elementary particles and ions with a fixed target with energies up to 6 GeV per nucleon, which is a very interesting energy region for fundamental nuclear physics research.
|
|
||||||
|
|
||||||
<span class="image fit">
|
|
||||||
<strong>Fig. 1</strong>
|
|
||||||
<img src="snark://ref/images/projects/bmn/nica.png" alt="Fig. 1"/>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
### Event Metadata System
|
|
||||||
|
|
||||||
Event metadata systems (EMS) are widely used in the physics experiments on particle collisions, where large numbers of experimental events, typically billions, are collected. At the stage of particular physics analysis of experimental data, only a small subset of collected events meeting certain criteria is usually of interest, and passing over the whole amount of stored data to form the subset is overly time-consuming and resource-intensive. Instead, metadata systems allow one to obtain only the required events (or, at least, references to them) via searching and filtering based on given fields (event attributes) recorded in the metadata system.
|
|
||||||
|
|
||||||
The NICA Event Metadata System has been developed for storing necessary event metadata for the NICA experiments. The information system makes it possible to quickly search for a necessary subset of physics events by required parameters to use in further event data processing. It provides summary description of collision events and their identifiers to search and select events for a desired analysis task, enables their management and convenient access; provides online and offline interfaces for selecting events of interest, such as Web and REST API services, and a dedicated C++/ROOT interface.
|
|
||||||
|
|
||||||
The Event Metadata System, including the Event Catalogue based on PostgreSQL, Metadata API, Web Service, and other developed components, has been provisioned using a common deployment system for the first experiment of the NICA project, BM@N. The main interfaces to EMS, namely, Web UI and REST API have been developed using Kotlin multiplatform technology as a part of the single full-stack project. The EMS provides acceptable response times for the expected amount of the event metadata. The system and its services will be further evolved and improved following operational experience.
|
|
||||||
|
|
||||||
Figs. 2 and 3 illustrate high-level EMS architecture and its basic Web UI view.
|
|
||||||
|
|
||||||
<span class="image fit">
|
|
||||||
<strong>Fig. 2</strong>
|
|
||||||
<img src="snark://ref/images/projects/bmn/ems-arch.png" alt="Fig. 2"/>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<span class="image fit">
|
|
||||||
<strong>Fig. 3</strong>
|
|
||||||
<img src="snark://ref/images/projects/bmn/ems-web.png" alt="Fig. 3"/>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
### Next-Generation Event Visualization (Event Display) System
|
|
||||||
|
|
||||||
In high-energy physics experiments, the ability to display both detector geometry and particle tracks has become an essential feature, required for physicists to better understand particular collision events as well as to present the physical results to a wider audience.
|
|
||||||
|
|
||||||
For BM@N experiment, a new event visualization solution was developed based on VisionForge, a modern open-source visualization system. An important part of the solution is integration of the system with experiment's software framework BmnRoot, which is a CERN ROOT-based environment.
|
|
||||||
|
|
||||||
|
|
||||||
Figs. 4, 5 illustrate how the Web interface of a new system looks like. The user can conveniently move and rotate the camera, zoom-in and zoom-out the scene as needed, browse the scene graph (object tree). For every object it is possible to change display properties such as color, opacity and visibility. Note that the full BM@N geometry model includes more than 400,000 primitives so rendering them all requires significant resources. To optimize the resource usage, so-called “prototypes” were implemented in VisionForge model for three-dimensional objects. For a single prototype its geometry is rendered only once and reused for multiple objects, which helps to significantly reduce memory usage.
|
|
||||||
|
|
||||||
<span class="image fit">
|
|
||||||
<strong>Fig. 4</strong>
|
|
||||||
<img src="snark://ref/images/projects/bmn/vis-1.png" alt="Fig. 4"/>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<span class="image fit">
|
|
||||||
<strong>Fig. 5</strong>
|
|
||||||
<img src="snark://ref/images/projects/bmn/vis-2.png" alt="Fig. 5"/>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
### Condition Database Services
|
|
||||||
|
|
||||||
The Unified Condition Database (shortly called UniConDa) of the BM@N experiment is one of the advanced information systems required to support automation of experimental data collecting and processing, providing a central storage for experiment metadata being necessary for event data processing, including session and run information, detector and subsystem parameters, and descriptions of simulated event files.
|
|
||||||
|
|
||||||
The condition database has been earlier implemented based on the PostgreSQL database management system in accordance with a well-designed scheme. An ecosystem of its supplementary services is constantly being improved to increase overall degree of database integration and convenience of the use by collaboration members.
|
|
||||||
|
|
||||||
For the UniConDa ecosystem, the REST API, a modern HTTP-based interface for integration with both ROOT-based and non-ROOT software systems of the experiment, was developed.
|
|
||||||
|
|
||||||
Additionally, Smart Data Parser, a part of the BM@N information system based on the Unified Condition Database, was created to solve the task of the parameter data migration from accumulated files of ASCII text, CSV or XML formats to the Unified Condition Database of the BM@N experiment (Fig. 6).
|
|
||||||
|
|
||||||
<span class="image fit">
|
|
||||||
<strong>Fig. 6</strong>
|
|
||||||
<img src="snark://ref/images/projects/bmn/sdp.png" alt="Fig. 6"/>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
### Monitoring Service
|
|
||||||
|
|
||||||
The software infrastructure of the BM@N experiment contains a set of various information systems that are essential for the work with experimental or simulated data on all processing stages, including the collection, storage, intermediate processing and physics analysis. In case one of such systems stops functioning, the work with BM@N data by collaboration members gets either impossible or, at least, much less productive. Due to this fact, the timely detection of possible failures in the systems due to software or hardware failures is fairly important.
|
|
||||||
|
|
||||||
The developed Monitoring Service is used to check availability and health status of information systems. This includes measuring, storing, visualizing and sending alert notifications on monitored parameters, such as CPU, memory and disk utilization, DBMS functioning parameters, response times of databases and API endpoints, ping round-trip times, and so on. The current implementation of the BM@N monitoring service is illustrated in Figs. 7, 8. Note that a related task of building highly available information services is currently a work in progress.
|
|
||||||
|
|
||||||
<span class="image fit">
|
|
||||||
<strong>Fig. 7</strong>
|
|
||||||
<img src="snark://ref/images/projects/bmn/mon-arch.png" alt="Fig. 7"/>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<span class="image fit">
|
|
||||||
<strong>Fig. 8</strong>
|
|
||||||
<img src="snark://ref/images/projects/bmn/mon-db.png" alt="Fig. 8"/>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
|
|
||||||
### Slow Control System Viewer
|
|
||||||
|
|
||||||
Web interface for slow control system of BM@N was developed. It visualizes various sensor data graphs based on parameters and time intervals provided by user as shown in Fig. 9.
|
|
||||||
|
|
||||||
<span class="image fit">
|
|
||||||
<strong>Fig. 9</strong>
|
|
||||||
<img src="snark://ref/images/projects/bmn/scs.png" alt="Fig. 9"/>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
### References
|
|
||||||
|
|
||||||
1. K. Gertsenberger, P. Klimai, M. Zelenyi. Auxiliary Services for the Condition Database of the BM@N Experiment at NICA // Phys.Part.Nucl.Lett. 20 (2023) 1217. https://www.doi.org/10.1134/S1547477123050291
|
|
||||||
2. E. Alexandrov, I. Alexandrov, A. Chebotov, A. Degtyarev, I. Filozova, K. Gertsenberger, P. Klimai, A. Yakovlev. Implementation of the Event Metadata System for physics analysis in the NICA experiments // Journal of Physics: Conference Series 2438 (2023) 012046. https://www.doi.org/10.1088/1742-6596/2438/1/012046
|
|
||||||
2. A. Degtyarev, K. Gertsenberger, P. Klimai. Usage of Apache Cassandra for Prototyping the Event Metadata System of the NICA Experiments // Phys.Part.Nucl.Lett. 19 (2022) 5, 562-565. https://doi.org/10.1134/S1547477122050144
|
|
||||||
3. A. Chebotov, K. Gertsenberger, P. Klimai, A. Moshkin. Information System Based on the Condition Database for the NICA Experiments, User WEB Application, and Related Services // Phys.Part.Nucl.Lett. 19 (2022) 5, 558-561. https://doi.org/10.1134/S1547477122050132
|
|
||||||
4. E. Alexandrov, I. Alexandrov, A. Degtyarev, K. Gertsenberger, I. Filozova, P. Klimai, A. Nozik, A. Yakovlev. Design of the Event Metadata System for the Experiments at NICA // Phys.Part.Nucl.Lett. 18 (2021) 5, 603-616. https://doi.org/10.1134/S1547477121050034
|
|
||||||
5. K. Gertsenberger, I. Alexandrov, I. Filozova, E. Alexandrov, A. Moshkin, A. Chebotov, M. Mineev, D. Pryahina, G. Shestakova, A. Yakovlev, A. Nozik, P. Klimai. Development of Information Systems for Online and Offline Data Processing in the NICA Experiments // Phys.Part.Nucl. 52 (2021) 4, 801-807. https://doi.org/10.1134/S1063779621040250
|
|
||||||
6. K.V. Gertsenberger, A.I. Chebotov, P.A. Klimai, I.N. Alexandrov, E.I. Alexandrov, I.A. Filozova, A.A. Moshkin. Implementation of the Condition Database for the Experiments of the NICA Complex // CEUR Workshop Proceedings, Vol. 3041 (2021) 128-132. https://doi.org/10.54546/MLIT.2021.53.54.001
|
|
||||||
7. E.I. Alexandrov, I.N. Alexandrov, A.G. Degtyarev, I.A. Filozova, K.V. Gertsenberger, P.A. Klimai, A.V. Yakovlev. Development of the Event Metadata System for the NICA experiments // CEUR Workshop Proceedings, Vol. 3041 (2021) 439-444. https://doi.org/10.54546/MLIT.2021.80.18.001
|
|
||||||
8. M.N.Kapishin et al, The Report on Project “Studies of Baryonic Matter at the Nuclotron (BM@N)”, https://bmn.jinr.ru/wp-content/uploads/2022/10/BMNproject_2021cor2.pdf
|
|
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
language: en
|
|
||||||
---
|
|
||||||
|
|
||||||
Our team works on development of information systems and services for BM@N (Baryonic Matter at Nuclotron) experiment, part of NICA (Nuclotron-based Ion Collider fAсility) megaproject (located in Dubna, Russia). These works are performed together with scientists from JINR and other institutions.
|
|
@ -1,7 +1,3 @@
|
|||||||
---
|
|
||||||
language: en
|
|
||||||
---
|
|
||||||
|
|
||||||
Controls.kt is a data acquisition framework (work in progress). It is based on DataForge, a software framework for automated data processing.
|
Controls.kt is a data acquisition framework (work in progress). It is based on DataForge, a software framework for automated data processing.
|
||||||
|
|
||||||
[Repository and documentation](https://github.com/mipt-npm/controls.kt)
|
[Repository and documentation](https://github.com/mipt-npm/controls.kt)
|
@ -21,7 +21,7 @@ A presentation on application of (old version of) DataForge to Troitsk nu-mass a
|
|||||||
<iframe width="100%" height="315" src="https://www.youtube.com/embed/OpWzLXUZnLI" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
<iframe width="100%" height="315" src="https://www.youtube.com/embed/OpWzLXUZnLI" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
||||||
|
|
||||||
## Questions and Answers
|
## Questions and Answers
|
||||||
In this section, we will try to cover DataForge main ideas in the form of questions and answers.
|
In this section we will try to cover DataForge main ideas in the form of questions and answers.
|
||||||
|
|
||||||
### General
|
### General
|
||||||
**Q**: I have a lot of data to analyze. The analysis process is complicated, requires a lot of stages and data flow is not always obvious. To top it the data size is huge, so I don't want to perform operation I don't need (calculate something I won't need or calculate something twice). And yes, I need it to be performed in parallel and probably on remote computer. By the way, I am sick and tired of scripts that modify other scripts that control scripts. Could you help me?
|
**Q**: I have a lot of data to analyze. The analysis process is complicated, requires a lot of stages and data flow is not always obvious. To top it the data size is huge, so I don't want to perform operation I don't need (calculate something I won't need or calculate something twice). And yes, I need it to be performed in parallel and probably on remote computer. By the way, I am sick and tired of scripts that modify other scripts that control scripts. Could you help me?
|
||||||
|
@ -1,7 +1,3 @@
|
|||||||
---
|
|
||||||
language: en
|
|
||||||
---
|
|
||||||
|
|
||||||
A metadata processing workflow manipulation framework.
|
A metadata processing workflow manipulation framework.
|
||||||
|
|
||||||
[Repository and documentation](https://github.com/mipt-npm/dataforge-core)
|
[Repository and documentation](https://github.com/mipt-npm/dataforge-core)
|
@ -1,7 +1,3 @@
|
|||||||
---
|
|
||||||
language: en
|
|
||||||
---
|
|
||||||
|
|
||||||
An experimental Kotlin library for mathematical operations, built on the principle of context-oriented programming using mathematical abstractions.
|
An experimental Kotlin library for mathematical operations, built on the principle of context-oriented programming using mathematical abstractions.
|
||||||
|
|
||||||
[Repository and documentation](https://github.com/mipt-npm/kmath)
|
[Repository and documentation](https://github.com/mipt-npm/kmath)
|
||||||
|
@ -1,5 +1 @@
|
|||||||
---
|
|
||||||
language: en
|
|
||||||
---
|
|
||||||
|
|
||||||
Geological gas storage monitoring and leaks prevention using muons from atmosphere.
|
Geological gas storage monitoring and leaks prevention using muons from atmosphere.
|
@ -1,7 +1,3 @@
|
|||||||
---
|
|
||||||
language: en
|
|
||||||
---
|
|
||||||
|
|
||||||
A kotlin visualization library wrapping popular [Plotly](https://plotly.com/javascript/) library.
|
A kotlin visualization library wrapping popular [Plotly](https://plotly.com/javascript/) library.
|
||||||
|
|
||||||
[Repository and documentation](https://github.com/mipt-npm/plotly.kt)
|
[Repository and documentation](https://github.com/mipt-npm/plotly.kt)
|
@ -1,7 +1,3 @@
|
|||||||
---
|
|
||||||
language: en
|
|
||||||
---
|
|
||||||
|
|
||||||
A visualization framework written in Kotlin-multiplatform
|
A visualization framework written in Kotlin-multiplatform
|
||||||
|
|
||||||
[Repository and documentation](https://github.com/mipt-npm/visionforge)
|
[Repository and documentation](https://github.com/mipt-npm/visionforge)
|
@ -4,4 +4,4 @@ title: WIP
|
|||||||
language: en
|
language: en
|
||||||
---
|
---
|
||||||
|
|
||||||
This page is a work in progress.
|
This page is work in progress.
|
||||||
|
Before Width: | Height: | Size: 363 KiB |
Before Width: | Height: | Size: 99 KiB |
Before Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 204 KiB |
Before Width: | Height: | Size: 442 KiB |
Before Width: | Height: | Size: 166 KiB |
Before Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 77 KiB |
Before Width: | Height: | Size: 182 KiB |
@ -48,7 +48,7 @@
|
|||||||
if ($sidebar.length > 0) {
|
if ($sidebar.length > 0) {
|
||||||
|
|
||||||
//adding exclusion for home link
|
//adding exclusion for home link
|
||||||
let $sidebar_a = $sidebar.find('a').not('.spc-home');
|
var $sidebar_a = $sidebar.find('a').not('.spc-home');
|
||||||
|
|
||||||
$sidebar_a
|
$sidebar_a
|
||||||
.addClass('scrolly')
|
.addClass('scrolly')
|
||||||
@ -71,7 +71,7 @@
|
|||||||
})
|
})
|
||||||
.each(function () {
|
.each(function () {
|
||||||
|
|
||||||
let $this = $(this),
|
var $this = $(this),
|
||||||
id = $this.attr('href'),
|
id = $this.attr('href'),
|
||||||
$section = $(id);
|
$section = $(id);
|
||||||
|
|
||||||
@ -81,7 +81,7 @@
|
|||||||
|
|
||||||
// Scrollex.
|
// Scrollex.
|
||||||
$section.scrollex({
|
$section.scrollex({
|
||||||
// mode: 'middle',
|
mode: 'middle',
|
||||||
top: '-20vh',
|
top: '-20vh',
|
||||||
bottom: '-20vh',
|
bottom: '-20vh',
|
||||||
initialize: function () {
|
initialize: function () {
|
||||||
@ -133,7 +133,7 @@
|
|||||||
// Spotlights.
|
// Spotlights.
|
||||||
$('.spotlights > section')
|
$('.spotlights > section')
|
||||||
.scrollex({
|
.scrollex({
|
||||||
// mode: 'middle',
|
mode: 'middle',
|
||||||
top: '-10vh',
|
top: '-10vh',
|
||||||
bottom: '-10vh',
|
bottom: '-10vh',
|
||||||
initialize: function () {
|
initialize: function () {
|
||||||
@ -151,7 +151,7 @@
|
|||||||
})
|
})
|
||||||
.each(function () {
|
.each(function () {
|
||||||
|
|
||||||
let $this = $(this),
|
var $this = $(this),
|
||||||
$image = $this.find('.image'),
|
$image = $this.find('.image'),
|
||||||
$img = $image.find('img'),
|
$img = $image.find('img'),
|
||||||
x;
|
x;
|
||||||
@ -171,7 +171,7 @@
|
|||||||
// Features.
|
// Features.
|
||||||
$('.features')
|
$('.features')
|
||||||
.scrollex({
|
.scrollex({
|
||||||
// mode: 'middle',
|
mode: 'middle',
|
||||||
top: '-20vh',
|
top: '-20vh',
|
||||||
bottom: '-20vh',
|
bottom: '-20vh',
|
||||||
initialize: function () {
|
initialize: function () {
|
||||||
@ -187,22 +187,20 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
|
||||||
|
|
||||||
//From https://www.w3schools.com/howto/howto_js_collapsible.asp
|
//From https://www.w3schools.com/howto/howto_js_collapsible.asp
|
||||||
let collapsibles = document.getElementsByClassName("collapsible");
|
const coll = document.getElementsByClassName("collapsible");
|
||||||
|
let i;
|
||||||
|
|
||||||
Array.from(collapsibles).forEach(item => {
|
for (i = 0; i < coll.length; i++) {
|
||||||
item.addEventListener("click", function () {
|
coll[i].addEventListener("click", function() {
|
||||||
this.classList.toggle("collapsible-expanded");
|
this.classList.toggle("active");
|
||||||
let target = item.attributes.getNamedItem("data-target").value;
|
const content = this.nextElementSibling;
|
||||||
let content = document.getElementById(target);
|
|
||||||
if (content.style.maxHeight){
|
if (content.style.maxHeight){
|
||||||
content.style.maxHeight = null;
|
content.style.maxHeight = null;
|
||||||
} else {
|
} else {
|
||||||
content.style.maxHeight = content.scrollHeight + "px";
|
content.style.maxHeight = content.scrollHeight + "px";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
}
|
@ -6,13 +6,13 @@
|
|||||||
*/
|
*/
|
||||||
$.fn.navList = function() {
|
$.fn.navList = function() {
|
||||||
|
|
||||||
const $this = $(this);
|
var $this = $(this);
|
||||||
$a = $this.find('a'),
|
$a = $this.find('a'),
|
||||||
b = [];
|
b = [];
|
||||||
|
|
||||||
$a.each(function() {
|
$a.each(function() {
|
||||||
|
|
||||||
const $this = $(this),
|
var $this = $(this),
|
||||||
indent = Math.max(0, $this.parents('li').length - 1),
|
indent = Math.max(0, $this.parents('li').length - 1),
|
||||||
href = $this.attr('href'),
|
href = $this.attr('href'),
|
||||||
target = $this.attr('target');
|
target = $this.attr('target');
|
||||||
@ -20,8 +20,8 @@
|
|||||||
b.push(
|
b.push(
|
||||||
'<a ' +
|
'<a ' +
|
||||||
'class="link depth-' + indent + '"' +
|
'class="link depth-' + indent + '"' +
|
||||||
((typeof target !== 'undefined' && target !== '') ? ' target="' + target + '"' : '') +
|
( (typeof target !== 'undefined' && target != '') ? ' target="' + target + '"' : '') +
|
||||||
((typeof href !== 'undefined' && href !== '') ? ' href="' + href + '"' : '') +
|
( (typeof href !== 'undefined' && href != '') ? ' href="' + href + '"' : '') +
|
||||||
'>' +
|
'>' +
|
||||||
'<span class="indent-' + indent + '"></span>' +
|
'<span class="indent-' + indent + '"></span>' +
|
||||||
$this.text() +
|
$this.text() +
|
||||||
@ -41,15 +41,14 @@
|
|||||||
*/
|
*/
|
||||||
$.fn.panel = function(userConfig) {
|
$.fn.panel = function(userConfig) {
|
||||||
|
|
||||||
let $this = $(this);
|
|
||||||
// No elements?
|
// No elements?
|
||||||
if (this.length === 0)
|
if (this.length == 0)
|
||||||
return $this;
|
return $this;
|
||||||
|
|
||||||
// Multiple elements?
|
// Multiple elements?
|
||||||
if (this.length > 1) {
|
if (this.length > 1) {
|
||||||
|
|
||||||
for (let i = 0; i < this.length; i++)
|
for (var i=0; i < this.length; i++)
|
||||||
$(this[i]).panel(userConfig);
|
$(this[i]).panel(userConfig);
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
@ -57,7 +56,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Vars.
|
// Vars.
|
||||||
let $body = $('body'),
|
var $this = $(this),
|
||||||
|
$body = $('body'),
|
||||||
$window = $(window),
|
$window = $(window),
|
||||||
id = $this.attr('id'),
|
id = $this.attr('id'),
|
||||||
config;
|
config;
|
||||||
@ -149,11 +149,11 @@
|
|||||||
$this
|
$this
|
||||||
.on('click', 'a', function(event) {
|
.on('click', 'a', function(event) {
|
||||||
|
|
||||||
const $a = $(this),
|
var $a = $(this),
|
||||||
href = $a.attr('href'),
|
href = $a.attr('href'),
|
||||||
target = $a.attr('target');
|
target = $a.attr('target');
|
||||||
|
|
||||||
if (!href || href === '#' || href === '' || href === '#' + id)
|
if (!href || href == '#' || href == '' || href == '#' + id)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Cancel original event.
|
// Cancel original event.
|
||||||
@ -166,7 +166,7 @@
|
|||||||
// Redirect to href.
|
// Redirect to href.
|
||||||
window.setTimeout(function() {
|
window.setTimeout(function() {
|
||||||
|
|
||||||
if (target === '_blank')
|
if (target == '_blank')
|
||||||
window.open(href);
|
window.open(href);
|
||||||
else
|
else
|
||||||
window.location.href = href;
|
window.location.href = href;
|
||||||
@ -191,7 +191,7 @@
|
|||||||
|| $this.touchPosY === null)
|
|| $this.touchPosY === null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const diffX = $this.touchPosX - event.originalEvent.touches[0].pageX,
|
var diffX = $this.touchPosX - event.originalEvent.touches[0].pageX,
|
||||||
diffY = $this.touchPosY - event.originalEvent.touches[0].pageY,
|
diffY = $this.touchPosY - event.originalEvent.touches[0].pageY,
|
||||||
th = $this.outerHeight(),
|
th = $this.outerHeight(),
|
||||||
ts = ($this.get(0).scrollHeight - $this.scrollTop());
|
ts = ($this.get(0).scrollHeight - $this.scrollTop());
|
||||||
@ -199,8 +199,8 @@
|
|||||||
// Hide on swipe?
|
// Hide on swipe?
|
||||||
if (config.hideOnSwipe) {
|
if (config.hideOnSwipe) {
|
||||||
|
|
||||||
let result = false;
|
var result = false,
|
||||||
const boundary = 20,
|
boundary = 20,
|
||||||
delta = 50;
|
delta = 50;
|
||||||
|
|
||||||
switch (config.side) {
|
switch (config.side) {
|
||||||
@ -287,7 +287,7 @@
|
|||||||
if (config.hideOnEscape)
|
if (config.hideOnEscape)
|
||||||
$window.on('keydown', function(event) {
|
$window.on('keydown', function(event) {
|
||||||
|
|
||||||
if (event.keyCode === 27)
|
if (event.keyCode == 27)
|
||||||
$this._hide(event);
|
$this._hide(event);
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -307,13 +307,13 @@
|
|||||||
return $(this);
|
return $(this);
|
||||||
|
|
||||||
// No elements?
|
// No elements?
|
||||||
if (this.length === 0)
|
if (this.length == 0)
|
||||||
return $this;
|
return $this;
|
||||||
|
|
||||||
// Multiple elements?
|
// Multiple elements?
|
||||||
if (this.length > 1) {
|
if (this.length > 1) {
|
||||||
|
|
||||||
for (let i = 0; i < this.length; i++)
|
for (var i=0; i < this.length; i++)
|
||||||
$(this[i]).placeholder();
|
$(this[i]).placeholder();
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
@ -327,10 +327,10 @@
|
|||||||
$this.find('input[type=text],textarea')
|
$this.find('input[type=text],textarea')
|
||||||
.each(function() {
|
.each(function() {
|
||||||
|
|
||||||
const i = $(this);
|
var i = $(this);
|
||||||
|
|
||||||
if (i.val() === ''
|
if (i.val() == ''
|
||||||
|| i.val() === i.attr('placeholder'))
|
|| i.val() == i.attr('placeholder'))
|
||||||
i
|
i
|
||||||
.addClass('polyfill-placeholder')
|
.addClass('polyfill-placeholder')
|
||||||
.val(i.attr('placeholder'));
|
.val(i.attr('placeholder'));
|
||||||
@ -338,12 +338,12 @@
|
|||||||
})
|
})
|
||||||
.on('blur', function() {
|
.on('blur', function() {
|
||||||
|
|
||||||
const i = $(this);
|
var i = $(this);
|
||||||
|
|
||||||
if (i.attr('name').match(/-polyfill-field$/))
|
if (i.attr('name').match(/-polyfill-field$/))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (i.val() === '')
|
if (i.val() == '')
|
||||||
i
|
i
|
||||||
.addClass('polyfill-placeholder')
|
.addClass('polyfill-placeholder')
|
||||||
.val(i.attr('placeholder'));
|
.val(i.attr('placeholder'));
|
||||||
@ -351,12 +351,12 @@
|
|||||||
})
|
})
|
||||||
.on('focus', function() {
|
.on('focus', function() {
|
||||||
|
|
||||||
const i = $(this);
|
var i = $(this);
|
||||||
|
|
||||||
if (i.attr('name').match(/-polyfill-field$/))
|
if (i.attr('name').match(/-polyfill-field$/))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (i.val() === i.attr('placeholder'))
|
if (i.val() == i.attr('placeholder'))
|
||||||
i
|
i
|
||||||
.removeClass('polyfill-placeholder')
|
.removeClass('polyfill-placeholder')
|
||||||
.val('');
|
.val('');
|
||||||
@ -367,8 +367,8 @@
|
|||||||
$this.find('input[type=password]')
|
$this.find('input[type=password]')
|
||||||
.each(function() {
|
.each(function() {
|
||||||
|
|
||||||
const i = $(this);
|
var i = $(this);
|
||||||
const x = $(
|
var x = $(
|
||||||
$('<div>')
|
$('<div>')
|
||||||
.append(i.clone())
|
.append(i.clone())
|
||||||
.remove()
|
.remove()
|
||||||
@ -377,16 +377,16 @@
|
|||||||
.replace(/type=password/i, 'type=text')
|
.replace(/type=password/i, 'type=text')
|
||||||
);
|
);
|
||||||
|
|
||||||
if (i.attr('id') !== '')
|
if (i.attr('id') != '')
|
||||||
x.attr('id', i.attr('id') + '-polyfill-field');
|
x.attr('id', i.attr('id') + '-polyfill-field');
|
||||||
|
|
||||||
if (i.attr('name') !== '')
|
if (i.attr('name') != '')
|
||||||
x.attr('name', i.attr('name') + '-polyfill-field');
|
x.attr('name', i.attr('name') + '-polyfill-field');
|
||||||
|
|
||||||
x.addClass('polyfill-placeholder')
|
x.addClass('polyfill-placeholder')
|
||||||
.val(x.attr('placeholder')).insertAfter(i);
|
.val(x.attr('placeholder')).insertAfter(i);
|
||||||
|
|
||||||
if (i.val() === '')
|
if (i.val() == '')
|
||||||
i.hide();
|
i.hide();
|
||||||
else
|
else
|
||||||
x.hide();
|
x.hide();
|
||||||
@ -396,9 +396,9 @@
|
|||||||
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
const x = i.parent().find('input[name=' + i.attr('name') + '-polyfill-field]');
|
var x = i.parent().find('input[name=' + i.attr('name') + '-polyfill-field]');
|
||||||
|
|
||||||
if (i.val() === '') {
|
if (i.val() == '') {
|
||||||
|
|
||||||
i.hide();
|
i.hide();
|
||||||
x.show();
|
x.show();
|
||||||
@ -412,7 +412,7 @@
|
|||||||
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
const i = x.parent().find('input[name=' + x.attr('name').replace('-polyfill-field', '') + ']');
|
var i = x.parent().find('input[name=' + x.attr('name').replace('-polyfill-field', '') + ']');
|
||||||
|
|
||||||
x.hide();
|
x.hide();
|
||||||
|
|
||||||
@ -437,12 +437,12 @@
|
|||||||
$this.find('input[type=text],input[type=password],textarea')
|
$this.find('input[type=text],input[type=password],textarea')
|
||||||
.each(function(event) {
|
.each(function(event) {
|
||||||
|
|
||||||
const i = $(this);
|
var i = $(this);
|
||||||
|
|
||||||
if (i.attr('name').match(/-polyfill-field$/))
|
if (i.attr('name').match(/-polyfill-field$/))
|
||||||
i.attr('name', '');
|
i.attr('name', '');
|
||||||
|
|
||||||
if (i.val() === i.attr('placeholder')) {
|
if (i.val() == i.attr('placeholder')) {
|
||||||
|
|
||||||
i.removeClass('polyfill-placeholder');
|
i.removeClass('polyfill-placeholder');
|
||||||
i.val('');
|
i.val('');
|
||||||
@ -462,8 +462,8 @@
|
|||||||
$this.find('input,textarea')
|
$this.find('input,textarea')
|
||||||
.each(function() {
|
.each(function() {
|
||||||
|
|
||||||
const i = $(this);
|
var i = $(this),
|
||||||
let x;
|
x;
|
||||||
|
|
||||||
i.removeClass('polyfill-placeholder');
|
i.removeClass('polyfill-placeholder');
|
||||||
|
|
||||||
@ -478,10 +478,11 @@
|
|||||||
|
|
||||||
x = i.parent().find('input[name=' + i.attr('name') + '-polyfill-field]');
|
x = i.parent().find('input[name=' + i.attr('name') + '-polyfill-field]');
|
||||||
|
|
||||||
if (i.val() === '') {
|
if (i.val() == '') {
|
||||||
i.hide();
|
i.hide();
|
||||||
x.show();
|
x.show();
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
i.show();
|
i.show();
|
||||||
x.hide();
|
x.hide();
|
||||||
}
|
}
|
||||||
@ -497,7 +498,7 @@
|
|||||||
case 'textarea':
|
case 'textarea':
|
||||||
i.val(i.attr('defaultValue'));
|
i.val(i.attr('defaultValue'));
|
||||||
|
|
||||||
if (i.val() === '') {
|
if (i.val() == '') {
|
||||||
i.addClass('polyfill-placeholder');
|
i.addClass('polyfill-placeholder');
|
||||||
i.val(i.attr('placeholder'));
|
i.val(i.attr('placeholder'));
|
||||||
}
|
}
|
||||||
@ -524,7 +525,7 @@
|
|||||||
*/
|
*/
|
||||||
$.prioritize = function($elements, condition) {
|
$.prioritize = function($elements, condition) {
|
||||||
|
|
||||||
const key = '__prioritize';
|
var key = '__prioritize';
|
||||||
|
|
||||||
// Expand $elements if it's not already a jQuery object.
|
// Expand $elements if it's not already a jQuery object.
|
||||||
if (typeof $elements != 'jQuery')
|
if (typeof $elements != 'jQuery')
|
||||||
@ -533,12 +534,11 @@
|
|||||||
// Step through elements.
|
// Step through elements.
|
||||||
$elements.each(function() {
|
$elements.each(function() {
|
||||||
|
|
||||||
const $e = $(this);
|
var $e = $(this), $p,
|
||||||
let $p;
|
$parent = $e.parent();
|
||||||
const $parent = $e.parent();
|
|
||||||
|
|
||||||
// No parent? Bail.
|
// No parent? Bail.
|
||||||
if ($parent.length === 0)
|
if ($parent.length == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Not moved? Move it.
|
// Not moved? Move it.
|
||||||
@ -552,7 +552,7 @@
|
|||||||
$p = $e.prev();
|
$p = $e.prev();
|
||||||
|
|
||||||
// Couldn't find anything? Means this element's already at the top, so bail.
|
// Couldn't find anything? Means this element's already at the top, so bail.
|
||||||
if ($p.length === 0)
|
if ($p.length == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Move element to top of parent.
|
// Move element to top of parent.
|
||||||
|
@ -5,7 +5,7 @@ section_title: Как поступить?
|
|||||||
language: ru
|
language: ru
|
||||||
---
|
---
|
||||||
Чтобы принять участие в программе, необходимо:
|
Чтобы принять участие в программе, необходимо:
|
||||||
* заполнить **[анкету](https://forms.yandex.ru/cloud/660a6e8690fa7b0435e99a28/)**. В анкете надо указать одного или нескольких научных руководителей, с которыми вы бы хотели работать;
|
* заполнить **[анкету](https://forms.yandex.ru/cloud/641ad7fe73cee702c7753776/)**. В анкете надо указать одного или нескольких научных руководителей, с которыми вы бы хотели работать;
|
||||||
* **до 1 июня (I поток) или до 15 июля (II поток)** пройти собеседование с научными руководителями и согласовать предполагаемый план обучения;
|
* **до 1 июня (I поток) или до 15 июля (II поток)** пройти собеседование с научными руководителями и согласовать предполагаемый план обучения;
|
||||||
* подать документы в магистратуру МФТИ согласно [правилам поступления](https://pk.mipt.ru/master/).
|
* подать документы в магистратуру МФТИ согласно [правилам поступления](https://pk.mipt.ru/master/).
|
||||||
|
|
||||||
@ -13,7 +13,7 @@ language: ru
|
|||||||
**ВАЖНО:** предварительное согласование с научным руководителем является **обязательным** для обучения в нашей магистратуре.
|
**ВАЖНО:** предварительное согласование с научным руководителем является **обязательным** для обучения в нашей магистратуре.
|
||||||
|
|
||||||
|
|
||||||
Сроки приёма документов при поступлении на очные программы магистратуры в МФТИ в 2024–2025 учебном году:
|
Сроки приёма документов при поступлении на очные программы магистратуры в МФТИ в 2023–2024 учебном году:
|
||||||
* I поток поступления: 10 апреля – 20 июля;
|
* I поток поступления: 10 апреля – 20 июля;
|
||||||
* II поток поступления: 21 июля – 4 августа.
|
* II поток поступления: 21 июля – 4 августа.
|
||||||
|
|
||||||
|
@ -5,7 +5,8 @@ section_title: О программе
|
|||||||
language: ru
|
language: ru
|
||||||
---
|
---
|
||||||
|
|
||||||
[Видео презентация программы](https://youtu.be/pniPs5ne294?si=TzY9yvt6PmYcDIq7)
|
<iframe width="100%" height="315" src="https://www.youtube.com/embed/pniPs5ne294" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
||||||
|
|
||||||
|
|
||||||
Магистерская программа МФТИ **"Научное программное обеспечение"** создана при поддержке двух школ МФТИ: Физтех-школы физики и исследований им. Ландау ([ЛФИ](https://mipt.ru/education/departments/lpr/)) и Физтех-школы прикладной математики и информатики ([ФПМИ](https://mipt.ru/education/departments/fpmi/)), а также ряда академических и промышленных партнеров. В ее основе лежит взаимодействие студента и [научного руководителя](#mentors).
|
Магистерская программа МФТИ **"Научное программное обеспечение"** создана при поддержке двух школ МФТИ: Физтех-школы физики и исследований им. Ландау ([ЛФИ](https://mipt.ru/education/departments/lpr/)) и Физтех-школы прикладной математики и информатики ([ФПМИ](https://mipt.ru/education/departments/fpmi/)), а также ряда академических и промышленных партнеров. В ее основе лежит взаимодействие студента и [научного руководителя](#mentors).
|
||||||
|
|
||||||
|
@ -1,27 +0,0 @@
|
|||||||
---
|
|
||||||
content_type: magprog_mentor
|
|
||||||
name: Михаил Андреев
|
|
||||||
id: Andreev
|
|
||||||
image: images/mentors/Andreev.jpg
|
|
||||||
language: ru
|
|
||||||
---
|
|
||||||
#### Организация
|
|
||||||
Сбербанк КИБ
|
|
||||||
|
|
||||||
Департамент Глобальных Рынков
|
|
||||||
|
|
||||||
#### Биография
|
|
||||||
Образование.
|
|
||||||
МФТИ, факультет проблем физики и энергетики (2001).
|
|
||||||
Кандидат технических наук (2004), аспирантура Института Космических Исследований РАН, отдел технологий спутникового мониторинга.
|
|
||||||
|
|
||||||
Большой опыт работы в промышленной разработке программных систем. С 2013 года в инвестиционных банках для задач торговли и управления рисками внебиржевых производных финансовых инструментов.
|
|
||||||
|
|
||||||
Читаю на ФПМИ курс по выбору «Математические модели и численные методы в финансах» -- вводный курс по расчетам производных финансовых инструментов для 4ого курса бакалавриата.
|
|
||||||
|
|
||||||
#### Направление исследований
|
|
||||||
Производные финансовые инструменты, вычислительные финансы.
|
|
||||||
|
|
||||||
#### Требования к студентам
|
|
||||||
* Владение C++ и Python
|
|
||||||
* Базовые теоретические знания в области количественных финансов
|
|
@ -1,5 +0,0 @@
|
|||||||
**Сбербанк КИБ. Департамент Глобальных Рынков.**
|
|
||||||
|
|
||||||
Моделирование производных финансовые инструментов, вычислительные финансы.
|
|
||||||
|
|
||||||
Ключевые слова: *Вычислительные финансы, C++, Python.*
|
|
@ -3,8 +3,8 @@ content_type: magprog_mentor
|
|||||||
name: Андрей Александрович Ефанов
|
name: Андрей Александрович Ефанов
|
||||||
id: Efanov
|
id: Efanov
|
||||||
image: images/mentors/Efanov.jpg
|
image: images/mentors/Efanov.jpg
|
||||||
language: ru
|
|
||||||
published: false
|
published: false
|
||||||
|
language: ru
|
||||||
---
|
---
|
||||||
|
|
||||||
#### Организация
|
#### Организация
|
||||||
|
@ -1,35 +0,0 @@
|
|||||||
---
|
|
||||||
content_type: magprog_mentor
|
|
||||||
name: Алексей Юрьевич Горбачев
|
|
||||||
id: Gorbachev
|
|
||||||
image: images/mentors/Gorbachev.jpg
|
|
||||||
language: ru
|
|
||||||
---
|
|
||||||
|
|
||||||
#### Организация
|
|
||||||
Заведующий лабораторией протеомного анализа ФГБУ ФНКЦ ФХМ им. Ю.М. Лопухина ФМБА России.
|
|
||||||
|
|
||||||
#### Биография
|
|
||||||
* Победитель Всероссийской олимпиады по биологии (Диплом III степени, 2004).
|
|
||||||
* Обучение в МГУ им. М.В. Ломоносова, биологический факультет, кафедра молекулярной биологии (2004-2009).
|
|
||||||
* Обучение в аспирантуре ФГБУ ФНКЦ ФХМ ФМБА России по специальности Биохимия (2009-2012).
|
|
||||||
* Защита кандидатской диссертации (2014).
|
|
||||||
* Руководство проектом "Разработка системы генетического скрининга
|
|
||||||
сердечно-сосудистых заболеваний" в рамках программы трансляционных исследований и инноваций Сколковского Института Науки и Технологий при сотрудничестве с РЖД (2015-2016).
|
|
||||||
* Коммерческая деятельность в рамках собственной научно-исследовательской компании "Институт геномного анализа", создание проекта Zenome (2016-н.в.)
|
|
||||||
* Научная деятельность в ФГБУ ФНКЦ ФХМ им. Ю.М. Лопухина ФМБА России в должности заведующего лабораторий протеомного анализа (2022-н.в.)
|
|
||||||
|
|
||||||
#### Направление исследований
|
|
||||||
|
|
||||||
* Изучение механизмов долговременной эпигенетической памяти у адгезивно-инвазивных форм кишечной палочки (E. coli), ассоциированной с болезнью Крона.
|
|
||||||
* Исследование репертуаров T-клеточных рецепторов у пациентов с болезнью Крона.
|
|
||||||
* Протеогеномное профилирование образцов рака молочной железы как основа для разработки платформы прототипирования персонализированных панелей для тераностики.
|
|
||||||
* Разработка новых методов диагностики рака с помощью секвенирования свободной циркулирующей ДНК плазмы крови.
|
|
||||||
|
|
||||||
#### Требования к студентам
|
|
||||||
|
|
||||||
* Знание языков программирования: Python, R, bash.
|
|
||||||
* Умение работать с Git.
|
|
||||||
* Английский язык на уровне чтения технической документации.
|
|
||||||
* Знание ОС Linux и Windows на уровне опытного пользователя.
|
|
||||||
* Знания биохимии и молекулярной биологии на уровне университетской программы.
|
|
@ -1,3 +0,0 @@
|
|||||||
**Заведующий лабораторией протеомного анализа ФГБУ ФНКЦ ФХМ им. Ю.М. Лопухина ФМБА России.**
|
|
||||||
|
|
||||||
Ключевые слова: *Био-информатика, протеомный анализ, диагностика рака*.
|
|
@ -1,20 +0,0 @@
|
|||||||
---
|
|
||||||
content_type: magprog_mentor
|
|
||||||
name: Александр Владимирович Куликов
|
|
||||||
id: Kulikov
|
|
||||||
image: images/mentors/Kulikov.jpg
|
|
||||||
language: ru
|
|
||||||
---
|
|
||||||
|
|
||||||
* Руководитель проекта Департамента инцидентов и рисков АНО "Аналитический центр при Правительстве РФ".
|
|
||||||
* Доцент кафедры высшей математики МФТИ
|
|
||||||
|
|
||||||
#### Биография
|
|
||||||
Закончил в 2006 году механико-математический факультет МГУ, в 2009 защитил кандидатскую диссертацию по специальности 01.01.05 - теория вероятностей и математическая статистика по теме "Многомерные когерентные меры риска и их применение к решению задач финансовой математики". Доцент кафедры высшей математики, также преподает различные курсы по финансовой математике в физтех-школе ФПМИ. Сфера научных интересов - финансовая математика, оценка риска, ценообразование производных финансовых инструментов. Занимался риск-менеджментом в ООО "Газпром экспорт", ПАО "НК "Роснефть". На данный момент руководитель проекта Департамента инцидентов и рисков АНО "Аналитический центр при Правительстве РФ"
|
|
||||||
|
|
||||||
#### Направление исследований
|
|
||||||
|
|
||||||
Финансовая математика, оценка риска, ценообразование производных финансовых инструментов.
|
|
||||||
|
|
||||||
#### Требования к студентам
|
|
||||||
Хорошие знания теории вероятностей, математической статистики и случайных процессов, желательны базовые знания в финансовой математике.
|
|
@ -1,5 +0,0 @@
|
|||||||
**Руководитель проекта Департамента инцидентов и рисков АНО "Аналитический центр при Правительстве РФ"**
|
|
||||||
|
|
||||||
Финансовая математика, оценка риска, ценообразование производных финансовых инструментов.
|
|
||||||
|
|
||||||
Ключевые слова: *математические инструменты, финансы, оценка риска*
|
|
@ -4,7 +4,6 @@ name: Владимир Пальмин
|
|||||||
id: Palmin
|
id: Palmin
|
||||||
image: images/mentors/Palmin.jpg
|
image: images/mentors/Palmin.jpg
|
||||||
language: ru
|
language: ru
|
||||||
published: false
|
|
||||||
---
|
---
|
||||||
|
|
||||||
#### Организация
|
#### Организация
|
||||||
|
@ -4,7 +4,6 @@ name: Айно Константиновна Скасырская
|
|||||||
id: Skasyrskaya
|
id: Skasyrskaya
|
||||||
image: images/mentors/Skasyrskaya.jpg
|
image: images/mentors/Skasyrskaya.jpg
|
||||||
language: ru
|
language: ru
|
||||||
published: false
|
|
||||||
---
|
---
|
||||||
|
|
||||||
#### Организация
|
#### Организация
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
---
|
|
||||||
content_type: magprog_mentor
|
|
||||||
name: Тимур Жарников
|
|
||||||
id: Zharnikov
|
|
||||||
image: images/mentors/Zharnikov.jpg
|
|
||||||
language: ru
|
|
||||||
---
|
|
||||||
|
|
||||||
Ведущий научный сотрудник в области геофизических методов исследования скважин и распределенных оптоволоконных измерений.
|
|
||||||
|
|
||||||
#### Биография
|
|
||||||
Выпускник Физтеха. Тимур Жарников имеет более чем 20-летний опыт работы в области акустического каротажа, оптического зондирования и полимерной физики. Начал свою карьеру в Российской академии наук в области полимерной физики. Затем он работал с Schlumberger в качестве старшего научного сотрудника в течение более чем 10 лет по акустическому каротажу и распределенным измерениям волоконной оптики. Затем работал в других компаниях в качестве научного специалиста.
|
|
||||||
|
|
||||||
#### Направление исследований
|
|
||||||
|
|
||||||
Разработка эффективных методов анализа и интерпретации данных геофизических измерений (акустика и распределенные оптоволоконные измерения). Разработка научно-прикладного ПО.
|
|
||||||
|
|
||||||
#### Требования к студентам
|
|
||||||
Хорошая подготовка по физике и математике.
|
|
@ -1,5 +0,0 @@
|
|||||||
**Ведущий научный сотрудник в области геофизических методов исследования скважин и распределенных оптоволоконных измерений**
|
|
||||||
|
|
||||||
Разработка эффективных методов анализа и интерпретации данных геофизических измерений (акустика и распределенные оптоволоконные измерения). Разработка научно-прикладного ПО.
|
|
||||||
|
|
||||||
Ключевые слова: *научное ПО, вычислительная физика, акустика, прикладные исследования*
|
|
@ -6,9 +6,13 @@ image: images/mentors/kluev.jpg
|
|||||||
language: ru
|
language: ru
|
||||||
---
|
---
|
||||||
|
|
||||||
|
#### Организация
|
||||||
|
|
||||||
|
КПМ РИТМ
|
||||||
|
|
||||||
#### Биография
|
#### Биография
|
||||||
|
|
||||||
Учился и защищался в БелГУ, с 2022 года работаю в Julia ORG лидом команды программирующих математиков.
|
Учился и защищался в БелГУ, с 2022 года работаю в КПМ РИТМ лидом команды программирующих математиков.
|
||||||
|
|
||||||
#### Направления исследований
|
#### Направления исследований
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
**Лидер команды программирующих математиков на Julia**
|
**Лидер команды программирующих математиков КПМ РИТМ**
|
||||||
|
|
||||||
Разработка и исследования методов компьютерного моделирования гибридных динамических систем.
|
Разработка и исследования методов компьютерного моделирования гибридных динамических систем.
|
||||||
|
|
||||||
|
@ -6,14 +6,18 @@ image: images/mentors/komisov.jpg
|
|||||||
language: ru
|
language: ru
|
||||||
---
|
---
|
||||||
|
|
||||||
|
#### Организация
|
||||||
|
|
||||||
|
КПМ РИТМ
|
||||||
|
|
||||||
#### Биография
|
#### Биография
|
||||||
|
|
||||||
* 2019 - к.ф.-м.н.
|
2019 - к.ф.-м.н.
|
||||||
Московский государственный университет им. М.В. Ломоносова, Москва
|
Московский государственный университет им. М.В. Ломоносова, Москва
|
||||||
* 2012 - Магистр
|
2012 - Магистр
|
||||||
НИУ "БелГУ"
|
НИУ "БелГУ"
|
||||||
Инженерно физический, Кафедра теоретической и математической физики, Прикладные математика и физика
|
Инженерно физический, Кафедра теоретической и математической физики, Прикладные математика и физика
|
||||||
* 2010 - Бакалавр
|
2010 - Бакалавр
|
||||||
НИУ БелГУ
|
НИУ БелГУ
|
||||||
Инженерно физический, Кафедра теоретической и математической физики, Прикладные математика и физика
|
Инженерно физический, Кафедра теоретической и математической физики, Прикладные математика и физика
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
**Разработчик на Julia**
|
**CTO КПМ РИТМ**
|
||||||
|
|
||||||
Разработка и исследования методов компьютерного моделирования гибридных динамических систем.
|
Разработка и исследования методов компьютерного моделирования гибридных динамических систем.
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ name: Ирина Геннадьевна Низовцева
|
|||||||
id: Nizovtseva
|
id: Nizovtseva
|
||||||
image: images/mentors/Nizovtseva.jpg
|
image: images/mentors/Nizovtseva.jpg
|
||||||
language: ru
|
language: ru
|
||||||
published: false
|
|
||||||
---
|
---
|
||||||
#### Биография
|
#### Биография
|
||||||
* К.ф.-м.н. с 2009г (направление 01.04.14)
|
* К.ф.-м.н. с 2009г (направление 01.04.14)
|
||||||
|
Before Width: | Height: | Size: 253 KiB |
Before Width: | Height: | Size: 197 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 250 KiB |
@ -1,4 +1,4 @@
|
|||||||
kotlin.code.style=official
|
kotlin.code.style=official
|
||||||
|
|
||||||
toolsVersion=0.15.2-kotlin-1.9.22
|
toolsVersion=0.14.9-kotlin-1.8.20
|
||||||
snarkVersion=0.1.0-dev-1
|
snarkVersion=0.1.0-dev-1
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
rootProject.name = "spc-site"
|
rootProject.name = "spc-site"
|
||||||
|
|
||||||
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
|
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
|
||||||
|
//enableFeaturePreview("VERSION_CATALOGS")
|
||||||
|
|
||||||
pluginManagement {
|
pluginManagement {
|
||||||
|
|
||||||
|
@ -4,22 +4,63 @@ import io.ktor.server.application.Application
|
|||||||
import io.ktor.server.application.call
|
import io.ktor.server.application.call
|
||||||
import io.ktor.server.application.install
|
import io.ktor.server.application.install
|
||||||
import io.ktor.server.application.log
|
import io.ktor.server.application.log
|
||||||
|
import io.ktor.server.config.tryGetString
|
||||||
import io.ktor.server.plugins.forwardedheaders.ForwardedHeaders
|
import io.ktor.server.plugins.forwardedheaders.ForwardedHeaders
|
||||||
import io.ktor.server.plugins.forwardedheaders.XForwardedHeaders
|
import io.ktor.server.plugins.forwardedheaders.XForwardedHeaders
|
||||||
import io.ktor.server.response.respondRedirect
|
import io.ktor.server.response.respondRedirect
|
||||||
import io.ktor.server.routing.get
|
import io.ktor.server.routing.get
|
||||||
import io.ktor.server.routing.routing
|
import io.ktor.server.routing.routing
|
||||||
import space.kscience.dataforge.context.Context
|
import space.kscience.dataforge.context.Global
|
||||||
import space.kscience.dataforge.context.request
|
import space.kscience.dataforge.context.request
|
||||||
import space.kscience.dataforge.data.forEach
|
import space.kscience.dataforge.data.DataTree
|
||||||
import space.kscience.dataforge.names.Name
|
import space.kscience.snark.html.SiteBuilder
|
||||||
import space.kscience.dataforge.workspace.FileData
|
import space.kscience.snark.html.SnarkHtmlPlugin
|
||||||
import space.kscience.dataforge.workspace.directory
|
import space.kscience.snark.html.readDirectory
|
||||||
import space.kscience.snark.html.SnarkHtml
|
import space.kscience.snark.ktor.prepareSnarkDataCacheDirectory
|
||||||
import space.kscience.snark.html.readSiteData
|
|
||||||
import space.kscience.snark.ktor.site
|
import space.kscience.snark.ktor.site
|
||||||
import kotlin.io.path.Path
|
import java.nio.file.FileSystems
|
||||||
import kotlin.io.path.exists
|
import java.nio.file.Files
|
||||||
|
import java.nio.file.Path
|
||||||
|
import kotlin.io.path.createDirectories
|
||||||
|
import kotlin.io.path.isRegularFile
|
||||||
|
import kotlin.io.path.relativeTo
|
||||||
|
import kotlin.io.path.toPath
|
||||||
|
|
||||||
|
|
||||||
|
private fun Application.copyResource(resource: String, dataDirectory: Path) {
|
||||||
|
val uri = javaClass.getResource("/$resource")?.toURI()
|
||||||
|
?: error("Resource $resource not found")
|
||||||
|
val targetPath = dataDirectory.resolve(resource)
|
||||||
|
|
||||||
|
if (Files.isDirectory(targetPath)) {
|
||||||
|
log.info("Using existing data directory at $targetPath.")
|
||||||
|
} else {
|
||||||
|
log.info("Copying data from $uri into $targetPath.")
|
||||||
|
targetPath.createDirectories()
|
||||||
|
//Copy everything into a temporary directory
|
||||||
|
|
||||||
|
fun copyFromPath(rootPath: Path) {
|
||||||
|
Files.walk(rootPath).forEach { source: Path ->
|
||||||
|
if (source.isRegularFile()) {
|
||||||
|
val relative = source.relativeTo(rootPath).toString()
|
||||||
|
val destination: Path = targetPath.resolve(relative)
|
||||||
|
destination.parent.createDirectories()
|
||||||
|
Files.copy(source, destination)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ("jar" == uri.scheme) {
|
||||||
|
FileSystems.newFileSystem(uri, emptyMap<String, Any>()).use { fs ->
|
||||||
|
val rootPath: Path = fs.provider().getPath(uri)
|
||||||
|
copyFromPath(rootPath)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
val rootPath = uri.toPath()
|
||||||
|
copyFromPath(rootPath)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@ -28,33 +69,26 @@ fun Application.spcModule() {
|
|||||||
install(ForwardedHeaders)
|
install(ForwardedHeaders)
|
||||||
install(XForwardedHeaders)
|
install(XForwardedHeaders)
|
||||||
|
|
||||||
val context = Context {
|
val snark = Global.request(SnarkHtmlPlugin)
|
||||||
plugin(SnarkHtml)
|
|
||||||
|
val dataDirectory = Path.of(
|
||||||
|
environment.config.tryGetString("ktor.environment.dataDirectory") ?: "data"
|
||||||
|
)
|
||||||
|
|
||||||
|
if (!prepareSnarkDataCacheDirectory(dataDirectory)) {
|
||||||
|
copyResource("common", dataDirectory)
|
||||||
|
copyResource("home", dataDirectory)
|
||||||
|
copyResource("magprog", dataDirectory)
|
||||||
}
|
}
|
||||||
|
|
||||||
val snark = context.request(SnarkHtml)
|
val siteData: DataTree<Any> = snark.readDirectory(dataDirectory)
|
||||||
|
|
||||||
val dataDirectoryString = environment.config.propertyOrNull("snark.dataDirectory")?.getString() ?: "data"
|
site(snark, siteData, block = SiteBuilder::spcSite)
|
||||||
|
|
||||||
val dataDirectory = Path(dataDirectoryString)
|
|
||||||
|
|
||||||
if(!dataDirectory.exists()){
|
|
||||||
error("Data directory at $dataDirectory is not resolved")
|
|
||||||
}
|
|
||||||
|
|
||||||
val siteData = snark.readSiteData(context) {
|
|
||||||
directory(snark.io, Name.EMPTY, dataDirectory)
|
|
||||||
}
|
|
||||||
|
|
||||||
siteData.forEach { namedData ->
|
|
||||||
log.debug("Loading data {} from {}", namedData.name, namedData.meta[FileData.FILE_PATH_KEY])
|
|
||||||
}
|
|
||||||
|
|
||||||
routing {
|
routing {
|
||||||
get("magprog") {
|
get("magprog") {
|
||||||
call.respondRedirect("education/masters")
|
call.respondRedirect("education/masters")
|
||||||
}
|
}
|
||||||
site(context, siteData, content = spcSite)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@ package center.sciprog
|
|||||||
import kotlinx.coroutines.runBlocking
|
import kotlinx.coroutines.runBlocking
|
||||||
import kotlinx.html.*
|
import kotlinx.html.*
|
||||||
import space.kscience.dataforge.data.Data
|
import space.kscience.dataforge.data.Data
|
||||||
|
import space.kscience.dataforge.data.DataTree
|
||||||
import space.kscience.dataforge.data.await
|
import space.kscience.dataforge.data.await
|
||||||
import space.kscience.dataforge.data.getByType
|
import space.kscience.dataforge.data.getByType
|
||||||
import space.kscience.dataforge.meta.Meta
|
import space.kscience.dataforge.meta.Meta
|
||||||
@ -10,6 +11,7 @@ import space.kscience.dataforge.meta.get
|
|||||||
import space.kscience.dataforge.meta.getIndexed
|
import space.kscience.dataforge.meta.getIndexed
|
||||||
import space.kscience.dataforge.meta.string
|
import space.kscience.dataforge.meta.string
|
||||||
import space.kscience.dataforge.names.Name
|
import space.kscience.dataforge.names.Name
|
||||||
|
import space.kscience.dataforge.names.parseAsName
|
||||||
import space.kscience.snark.html.*
|
import space.kscience.snark.html.*
|
||||||
|
|
||||||
|
|
||||||
@ -20,19 +22,22 @@ private val Data<*>.fragment: String
|
|||||||
get() = meta["fragment"].string ?: ""
|
get() = meta["fragment"].string ?: ""
|
||||||
|
|
||||||
|
|
||||||
internal val bmk = HtmlSite {
|
internal fun SiteBuilder.bmk(data: DataTree<Any>, prefix: Name = "bmk".parseAsName()) {
|
||||||
|
|
||||||
|
// val data: DataTree<Any> = snark.readDirectory(dataPath.resolve("content"))
|
||||||
|
|
||||||
|
site(prefix, data) {
|
||||||
static("assets")
|
static("assets")
|
||||||
static("images")
|
static("images")
|
||||||
static("common.assets.webfonts", "assets/webfonts")
|
static("common.assets.webfonts", "assets/webfonts")
|
||||||
static("common", "")
|
static("common", "")
|
||||||
|
|
||||||
val about: Data<PageFragment> = siteData.resolveHtml("about")
|
val about: Data<HtmlFragment> = data.resolveHtml("about")
|
||||||
val team: Data<PageFragment> = siteData.resolveHtml("team.index")
|
val team: Data<HtmlFragment> = data.resolveHtml("team.index")
|
||||||
val teamData: Map<Name, Data<PageFragment>> = siteData.resolveAllHtml { _, meta -> meta["type"].string == "team" }
|
val teamData: Map<Name, Data<HtmlFragment>> = data.resolveAllHtml { _, meta -> meta["type"].string == "team" }
|
||||||
val solutions: Data<PageFragment> = siteData.resolveHtml("lotSeis")
|
val solutions: Data<HtmlFragment> = data.resolveHtml("lotSeis")
|
||||||
val partners: Data<PageFragment> = siteData.resolveHtml("partners")
|
val partners: Data<HtmlFragment> = data.resolveHtml("partners")
|
||||||
val partnersData = runBlocking { siteData.getByType<Meta>("partnersData")!!.await() }
|
val partnersData = runBlocking { data.getByType<Meta>("partnersData")!!.await() }
|
||||||
|
|
||||||
page {
|
page {
|
||||||
head {
|
head {
|
||||||
@ -125,7 +130,7 @@ internal val bmk = HtmlSite {
|
|||||||
header("major") {
|
header("major") {
|
||||||
h2 { +about.title }
|
h2 { +about.title }
|
||||||
}
|
}
|
||||||
fragment(about)
|
htmlData(about)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -134,7 +139,7 @@ internal val bmk = HtmlSite {
|
|||||||
header("major") {
|
header("major") {
|
||||||
h2 { +team.title }
|
h2 { +team.title }
|
||||||
}
|
}
|
||||||
fragment(team)
|
htmlData(team)
|
||||||
teamData.values.sortedBy { it.order }.forEach { data ->
|
teamData.values.sortedBy { it.order }.forEach { data ->
|
||||||
span("image left") {
|
span("image left") {
|
||||||
img {
|
img {
|
||||||
@ -143,14 +148,14 @@ internal val bmk = HtmlSite {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
h3 { +data.title }
|
h3 { +data.title }
|
||||||
fragment(data)
|
htmlData(data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
section("main") {
|
section("main") {
|
||||||
id = solutions.fragment
|
id = solutions.fragment
|
||||||
header("major") {
|
header("major") {
|
||||||
h2 { +solutions.title }
|
h2 { +solutions.title }
|
||||||
fragment(solutions)
|
htmlData(solutions)
|
||||||
span("image fit") {
|
span("image fit") {
|
||||||
img {
|
img {
|
||||||
src = resolveRef("images/fresnel_lands_critdepth2.png")
|
src = resolveRef("images/fresnel_lands_critdepth2.png")
|
||||||
@ -162,7 +167,7 @@ internal val bmk = HtmlSite {
|
|||||||
id = partners.fragment
|
id = partners.fragment
|
||||||
header("major") {
|
header("major") {
|
||||||
h2 { +partners.title }
|
h2 { +partners.title }
|
||||||
fragment(partners)
|
htmlData(partners)
|
||||||
table {
|
table {
|
||||||
partnersData.getIndexed("content").values.forEach {
|
partnersData.getIndexed("content").values.forEach {
|
||||||
tr {
|
tr {
|
||||||
@ -284,3 +289,4 @@ internal val bmk = HtmlSite {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -7,19 +7,15 @@ import space.kscience.dataforge.meta.Meta
|
|||||||
import space.kscience.dataforge.meta.get
|
import space.kscience.dataforge.meta.get
|
||||||
import space.kscience.dataforge.meta.int
|
import space.kscience.dataforge.meta.int
|
||||||
import space.kscience.dataforge.meta.string
|
import space.kscience.dataforge.meta.string
|
||||||
import space.kscience.dataforge.names.Name
|
import space.kscience.dataforge.names.*
|
||||||
import space.kscience.dataforge.names.NameToken
|
|
||||||
import space.kscience.dataforge.names.parseAsName
|
|
||||||
import space.kscience.dataforge.names.replaceLast
|
|
||||||
import space.kscience.snark.html.*
|
import space.kscience.snark.html.*
|
||||||
import kotlin.collections.component1
|
import kotlin.collections.component1
|
||||||
import kotlin.collections.component2
|
import kotlin.collections.component2
|
||||||
import kotlin.collections.set
|
import kotlin.collections.set
|
||||||
|
|
||||||
|
context(WebPage) private fun FlowContent.spcSpotlightContent(
|
||||||
context(PageContextWithData, FlowContent) private fun spcSpotlightContent(
|
landing: HtmlData,
|
||||||
landing: Data<PageFragment>,
|
content: Map<Name, HtmlData>,
|
||||||
content: Map<Name, Data<PageFragment>>,
|
|
||||||
) {
|
) {
|
||||||
// Banner
|
// Banner
|
||||||
// Note: The "styleN" class below should match that of the header element.
|
// Note: The "styleN" class below should match that of the header element.
|
||||||
@ -36,7 +32,7 @@ context(PageContextWithData, FlowContent) private fun spcSpotlightContent(
|
|||||||
h1 { +(landing.meta["title"].string ?: "???") }
|
h1 { +(landing.meta["title"].string ?: "???") }
|
||||||
}
|
}
|
||||||
div("content") {
|
div("content") {
|
||||||
fragment(landing)
|
htmlData(landing)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -67,9 +63,8 @@ context(PageContextWithData, FlowContent) private fun spcSpotlightContent(
|
|||||||
header("major") {
|
header("major") {
|
||||||
h3 { +(entry.meta["title"].string ?: "???") }
|
h3 { +(entry.meta["title"].string ?: "???") }
|
||||||
}
|
}
|
||||||
val infoData =
|
val infoData = data.resolveHtmlOrNull(name.replaceLast { NameToken(it.body + "[info]") }) ?: entry
|
||||||
data.resolveHtmlOrNull(name.replaceLast { NameToken(it.body + "[info]") }) ?: entry
|
htmlData(infoData)
|
||||||
fragment(infoData)
|
|
||||||
ul("actions") {
|
ul("actions") {
|
||||||
li {
|
li {
|
||||||
a(classes = "button") {
|
a(classes = "button") {
|
||||||
@ -87,13 +82,16 @@ context(PageContextWithData, FlowContent) private fun spcSpotlightContent(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
internal fun SiteContextWithData.spcSpotlight(
|
internal fun SiteBuilder.spcSpotlight(
|
||||||
address: String,
|
address: String,
|
||||||
contentFilter: (Name, Meta) -> Boolean,
|
contentFilter: (Name, Meta) -> Boolean,
|
||||||
) {
|
) {
|
||||||
val pageName = address.parseAsName()
|
val pageName = address.parseAsName()
|
||||||
val body = siteData.resolveHtmlOrNull(pageName) ?: error("Could not find body for $pageName")
|
val languagePrefix = languagePrefix
|
||||||
val content: Map<Name, Data<PageFragment>> = siteData.resolveAllHtml { name, meta -> contentFilter(name, meta) }
|
val body = data.resolveHtmlOrNull(languagePrefix + pageName)
|
||||||
|
?: data.resolveHtmlOrNull(pageName) ?: error("Could not find body for $pageName")
|
||||||
|
val content: Map<Name, Data<HtmlFragment>> =
|
||||||
|
data.resolveAllHtml { name, meta -> name.startsWith(languagePrefix) && contentFilter(name, meta) }
|
||||||
|
|
||||||
val meta = body.meta
|
val meta = body.meta
|
||||||
page(pageName) {
|
page(pageName) {
|
||||||
@ -109,6 +107,10 @@ internal fun SiteContextWithData.spcSpotlight(
|
|||||||
}
|
}
|
||||||
|
|
||||||
content.forEach { (name, contentBody) ->
|
content.forEach { (name, contentBody) ->
|
||||||
page(name, contentBody.meta, spcPage(contentBody))
|
page(name, contentBody.meta) {
|
||||||
|
spcPageContent {
|
||||||
|
htmlData(contentBody)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,17 +2,19 @@ package center.sciprog
|
|||||||
|
|
||||||
import html5up.forty.fortyScripts
|
import html5up.forty.fortyScripts
|
||||||
import kotlinx.html.*
|
import kotlinx.html.*
|
||||||
import space.kscience.dataforge.data.*
|
import space.kscience.dataforge.data.Data
|
||||||
import space.kscience.dataforge.meta.Meta
|
import space.kscience.dataforge.data.DataTree
|
||||||
import space.kscience.dataforge.meta.get
|
import space.kscience.dataforge.meta.*
|
||||||
import space.kscience.dataforge.meta.string
|
|
||||||
import space.kscience.dataforge.names.Name
|
import space.kscience.dataforge.names.Name
|
||||||
import space.kscience.dataforge.names.asName
|
import space.kscience.dataforge.names.asName
|
||||||
import space.kscience.dataforge.names.startsWith
|
import space.kscience.dataforge.names.startsWith
|
||||||
import space.kscience.snark.html.*
|
import space.kscience.snark.html.*
|
||||||
|
import kotlin.reflect.typeOf
|
||||||
|
|
||||||
|
|
||||||
internal fun spcPage(content: Data<PageFragment>) = HtmlPage {
|
context(WebPage) internal fun HTML.spcPageContent(
|
||||||
|
fragment: FlowContent.() -> Unit,
|
||||||
|
) {
|
||||||
val title by pageMeta.string { SPC_TITLE }
|
val title by pageMeta.string { SPC_TITLE }
|
||||||
val pageName by pageMeta.string { title }
|
val pageName by pageMeta.string { title }
|
||||||
spcHead(pageName)
|
spcHead(pageName)
|
||||||
@ -28,8 +30,7 @@ internal fun spcPage(content: Data<PageFragment>) = HtmlPage {
|
|||||||
}
|
}
|
||||||
pageMeta["image"]?.let { imageMeta ->
|
pageMeta["image"]?.let { imageMeta ->
|
||||||
val imagePath =
|
val imagePath =
|
||||||
imageMeta.value?.string ?: imageMeta["path"].string
|
imageMeta.value?.string ?: imageMeta["path"].string ?: error("Image path not provided")
|
||||||
?: error("Image path not provided")
|
|
||||||
val imageClass = imageMeta["position"].string ?: "main"
|
val imageClass = imageMeta["position"].string ?: "main"
|
||||||
span("image $imageClass") {
|
span("image $imageClass") {
|
||||||
img {
|
img {
|
||||||
@ -38,7 +39,7 @@ internal fun spcPage(content: Data<PageFragment>) = HtmlPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fragment(content)
|
fragment()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -48,7 +49,34 @@ internal fun spcPage(content: Data<PageFragment>) = HtmlPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal val spcHomePage = HtmlPage {
|
@Suppress("UNCHECKED_CAST")
|
||||||
|
internal val FortyDataRenderer: DataRenderer = object : DataRenderer {
|
||||||
|
|
||||||
|
context(SiteBuilder)
|
||||||
|
override fun invoke(name: Name, data: Data<Any>) {
|
||||||
|
if (data.type == typeOf<HtmlFragment>()) {
|
||||||
|
data as Data<HtmlFragment>
|
||||||
|
val languageMeta: Meta = Language.forName(name)
|
||||||
|
|
||||||
|
val dataMeta: Meta = if (languageMeta.isEmpty()) {
|
||||||
|
data.meta
|
||||||
|
} else {
|
||||||
|
data.meta.toMutableMeta().apply {
|
||||||
|
Language.LANGUAGES_KEY put languageMeta
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
page(name, dataMeta) {
|
||||||
|
spcPageContent {
|
||||||
|
htmlData(data)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
context(WebPage) private fun HTML.spcHomePage() {
|
||||||
spcHead()
|
spcHead()
|
||||||
body("is-preload") {
|
body("is-preload") {
|
||||||
wrapper {
|
wrapper {
|
||||||
@ -82,23 +110,23 @@ internal val spcHomePage = HtmlPage {
|
|||||||
// Main
|
// Main
|
||||||
div {
|
div {
|
||||||
id = "main"
|
id = "main"
|
||||||
// section {
|
section {
|
||||||
// div("inner home_creationinfo") {
|
div("inner home_creationinfo") {
|
||||||
// a(href = "https://mipt.ru/education/departments/fpmi/") {
|
a(href = "https://mipt.ru/education/departments/fpmi/") {
|
||||||
// span("image") {
|
span("image") {
|
||||||
// img {
|
img {
|
||||||
// src = "images/FPMI.jpg"
|
src = "images/FPMI.jpg"
|
||||||
// alt = "FPMI"
|
alt = "FPMI"
|
||||||
// height = "60dp"
|
height = "60dp"
|
||||||
// width = "60dp"
|
width = "60dp"
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// p {
|
p {
|
||||||
// +"Centre was created in 2022 based on the Phystech School of Applied Mathematics and Informatics at MIPT"
|
+"Centre was created in 2022 based on the Phystech School of Applied Mathematics and Informatics at MIPT"
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
section {
|
section {
|
||||||
div("inner") {
|
div("inner") {
|
||||||
@ -128,14 +156,14 @@ internal val spcHomePage = HtmlPage {
|
|||||||
article {
|
article {
|
||||||
span("image") {
|
span("image") {
|
||||||
img {
|
img {
|
||||||
src = page.resolveRef("images/pic01.jpg")
|
src = resolveRef("images/pic01.jpg")
|
||||||
alt = ""
|
alt = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
header("major") {
|
header("major") {
|
||||||
h3 {
|
h3 {
|
||||||
a(classes = "link") {
|
a(classes = "link") {
|
||||||
href = page.resolvePageRef("education")
|
href = resolvePageRef("education")
|
||||||
+"""Education"""
|
+"""Education"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -145,14 +173,14 @@ internal val spcHomePage = HtmlPage {
|
|||||||
article {
|
article {
|
||||||
span("image") {
|
span("image") {
|
||||||
img {
|
img {
|
||||||
src = page.resolveRef("images/pic02.jpg")
|
src = resolveRef("images/pic02.jpg")
|
||||||
alt = ""
|
alt = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
header("major") {
|
header("major") {
|
||||||
h3 {
|
h3 {
|
||||||
a(classes = "link") {
|
a(classes = "link") {
|
||||||
href = page.resolvePageRef("research")
|
href = resolvePageRef("research")
|
||||||
+"""Research"""
|
+"""Research"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -164,14 +192,14 @@ internal val spcHomePage = HtmlPage {
|
|||||||
article {
|
article {
|
||||||
span("image") {
|
span("image") {
|
||||||
img {
|
img {
|
||||||
src = page.resolveRef("images/pic03.jpg")
|
src = resolveRef("images/pic03.jpg")
|
||||||
alt = ""
|
alt = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
header("major") {
|
header("major") {
|
||||||
h3 {
|
h3 {
|
||||||
a(classes = "link") {
|
a(classes = "link") {
|
||||||
href = page.resolvePageRef("consulting.index")
|
href = resolvePageRef("consulting.index")
|
||||||
+"""Consulting"""
|
+"""Consulting"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -181,14 +209,14 @@ internal val spcHomePage = HtmlPage {
|
|||||||
article {
|
article {
|
||||||
span("image") {
|
span("image") {
|
||||||
img {
|
img {
|
||||||
src = page.resolveRef("images/pic04.jpg")
|
src = resolveRef("images/pic04.jpg")
|
||||||
alt = ""
|
alt = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
header("major") {
|
header("major") {
|
||||||
h3 {
|
h3 {
|
||||||
a(classes = "link") {
|
a(classes = "link") {
|
||||||
href = page.resolvePageRef("team")
|
href = resolvePageRef("team")
|
||||||
+"""Team"""
|
+"""Team"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -235,29 +263,24 @@ internal val spcHomePage = HtmlPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun SiteContextWithData.allPagesIn(location: String) {
|
internal fun SiteBuilder.spcHome(homePageData: DataTree<Any>, prefix: Name = Name.EMPTY) {
|
||||||
siteData.filterByType<PageFragment> { name, meta, _ ->
|
|
||||||
name.startsWith(location) && meta["type"].string == "page"
|
|
||||||
}.forEach { (name, content) ->
|
|
||||||
page(name, content = spcPage(content), pageMeta = content.meta)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
//val homePageData: DataTree<Any> = snark.readDirectory(dataPath.resolve("content"))
|
||||||
|
|
||||||
internal val spcHome: HtmlSite = HtmlSite {
|
site(prefix, homePageData) {
|
||||||
multiLanguageSite(
|
|
||||||
Language("en", route = Name.EMPTY),
|
|
||||||
Language("ru"),
|
|
||||||
) {
|
|
||||||
static("assets")
|
static("assets")
|
||||||
static("images")
|
static("images")
|
||||||
static("common", "")
|
static("common", "")
|
||||||
|
|
||||||
page(content = spcHomePage, pageMeta = siteData.meta ?: Meta.EMPTY)
|
withLanguages(
|
||||||
|
"en" to "",
|
||||||
|
"ru" to "ru"
|
||||||
|
) {
|
||||||
|
page { spcHomePage() }
|
||||||
|
|
||||||
allPagesIn("consulting")
|
localizedPages("consulting", dataRenderer = FortyDataRenderer)
|
||||||
|
|
||||||
allPagesIn("education")
|
localizedPages("education", dataRenderer = FortyDataRenderer)
|
||||||
|
|
||||||
spcSpotlight("team") { _, meta ->
|
spcSpotlight("team") { _, meta ->
|
||||||
meta["type"].string == "team"
|
meta["type"].string == "team"
|
||||||
@ -267,5 +290,5 @@ internal val spcHome: HtmlSite = HtmlSite {
|
|||||||
name.startsWith("projects".asName()) && meta["type"].string == "project"
|
name.startsWith("projects".asName()) && meta["type"].string == "project"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -2,7 +2,7 @@ package center.sciprog
|
|||||||
|
|
||||||
import kotlinx.coroutines.runBlocking
|
import kotlinx.coroutines.runBlocking
|
||||||
import kotlinx.html.*
|
import kotlinx.html.*
|
||||||
import space.kscience.dataforge.data.Data
|
import space.kscience.dataforge.data.DataTree
|
||||||
import space.kscience.dataforge.data.await
|
import space.kscience.dataforge.data.await
|
||||||
import space.kscience.dataforge.data.getByType
|
import space.kscience.dataforge.data.getByType
|
||||||
import space.kscience.dataforge.meta.Meta
|
import space.kscience.dataforge.meta.Meta
|
||||||
@ -29,38 +29,35 @@ import kotlin.collections.set
|
|||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
private val Data<PageFragment>.imagePath: String? get() = meta["image"]?.string ?: meta["image.path"].string
|
private val HtmlData.imagePath: String? get() = meta["image"]?.string ?: meta["image.path"].string
|
||||||
private val Data<PageFragment>.name: String get() = meta["name"].string ?: error("Name not found")
|
private val HtmlData.name: String get() = meta["name"].string ?: error("Name not found")
|
||||||
|
|
||||||
context(PageContext)
|
context(WebPage) class MagProgSection(
|
||||||
class MagProgSection(
|
|
||||||
val id: String,
|
val id: String,
|
||||||
val title: String,
|
val title: String,
|
||||||
val style: String,
|
val style: String,
|
||||||
val content: FlowContent.() -> Unit,
|
val content: FlowContent.() -> Unit,
|
||||||
)
|
)
|
||||||
|
|
||||||
context(PageContext)
|
context(WebPage) private fun wrapSection(
|
||||||
private fun wrapSection(
|
|
||||||
id: String,
|
id: String,
|
||||||
title: String,
|
title: String,
|
||||||
sectionContent: FlowContent.() -> Unit,
|
sectionContent: FlowContent.() -> Unit,
|
||||||
): MagProgSection = MagProgSection(id, title, "wrapper style1 fullscreen") {
|
): MagProgSection = MagProgSection(id, title, "wrapper style1 fullscreen fade-up") {
|
||||||
div("inner") {
|
div("inner") {
|
||||||
h2 { +title }
|
h2 { +title }
|
||||||
sectionContent()
|
sectionContent()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
context(PageContextWithData)
|
context(WebPage) private fun wrapSection(
|
||||||
private fun wrapSection(
|
block: HtmlData,
|
||||||
section: Data<PageFragment>,
|
|
||||||
idOverride: String? = null,
|
idOverride: String? = null,
|
||||||
): MagProgSection = wrapSection(
|
): MagProgSection = wrapSection(
|
||||||
idOverride ?: section.id,
|
idOverride ?: block.id,
|
||||||
section.meta["section_title"]?.string ?: error("Section without title"),
|
block.meta["section_title"]?.string ?: error("Section without title"),
|
||||||
) {
|
) {
|
||||||
fragment(section)
|
htmlData(block)
|
||||||
}
|
}
|
||||||
|
|
||||||
private val CONTENT_NODE_NAME = Name.EMPTY//"content".asName()
|
private val CONTENT_NODE_NAME = Name.EMPTY//"content".asName()
|
||||||
@ -71,29 +68,26 @@ private val PROGRAM_PATH: Name = CONTENT_NODE_NAME + "program"
|
|||||||
private val RECOMMENDED_COURSES_PATH: Name = CONTENT_NODE_NAME + "recommendedCourses"
|
private val RECOMMENDED_COURSES_PATH: Name = CONTENT_NODE_NAME + "recommendedCourses"
|
||||||
private val PARTNERS_PATH: Name = CONTENT_NODE_NAME + "partners"
|
private val PARTNERS_PATH: Name = CONTENT_NODE_NAME + "partners"
|
||||||
|
|
||||||
private val programSection = PageFragment {
|
context(WebPage) private fun FlowContent.programSection() {
|
||||||
val programBlock = data.resolveHtmlOrNull(PROGRAM_PATH)!!
|
val programBlock = data.resolveHtmlOrNull(PROGRAM_PATH)!!
|
||||||
val recommendedBlock = data.resolveHtmlOrNull(RECOMMENDED_COURSES_PATH)!!
|
val recommendedBlock = data.resolveHtmlOrNull(RECOMMENDED_COURSES_PATH)!!
|
||||||
div("inner") {
|
div("inner") {
|
||||||
h2 { +"Учебная программа" }
|
h2 { +"Учебная программа" }
|
||||||
fragment(programBlock)
|
htmlData(programBlock)
|
||||||
button(classes = "fit collapsible") {
|
button(classes = "fit collapsible") {
|
||||||
attributes["data-target"] = "recommended-courses-content"
|
attributes["data-target"] = "recommended-courses-content"
|
||||||
+"Рекомендованные курсы"
|
+"Рекомендованные курсы"
|
||||||
}
|
}
|
||||||
div(classes = "collapsible-content") {
|
div(classes = "collapsible-content") {
|
||||||
id = "recommended-courses-content"
|
id = "recommended-courses-content"
|
||||||
fragment(recommendedBlock)
|
htmlData(recommendedBlock)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
context(WebPage) private fun FlowContent.partners() {
|
||||||
private val partners = PageFragment {
|
//val partnersData: Meta = resolve<Any>(PARTNERS_PATH)?.meta ?: Meta.EMPTY
|
||||||
val partnersData: Meta = runBlocking {
|
val partnersData: Meta = runBlocking { data.getByType<Meta>(PARTNERS_PATH)?.await() } ?: Meta.EMPTY
|
||||||
//TODO add meta reading step to data preparation
|
|
||||||
data.getByType<Meta>(PARTNERS_PATH)?.await()
|
|
||||||
} ?: Meta.EMPTY
|
|
||||||
div("inner") {
|
div("inner") {
|
||||||
h2 { +"Партнеры" }
|
h2 { +"Партнеры" }
|
||||||
div("features") {
|
div("features") {
|
||||||
@ -121,8 +115,8 @@ private val partners = PageFragment {
|
|||||||
// val photo: String? by meta.string()
|
// val photo: String? by meta.string()
|
||||||
//}
|
//}
|
||||||
|
|
||||||
private val team = PageFragment {
|
context(WebPage) private fun FlowContent.team() {
|
||||||
val team = data.findHtmlByContentType("magprog_team").values.sortedBy { it.order }
|
val team = data.findByContentType("magprog_team").values.sortedBy { it.order }
|
||||||
|
|
||||||
div("inner") {
|
div("inner") {
|
||||||
h2 { +"Команда" }
|
h2 { +"Команда" }
|
||||||
@ -137,7 +131,7 @@ private val team = PageFragment {
|
|||||||
alt = imagePath
|
alt = imagePath
|
||||||
) {
|
) {
|
||||||
h3 { +member.name }
|
h3 { +member.name }
|
||||||
fragment(member)
|
htmlData(member)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -176,8 +170,8 @@ private val team = PageFragment {
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
val mentors = PageFragment {
|
context(WebPage) private fun FlowContent.mentors() {
|
||||||
val mentors = data.findHtmlByContentType("magprog_mentor").entries.sortedBy { it.value.id }
|
val mentors = data.findByContentType("magprog_mentor").entries.sortedBy { it.value.id }
|
||||||
|
|
||||||
div("inner") {
|
div("inner") {
|
||||||
h2 {
|
h2 {
|
||||||
@ -206,7 +200,7 @@ val mentors = PageFragment {
|
|||||||
}
|
}
|
||||||
val info = data.resolveHtmlOrNull(name.replaceLast { NameToken(it.body + "[info]") })
|
val info = data.resolveHtmlOrNull(name.replaceLast { NameToken(it.body + "[info]") })
|
||||||
if (info != null) {
|
if (info != null) {
|
||||||
fragment(info)
|
htmlData(info)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -214,8 +208,7 @@ val mentors = PageFragment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
context(PageContext)
|
context(WebPage) internal fun HTML.magProgHead(title: String) {
|
||||||
internal fun HTML.magProgHead(title: String) {
|
|
||||||
head {
|
head {
|
||||||
title {
|
title {
|
||||||
+title
|
+title
|
||||||
@ -265,8 +258,7 @@ internal fun HTML.magProgHead(title: String) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
context(PageContext)
|
context(WebPage) internal fun BODY.magProgFooter() {
|
||||||
internal fun BODY.magProgFooter() {
|
|
||||||
footer("wrapper style1-alt") {
|
footer("wrapper style1-alt") {
|
||||||
id = "footer"
|
id = "footer"
|
||||||
div("inner") {
|
div("inner") {
|
||||||
@ -305,43 +297,46 @@ internal fun BODY.magProgFooter() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
context(SnarkContext) private val Data<PageFragment>.mentorPageId get() = "mentor-${id}"
|
context(SnarkContext) private val HtmlData.mentorPageId get() = "mentor-${id}"
|
||||||
|
|
||||||
|
internal fun SiteBuilder.spcMasters(magProgData: DataTree<Any>, prefix: Name = "education.masters".parseAsName()) {
|
||||||
|
|
||||||
internal val spcMasters = HtmlSite {
|
//val magProgData: DataTree<Any> = snark.readDirectory(dataPath.resolve("content"))
|
||||||
|
|
||||||
|
site(prefix, magProgData) {
|
||||||
static("assets")
|
static("assets")
|
||||||
static("images")
|
static("images")
|
||||||
static("common", "")
|
static("common", "")
|
||||||
|
|
||||||
page {
|
page {
|
||||||
val sections = listOf(
|
val sections = listOf<MagProgSection>(
|
||||||
wrapSection(data.resolveHtmlOrNull(INTRO_PATH)!!, "intro"),
|
wrapSection(page.data.resolveHtmlOrNull(INTRO_PATH)!!, "intro"),
|
||||||
MagProgSection(
|
MagProgSection(
|
||||||
id = "partners",
|
id = "partners",
|
||||||
title = "Партнеры",
|
title = "Партнеры",
|
||||||
style = "wrapper style3 fullscreen fade-up"
|
style = "wrapper style3 fullscreen fade-up"
|
||||||
) {
|
) {
|
||||||
fragment(partners)
|
partners()
|
||||||
},
|
},
|
||||||
// section(props.data.partners),
|
// section(props.data.partners),
|
||||||
MagProgSection(
|
MagProgSection(
|
||||||
id = "mentors",
|
id = "mentors",
|
||||||
title = "Научные руководители",
|
title = "Научные руководители",
|
||||||
style = "wrapper style2 spotlights fade-up",
|
style = "wrapper style2 spotlights",
|
||||||
) {
|
) {
|
||||||
fragment(mentors)
|
mentors()
|
||||||
},
|
},
|
||||||
MagProgSection(
|
MagProgSection(
|
||||||
id = "program",
|
id = "program",
|
||||||
title = "Учебная программа",
|
title = "Учебная программа",
|
||||||
style = "wrapper style3 fullscreen fade-up"
|
style = "wrapper style3 fullscreen fade-up"
|
||||||
) {
|
) {
|
||||||
fragment(programSection)
|
programSection()
|
||||||
},
|
},
|
||||||
wrapSection(data.resolveHtmlOrNull(ENROLL_PATH)!!, "enroll"),
|
wrapSection(page.data.resolveHtmlOrNull(ENROLL_PATH)!!, "enroll"),
|
||||||
wrapSection(id = "contacts", title = "Контакты") {
|
wrapSection(id = "contacts", title = "Контакты") {
|
||||||
fragment(data.resolveHtmlOrNull(CONTACTS_PATH)!!)
|
htmlData(page.data.resolveHtmlOrNull(CONTACTS_PATH)!!)
|
||||||
fragment(team)
|
team()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -355,10 +350,7 @@ internal val spcMasters = HtmlSite {
|
|||||||
li {
|
li {
|
||||||
a(
|
a(
|
||||||
classes = "spc-home",
|
classes = "spc-home",
|
||||||
href = resolvePageRef(
|
href = "/" //TODO provide a way to navigate out-of-site
|
||||||
Name.EMPTY,
|
|
||||||
site.parent!!
|
|
||||||
)
|
|
||||||
) {
|
) {
|
||||||
i("fa fa-home") {
|
i("fa fa-home") {
|
||||||
attributes["aria-hidden"] = "true"
|
attributes["aria-hidden"] = "true"
|
||||||
@ -391,18 +383,19 @@ internal val spcMasters = HtmlSite {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
val mentors = siteData.findHtmlByContentType("magprog_mentor").values.sortedBy {
|
val mentors = data.findByContentType("magprog_mentor").values.sortedBy {
|
||||||
it.order
|
it.order
|
||||||
}
|
}
|
||||||
|
|
||||||
mentors.forEach { mentor ->
|
mentors.forEach { mentor ->
|
||||||
page(mentor.mentorPageId.asName(), siteData) {
|
page(mentor.mentorPageId.asName()) {
|
||||||
|
|
||||||
magProgHead("Научное программирование: ${mentor.name}")
|
magProgHead("Научное программирование: ${mentor.name}")
|
||||||
body("is-preload") {
|
body("is-preload") {
|
||||||
header {
|
header {
|
||||||
id = "header"
|
id = "header"
|
||||||
a(classes = "title") {
|
a(classes = "title") {
|
||||||
href = "${page.homeRef}#mentors"
|
href = "$homeRef#mentors"
|
||||||
+"Научные руководители"
|
+"Научные руководители"
|
||||||
}
|
}
|
||||||
nav {
|
nav {
|
||||||
@ -410,7 +403,7 @@ internal val spcMasters = HtmlSite {
|
|||||||
mentors.forEach {
|
mentors.forEach {
|
||||||
li {
|
li {
|
||||||
a {
|
a {
|
||||||
href = page.resolvePageRef(it.mentorPageId)
|
href = resolvePageRef(it.mentorPageId)
|
||||||
+it.name.substringAfterLast(" ")
|
+it.name.substringAfterLast(" ")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -428,12 +421,12 @@ internal val spcMasters = HtmlSite {
|
|||||||
span("image $imageClass") {
|
span("image $imageClass") {
|
||||||
mentor.imagePath?.let { photoPath ->
|
mentor.imagePath?.let { photoPath ->
|
||||||
img(
|
img(
|
||||||
src = page.resolveRef(photoPath),
|
src = resolveRef(photoPath),
|
||||||
alt = mentor.name
|
alt = mentor.name
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fragment(mentor)
|
htmlData(mentor)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -442,3 +435,4 @@ internal val spcMasters = HtmlSite {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -1,14 +1,18 @@
|
|||||||
package center.sciprog
|
package center.sciprog
|
||||||
|
|
||||||
import kotlinx.html.*
|
import kotlinx.html.*
|
||||||
|
import space.kscience.dataforge.meta.get
|
||||||
import space.kscience.dataforge.meta.string
|
import space.kscience.dataforge.meta.string
|
||||||
import space.kscience.snark.html.*
|
import space.kscience.snark.html.WebPage
|
||||||
|
import space.kscience.snark.html.homeRef
|
||||||
|
import space.kscience.snark.html.languages
|
||||||
|
import space.kscience.snark.html.resolvePageRef
|
||||||
import java.time.LocalDate
|
import java.time.LocalDate
|
||||||
|
|
||||||
|
|
||||||
internal const val SPC_TITLE = "Scientific Programming Centre"
|
internal const val SPC_TITLE = "Scientific Programming Centre"
|
||||||
|
|
||||||
context(PageContext)
|
context(WebPage)
|
||||||
internal fun HTML.spcHead(title: String = SPC_TITLE) {
|
internal fun HTML.spcHead(title: String = SPC_TITLE) {
|
||||||
head {
|
head {
|
||||||
title {
|
title {
|
||||||
@ -49,7 +53,8 @@ internal fun HTML.spcHead(title: String = SPC_TITLE) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
context(PageContext, FlowContent) internal fun spcHomeMenu() {
|
context(WebPage)
|
||||||
|
internal fun FlowContent.spcHomeMenu() {
|
||||||
nav {
|
nav {
|
||||||
id = "menu"
|
id = "menu"
|
||||||
ul("links") {
|
ul("links") {
|
||||||
@ -101,8 +106,8 @@ context(PageContext, FlowContent) internal fun spcHomeMenu() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
context(PageContext, FlowContent)
|
context(WebPage)
|
||||||
internal fun spcFooter() {
|
internal fun FlowContent.spcFooter() {
|
||||||
footer {
|
footer {
|
||||||
id = "footer"
|
id = "footer"
|
||||||
div("inner") {
|
div("inner") {
|
||||||
@ -153,8 +158,8 @@ internal fun spcFooter() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
context(PageContextWithData, FlowContent)
|
context(WebPage)
|
||||||
internal fun wrapper(contentBody: FlowContent.() -> Unit) = postprocess {
|
internal fun FlowContent.wrapper(contentBody: FlowContent.() -> Unit) {
|
||||||
div {
|
div {
|
||||||
id = "wrapper"
|
id = "wrapper"
|
||||||
// Header
|
// Header
|
||||||
@ -167,16 +172,11 @@ internal fun wrapper(contentBody: FlowContent.() -> Unit) = postprocess {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
languageMap.takeIf { it.size > 1 }?.let { languageMap ->
|
if (languages.isNotEmpty()) {
|
||||||
div {
|
div {
|
||||||
languageMap.entries.forEachIndexed { index, (key, meta) ->
|
languages.forEach { (key, meta) ->
|
||||||
if (index != 0) {
|
a(classes = "button primary small") {
|
||||||
a {
|
href = resolvePageRef(meta["target"].string ?: "#")
|
||||||
+"/"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
a {
|
|
||||||
href = page.resolvePageRef(meta.string ?: "#", site.parent!!)
|
|
||||||
+key
|
+key
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,21 +1,20 @@
|
|||||||
package center.sciprog
|
package center.sciprog
|
||||||
|
|
||||||
import space.kscience.dataforge.data.DataTree
|
import space.kscience.dataforge.data.*
|
||||||
import space.kscience.dataforge.data.branch
|
import space.kscience.dataforge.misc.DFExperimental
|
||||||
import space.kscience.dataforge.data.putAll
|
|
||||||
import space.kscience.dataforge.names.Name
|
import space.kscience.dataforge.names.Name
|
||||||
import space.kscience.snark.html.HtmlSite
|
import space.kscience.snark.html.SiteBuilder
|
||||||
import space.kscience.snark.html.site
|
|
||||||
|
|
||||||
private inline fun <reified T> DataTree<T>.contentFor(branchName: String): DataTree<T> = DataTree{
|
@OptIn(DFExperimental::class)
|
||||||
putAll(branch(Name.of(branchName, "content")) ?: DataTree.EMPTY)
|
private fun <T : Any> DataSet<T>.siteData(branchName: String): DataTree<T> = DataTree(dataType) {
|
||||||
branch("common", branch("common") ?: DataTree.EMPTY)
|
populateFrom(branch(Name.of(branchName, "content")))
|
||||||
branch("assets", branch(Name.of(branchName, "assets")) ?: DataTree.EMPTY)
|
node("common", branch("common"))
|
||||||
branch("images", branch(Name.of(branchName, "images")) ?: DataTree.EMPTY)
|
node("assets", branch(Name.of(branchName, "assets")))
|
||||||
|
node("images", branch(Name.of(branchName, "images")))
|
||||||
}
|
}
|
||||||
|
|
||||||
val spcSite = HtmlSite {
|
fun SiteBuilder.spcSite() {
|
||||||
route(Name.EMPTY, siteData.contentFor("home"), content = spcHome)
|
spcHome(data.siteData("home"))
|
||||||
site("education.masters", siteData.contentFor("magprog"), content = spcMasters)
|
spcMasters(data.siteData("magprog"))
|
||||||
// bmk(data.branch("bmk").withBranch("common", commonData))
|
// bmk(data.branch("bmk").withBranch("common", commonData))
|
||||||
}
|
}
|
@ -1,25 +1,18 @@
|
|||||||
package center.sciprog
|
package center.sciprog
|
||||||
|
|
||||||
import kotlinx.coroutines.coroutineScope
|
import space.kscience.dataforge.context.Global
|
||||||
import space.kscience.dataforge.context.Context
|
|
||||||
import space.kscience.dataforge.context.request
|
import space.kscience.dataforge.context.request
|
||||||
import space.kscience.dataforge.workspace.resources
|
import space.kscience.snark.html.SiteBuilder
|
||||||
import space.kscience.snark.html.SnarkHtml
|
import space.kscience.snark.html.SnarkHtmlPlugin
|
||||||
import space.kscience.snark.html.readSiteData
|
import space.kscience.snark.html.readResources
|
||||||
import space.kscience.snark.html.static.staticSite
|
import space.kscience.snark.html.static
|
||||||
import java.nio.file.Path
|
import java.nio.file.Path
|
||||||
|
|
||||||
suspend fun main(args: Array<String>) = coroutineScope {
|
fun main(args: Array<String>) {
|
||||||
val context = Context {
|
|
||||||
plugin(SnarkHtml)
|
|
||||||
}
|
|
||||||
|
|
||||||
val destinationPath = args.firstOrNull() ?: "build/public"
|
val destinationPath = args.firstOrNull() ?: "build/public"
|
||||||
|
|
||||||
val snark = context.request(SnarkHtml)
|
val snark = Global.request(SnarkHtmlPlugin)
|
||||||
val siteData = snark.readSiteData(context) {
|
val siteData = snark.readResources("common", "home", "magprog")
|
||||||
resources(snark.io,"common", "home", "magprog")
|
|
||||||
}
|
|
||||||
|
|
||||||
snark.staticSite(siteData, Path.of(destinationPath), content = spcSite)
|
snark.static(siteData, Path.of(destinationPath), block = SiteBuilder::spcSite)
|
||||||
}
|
}
|
@ -1,7 +1,7 @@
|
|||||||
package html5up.forty
|
package html5up.forty
|
||||||
|
|
||||||
import kotlinx.html.*
|
import kotlinx.html.*
|
||||||
import space.kscience.snark.html.PageContext
|
import space.kscience.snark.html.WebPage
|
||||||
|
|
||||||
|
|
||||||
internal fun FlowContent.fortyMenu() {
|
internal fun FlowContent.fortyMenu() {
|
||||||
@ -200,8 +200,7 @@ internal fun FlowContent.fortyFooter() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
context(PageContext)
|
context(WebPage) internal fun BODY.fortyScripts() {
|
||||||
internal fun BODY.fortyScripts() {
|
|
||||||
script {
|
script {
|
||||||
src = resolveRef("assets/js/jquery.min.js")
|
src = resolveRef("assets/js/jquery.min.js")
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
package html5up.forty
|
package html5up.forty
|
||||||
|
|
||||||
import kotlinx.html.*
|
import kotlinx.html.*
|
||||||
import space.kscience.snark.html.PageContext
|
import space.kscience.snark.html.WebPage
|
||||||
|
|
||||||
context(PageContext)
|
context(WebPage) internal fun HTML.landing(){
|
||||||
internal fun HTML.landing() {
|
|
||||||
head {
|
head {
|
||||||
title {
|
title {
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
package html5up.forty
|
package html5up.forty
|
||||||
|
|
||||||
import kotlinx.html.*
|
import kotlinx.html.*
|
||||||
import space.kscience.snark.html.PageContext
|
import space.kscience.snark.html.WebPage
|
||||||
|
|
||||||
context(PageContext)
|
context(WebPage) internal fun HTML.fortyPage(){
|
||||||
internal fun HTML.fortyPage() {
|
|
||||||
head {
|
head {
|
||||||
title {
|
title {
|
||||||
}
|
}
|
||||||
|