diff --git a/src/jsMain/resources/style/style.scss b/src/jsMain/resources/style/style.scss index 62b3694..d52fc64 100644 --- a/src/jsMain/resources/style/style.scss +++ b/src/jsMain/resources/style/style.scss @@ -43,10 +43,14 @@ body, html { a { text-decoration: none; outline: none; + color: $primary-color; &:hover { text-decoration: none; } + &:active { + color: $primary-color; + } } .container { @@ -149,10 +153,33 @@ a { .table-layout-search { float: left; + padding-bottom: 0.5rem !important; + + .btn-search { + position: absolute; + top: 0; + height: calc(2.5rem + 2px); + line-height: 2.5rem; + right: -3rem; + border-bottom-left-radius: 0; + border-top-left-radius: 0; + + margin-top: 1px; + margin-right: 2px; + } + + input:focus ~ .btn-search { + border-color: $primary-color; + border-width: 2px; + margin-top: 0; + height: calc(2.5rem + 4px); + margin-right: 1px; + } } .table-layout-action { float: right; + line-height: 2.5rem; } .table-layout-table { @@ -160,7 +187,6 @@ a { border-spacing: 0; border-collapse: collapse; clear: both; - margin-top: 4rem; th { text-align: start; diff --git a/src/jvmMain/kotlin/de/kif/backend/route/Account.kt b/src/jvmMain/kotlin/de/kif/backend/route/Account.kt index e5b9df6..ee8ad87 100644 --- a/src/jvmMain/kotlin/de/kif/backend/route/Account.kt +++ b/src/jvmMain/kotlin/de/kif/backend/route/Account.kt @@ -34,7 +34,7 @@ fun Route.account() { +"You have the following rights: ${user.permissions}" br {} a("/logout") { - button { + button(classes="form-btn") { +"Logout" } } diff --git a/src/jvmMain/kotlin/de/kif/backend/route/Login.kt b/src/jvmMain/kotlin/de/kif/backend/route/Login.kt index 7cfa6d0..7f4533a 100644 --- a/src/jvmMain/kotlin/de/kif/backend/route/Login.kt +++ b/src/jvmMain/kotlin/de/kif/backend/route/Login.kt @@ -72,8 +72,8 @@ fun Route.login() { ) { value = call.parameters[LocationLogin::next.name] ?: "/" } - button(type = ButtonType.submit, classes = "btn btn-primary") { - +"LocationLogin" + button(type = ButtonType.submit, classes = "form-btn btn-primary") { + +"Login" } } diff --git a/src/jvmMain/kotlin/de/kif/backend/route/Person.kt b/src/jvmMain/kotlin/de/kif/backend/route/Person.kt index 73c4659..77803d3 100644 --- a/src/jvmMain/kotlin/de/kif/backend/route/Person.kt +++ b/src/jvmMain/kotlin/de/kif/backend/route/Person.kt @@ -42,7 +42,9 @@ fun Route.person() { action { a("/person/new") { - +"Add person" + button(classes="form-btn btn-primary") { + +"Add person" + } } } diff --git a/src/jvmMain/kotlin/de/kif/backend/route/Room.kt b/src/jvmMain/kotlin/de/kif/backend/route/Room.kt index 3a10aaa..e8a0532 100644 --- a/src/jvmMain/kotlin/de/kif/backend/route/Room.kt +++ b/src/jvmMain/kotlin/de/kif/backend/route/Room.kt @@ -42,7 +42,9 @@ fun Route.room() { action { a("/room/new") { - +"Add room" + button(classes="form-btn btn-primary") { + +"Add room" + } } } @@ -137,10 +139,6 @@ fun Route.room() { div("form-switch-group") { div("form-group form-switch") { - label { - htmlFor = "projector" - +"Projector" - } input( name = "projector", classes = "form-control", @@ -149,6 +147,10 @@ fun Route.room() { id = "projector" checked = editRoom.projector } + label { + htmlFor = "projector" + +"Projector" + } } } @@ -241,10 +243,6 @@ fun Route.room() { div("form-switch-group") { div("form-group form-switch") { - label { - htmlFor = "projector" - +"Projector" - } input( name = "projector", classes = "form-control", @@ -253,6 +251,10 @@ fun Route.room() { id = "projector" checked = false } + label { + htmlFor = "projector" + +"Projector" + } } } diff --git a/src/jvmMain/kotlin/de/kif/backend/route/User.kt b/src/jvmMain/kotlin/de/kif/backend/route/User.kt index 6b23d82..4dc6b4c 100644 --- a/src/jvmMain/kotlin/de/kif/backend/route/User.kt +++ b/src/jvmMain/kotlin/de/kif/backend/route/User.kt @@ -42,7 +42,9 @@ fun Route.user() { action { a("/user/new") { - +"Add user" + button(classes="form-btn btn-primary") { + +"Add user" + } } } @@ -115,10 +117,6 @@ fun Route.user() { for (permission in Permission.values()) { val name = permission.toString().toLowerCase() div("form-group form-switch") { - label { - htmlFor = "permission-$name" - +name.capitalize() - } input( name = "permission-$name", classes = "form-control", @@ -131,6 +129,10 @@ fun Route.user() { readonly = true } } + label { + htmlFor = "permission-$name" + +name.capitalize() + } } } } @@ -231,10 +233,6 @@ fun Route.user() { for (permission in Permission.values()) { val name = permission.toString().toLowerCase() div("form-group form-switch") { - label { - htmlFor = "permission-$name" - +name.capitalize() - } input( name = "permission-$name", classes = "form-control", @@ -247,6 +245,10 @@ fun Route.user() { readonly = true } } + label { + htmlFor = "permission-$name" + +name.capitalize() + } } } } diff --git a/src/jvmMain/kotlin/de/kif/backend/route/WorkGroup.kt b/src/jvmMain/kotlin/de/kif/backend/route/WorkGroup.kt index 48e19b7..b24f4df 100644 --- a/src/jvmMain/kotlin/de/kif/backend/route/WorkGroup.kt +++ b/src/jvmMain/kotlin/de/kif/backend/route/WorkGroup.kt @@ -42,7 +42,9 @@ fun Route.workGroup() { action { a("/workgroup/new") { - +"Add work group" + button(classes = "form-btn btn-primary") { + +"Add work group" + } } } @@ -94,7 +96,7 @@ fun Route.workGroup() { } td(classes = "action") { a("/workgroup/${u.id}") { - i("material-icons") { +"edit" } + i("material-icons") { +"edit" } } } } @@ -248,12 +250,12 @@ fun Route.workGroup() { } val editWorkGroup = WorkGroup.get(workGroupId.id) ?: return@post - params["name"]?.let { editWorkGroup.name = it} - params["interested"]?.toIntOrNull()?.let { editWorkGroup.interested = it} - params["track"]?.toIntOrNull()?.let { editWorkGroup.trackId = it} - params["projector"]?.toBoolean()?.let { editWorkGroup.projector = it} - params["resolution"]?.toBoolean()?.let { editWorkGroup.resolution = it} - params["length"]?.toIntOrNull()?.let { editWorkGroup.length = it} + params["name"]?.let { editWorkGroup.name = it } + params["interested"]?.toIntOrNull()?.let { editWorkGroup.interested = it } + params["track"]?.toIntOrNull()?.let { editWorkGroup.trackId = it } + params["projector"]?.let { editWorkGroup.projector = it == "on" } + params["resolution"]?.let { editWorkGroup.resolution = it == "on" } + params["length"]?.toIntOrNull()?.let { editWorkGroup.length = it } editWorkGroup.save() diff --git a/src/jvmMain/kotlin/de/kif/backend/view/TableTemplate.kt b/src/jvmMain/kotlin/de/kif/backend/view/TableTemplate.kt index 8120abf..2d76c41 100644 --- a/src/jvmMain/kotlin/de/kif/backend/view/TableTemplate.kt +++ b/src/jvmMain/kotlin/de/kif/backend/view/TableTemplate.kt @@ -14,12 +14,12 @@ class TableTemplate() : Template { override fun FlowContent.apply() { div("table-layout") { - form(classes = "table-layout-search") { - input(InputType.search, name = "search") { + form(classes = "form-group table-layout-search") { + input(InputType.search, name = "search", classes = "form-control") { placeholder = "Search" value = searchValue } - button(type = ButtonType.submit) { + button(type = ButtonType.submit, classes = "form-btn btn-search") { i("material-icons") { +"search" } } }