forked from SPC/spc-site
Add FPMI label
This commit is contained in:
parent
e8b9a35a61
commit
73949a23cb
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,6 +2,5 @@
|
||||
build/
|
||||
.idea/
|
||||
/logs/
|
||||
/data/deployDate
|
||||
|
||||
!gradle/wrapper/gradle-wrapper.jar
|
||||
|
16
.space.kts
16
.space.kts
@ -1,21 +1,25 @@
|
||||
import circlet.pipelines.script.put
|
||||
|
||||
job("Deploy") {
|
||||
startOn {
|
||||
gitPush { enabled = false }
|
||||
}
|
||||
|
||||
gradlew("openjdk:11", "installDist")
|
||||
container(image = "openjdk:11") {
|
||||
kotlinScript { api ->
|
||||
api.gradlew("installDist")
|
||||
api.fileShare().put(java.io.File("build/install"))
|
||||
}
|
||||
}
|
||||
|
||||
container(displayName = "Deploy via scp", image = "openjdk:11") {
|
||||
container(image = "openjdk:11") {
|
||||
env["HOST"] = Params("spc-host")
|
||||
env["USER"] = Secrets("spc-webmaster-user")
|
||||
env["ID"] = Secrets("spc-webmaster-id")
|
||||
|
||||
shellScript {
|
||||
interpreter = "/bin/bash"
|
||||
content = """
|
||||
ls -la
|
||||
""".trimIndent()
|
||||
content = "echo \$ID | ssh -i /dev/stdin -r /mnt/space/share/spc-site/ \"\$USER@\$HOST:/opt\""
|
||||
}
|
||||
}
|
||||
|
||||
}
|
BIN
data/home/images/FPMI.jpg
Normal file
BIN
data/home/images/FPMI.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 41 KiB |
@ -51,6 +51,8 @@ fun Application.spcModule() {
|
||||
|
||||
val dataPath = Path.of("data")
|
||||
|
||||
|
||||
|
||||
// Clear data directory if it is outdated
|
||||
val deployDate = dataPath.resolve(DEPLOY_DATE_FILE).takeIf { it.exists() }
|
||||
?.readText()?.let { LocalDateTime.parse(it) }
|
||||
@ -58,12 +60,16 @@ fun Application.spcModule() {
|
||||
|
||||
if (deployDate != null && buildDate != null && buildDate.isAfter(deployDate)) {
|
||||
log.info("Outdated data. Resetting data directory.")
|
||||
dataPath.deleteIfExists()
|
||||
|
||||
Files.walk(dataPath)
|
||||
.sorted(Comparator.reverseOrder())
|
||||
.forEach { it.deleteIfExists() }
|
||||
|
||||
//Writing deploy date file
|
||||
dataPath.createDirectories()
|
||||
dataPath.resolve(DEPLOY_DATE_FILE).writeText(LocalDateTime.now().toString())
|
||||
} else if (deployDate == null && buildDate != null) {
|
||||
|
||||
} else if (System.getProperty("spc-production") == "true" && deployDate == null && buildDate != null) {
|
||||
|
||||
//Writing deploy date in production mode if it does not exist
|
||||
dataPath.createDirectories()
|
||||
|
@ -125,7 +125,47 @@ context(PageContext) private fun HTML.spcHome() {
|
||||
// Main
|
||||
div {
|
||||
id = "main"
|
||||
// One
|
||||
section {
|
||||
div("inner") {
|
||||
a(href = "https://mipt.ru/education/departments/fpmi/") {
|
||||
span("image left") {
|
||||
img {
|
||||
src = "images/FPMI.jpg"
|
||||
alt = "FPMI"
|
||||
height = "60dp"
|
||||
width = "60dp"
|
||||
}
|
||||
}
|
||||
}
|
||||
p {
|
||||
+"Centre was created in 2022 based on the Phystech School of Applied Mathematics and Informatics at MIPT"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
section {
|
||||
div("inner") {
|
||||
header("major") {
|
||||
h2 { +"Science + education + industry" }
|
||||
}
|
||||
p {
|
||||
+"""
|
||||
Our mission is to bring together science, education and industry and
|
||||
work on better software solutions for science and better science in
|
||||
software development.
|
||||
""".trimIndent()
|
||||
}
|
||||
// ul("actions") {
|
||||
// li {
|
||||
// a(classes = "button next") {
|
||||
// href = "landing.html"
|
||||
// +"""Get Started"""
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
section("tiles") {
|
||||
id = "master"
|
||||
article {
|
||||
@ -232,29 +272,6 @@ context(PageContext) private fun HTML.spcHome() {
|
||||
// }
|
||||
// }
|
||||
}
|
||||
// Two
|
||||
section {
|
||||
div("inner") {
|
||||
header("major") {
|
||||
h2 { +"Science + education + industry" }
|
||||
}
|
||||
p {
|
||||
+"""
|
||||
Our mission is to bring together science, education and industry and
|
||||
work on better software solutions for science and better science in
|
||||
software development.
|
||||
""".trimIndent()
|
||||
}
|
||||
// ul("actions") {
|
||||
// li {
|
||||
// a(classes = "button next") {
|
||||
// href = "landing.html"
|
||||
// +"""Get Started"""
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user