Did things
This commit is contained in:
parent
f5b937a293
commit
8a926aeb35
|
@ -3,7 +3,7 @@ host = "localhost"
|
|||
port = 8080
|
||||
|
||||
[schedule]
|
||||
reference = "2019-06-06"
|
||||
reference = "2019-06-12"
|
||||
|
||||
[general]
|
||||
wiki_url = "https://wiki.kif.rocks/w/index.php?title=KIF470:Arbeitskreise&action=raw"
|
||||
|
|
|
@ -64,11 +64,11 @@
|
|||
|
||||
.board-schedule-box {
|
||||
margin-bottom: 0.5rem;
|
||||
padding: 1rem;
|
||||
padding-bottom: 0.5rem;
|
||||
padding: 1rem 1rem 0.5rem;
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -51,6 +51,7 @@ select:-moz-focusring {
|
|||
line-height: 2.5rem;
|
||||
margin-left: 1rem;
|
||||
width: 100%;
|
||||
top: 1.6rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -185,10 +186,13 @@ form {
|
|||
white-space: nowrap;
|
||||
}
|
||||
|
||||
& > * {
|
||||
margin-right: 0;
|
||||
.form-control {
|
||||
flex-grow: 1;
|
||||
flex-basis: 0;
|
||||
}
|
||||
|
||||
& > * {
|
||||
margin-right: 0;
|
||||
|
||||
&:not(:first-child) {
|
||||
border-top-left-radius: 0;
|
||||
|
|
|
@ -108,6 +108,7 @@
|
|||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
td {
|
||||
|
|
|
@ -15,13 +15,13 @@ object Configuration {
|
|||
|
||||
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 {
|
||||
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") {
|
||||
val host by required<String>()
|
||||
|
|
|
@ -141,7 +141,14 @@ private fun DIV.renderCalendar(
|
|||
fun Route.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") {
|
||||
|
|
Loading…
Reference in a new issue