Did things
This commit is contained in:
parent
f5b937a293
commit
8a926aeb35
|
@ -3,7 +3,7 @@ host = "localhost"
|
||||||
port = 8080
|
port = 8080
|
||||||
|
|
||||||
[schedule]
|
[schedule]
|
||||||
reference = "2019-06-06"
|
reference = "2019-06-12"
|
||||||
|
|
||||||
[general]
|
[general]
|
||||||
wiki_url = "https://wiki.kif.rocks/w/index.php?title=KIF470:Arbeitskreise&action=raw"
|
wiki_url = "https://wiki.kif.rocks/w/index.php?title=KIF470:Arbeitskreise&action=raw"
|
||||||
|
|
|
@ -64,11 +64,11 @@
|
||||||
|
|
||||||
.board-schedule-box {
|
.board-schedule-box {
|
||||||
margin-bottom: 0.5rem;
|
margin-bottom: 0.5rem;
|
||||||
padding: 1rem;
|
padding: 1rem 1rem 0.5rem;
|
||||||
padding-bottom: 0.5rem;
|
|
||||||
|
|
||||||
table {
|
table {
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,7 @@ select:-moz-focusring {
|
||||||
line-height: 2.5rem;
|
line-height: 2.5rem;
|
||||||
margin-left: 1rem;
|
margin-left: 1rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
top: 1.6rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,10 +186,13 @@ form {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
& > * {
|
.form-control {
|
||||||
margin-right: 0;
|
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
flex-basis: 0;
|
flex-basis: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
& > * {
|
||||||
|
margin-right: 0;
|
||||||
|
|
||||||
&:not(:first-child) {
|
&:not(:first-child) {
|
||||||
border-top-left-radius: 0;
|
border-top-left-radius: 0;
|
||||||
|
|
|
@ -108,6 +108,7 @@
|
||||||
table {
|
table {
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
border-spacing: 0;
|
border-spacing: 0;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
td {
|
td {
|
||||||
|
|
|
@ -15,13 +15,13 @@ object Configuration {
|
||||||
|
|
||||||
private val config: Config
|
private val config: Config
|
||||||
|
|
||||||
class ConfigDelegate<T>(val item: Item<T>) {
|
private class ConfigDelegate<T>(val item: Item<T>) {
|
||||||
operator fun getValue(thisRef: Any?, property: KProperty<*>): T {
|
operator fun getValue(thisRef: Any?, property: KProperty<*>): T {
|
||||||
return config[item]
|
return config[item]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun <T> c(item: Item<T>) = ConfigDelegate(item)
|
private fun <T> c(item: Item<T>) = ConfigDelegate(item)
|
||||||
|
|
||||||
private object ServerSpec : ConfigSpec("server") {
|
private object ServerSpec : ConfigSpec("server") {
|
||||||
val host by required<String>()
|
val host by required<String>()
|
||||||
|
|
|
@ -141,7 +141,14 @@ private fun DIV.renderCalendar(
|
||||||
fun Route.calendar() {
|
fun Route.calendar() {
|
||||||
|
|
||||||
get("/calendar") {
|
get("/calendar") {
|
||||||
call.respondRedirect("/calendar/0", true)
|
val refDate = Configuration.Schedule.referenceDate
|
||||||
|
val todayDate = Date()
|
||||||
|
|
||||||
|
val refDay = refDate.time / (1000 * 60 * 60 * 24)
|
||||||
|
val todayDay = todayDate.time / (1000 * 60 * 60 * 24)
|
||||||
|
val day = todayDay - refDay
|
||||||
|
|
||||||
|
call.respondRedirect("/calendar/$day", false)
|
||||||
}
|
}
|
||||||
|
|
||||||
get("/calendar/{day}/rtt") {
|
get("/calendar/{day}/rtt") {
|
||||||
|
|
Loading…
Reference in a new issue