diff --git a/portal.toml b/portal.toml index b8c9109..c98b36a 100644 --- a/portal.toml +++ b/portal.toml @@ -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" diff --git a/src/jsMain/resources/style/components/_board.scss b/src/jsMain/resources/style/components/_board.scss index 786cb30..3ef7bc1 100644 --- a/src/jsMain/resources/style/components/_board.scss +++ b/src/jsMain/resources/style/components/_board.scss @@ -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%; } } diff --git a/src/jsMain/resources/style/components/_form.scss b/src/jsMain/resources/style/components/_form.scss index 2227c4a..0bcaf31 100644 --- a/src/jsMain/resources/style/components/_form.scss +++ b/src/jsMain/resources/style/components/_form.scss @@ -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; diff --git a/src/jsMain/resources/style/components/_overview.scss b/src/jsMain/resources/style/components/_overview.scss index 8ab9330..6552344 100644 --- a/src/jsMain/resources/style/components/_overview.scss +++ b/src/jsMain/resources/style/components/_overview.scss @@ -108,6 +108,7 @@ table { border-collapse: collapse; border-spacing: 0; + width: 100%; } td { diff --git a/src/jvmMain/kotlin/de/kif/backend/Configuration.kt b/src/jvmMain/kotlin/de/kif/backend/Configuration.kt index efcb9f7..92bd9e3 100644 --- a/src/jvmMain/kotlin/de/kif/backend/Configuration.kt +++ b/src/jvmMain/kotlin/de/kif/backend/Configuration.kt @@ -15,13 +15,13 @@ object Configuration { private val config: Config - class ConfigDelegate(val item: Item) { + private class ConfigDelegate(val item: Item) { operator fun getValue(thisRef: Any?, property: KProperty<*>): T { return config[item] } } - fun c(item: Item) = ConfigDelegate(item) + private fun c(item: Item) = ConfigDelegate(item) private object ServerSpec : ConfigSpec("server") { val host by required() diff --git a/src/jvmMain/kotlin/de/kif/backend/route/Calendar.kt b/src/jvmMain/kotlin/de/kif/backend/route/Calendar.kt index 0297479..7988210 100644 --- a/src/jvmMain/kotlin/de/kif/backend/route/Calendar.kt +++ b/src/jvmMain/kotlin/de/kif/backend/route/Calendar.kt @@ -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") {