From: David ‘Bombe’ Roden Date: Mon, 30 May 2016 04:33:06 +0000 (+0200) Subject: Don’t repeat header with every line X-Git-Tag: v2~116 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=138f7a2f181dc54d66c68f2c2f34bb3ab2356818;p=rhynodge.git Don’t repeat header with every line --- diff --git a/src/main/kotlin/net/pterodactylus/rhynodge/webpages/weather/WeatherTrigger.kt b/src/main/kotlin/net/pterodactylus/rhynodge/webpages/weather/WeatherTrigger.kt index 264022f..5374d4c 100644 --- a/src/main/kotlin/net/pterodactylus/rhynodge/webpages/weather/WeatherTrigger.kt +++ b/src/main/kotlin/net/pterodactylus/rhynodge/webpages/weather/WeatherTrigger.kt @@ -63,27 +63,27 @@ class WeatherTrigger : Trigger { val showFeltTemperature = state.any { it.feltTemperature != null } val showGustSpeed = state.any { it.gustSpeed != null } val showHumidity = state.any { it.humidity != null } - state.forEach { - div("weather-states") { - div("header") { - div { +"Time" } - div { +"Temperature" } - if (showHumidity) { - div { +"feels like" } - } - div { +"Chance of Rain" } - div { +"Amount" } - div { +"Wind from" } - div { +"Speed" } - if (showGustSpeed) { - div { +"Gusts" } - } - if (showHumidity) { - div { +"Humidity" } - } - div { +"Description" } - div { +"Image" } + div("weather-states") { + div("header") { + div { +"Time" } + div { +"Temperature" } + if (showHumidity) { + div { +"feels like" } + } + div { +"Chance of Rain" } + div { +"Amount" } + div { +"Wind from" } + div { +"Speed" } + if (showGustSpeed) { + div { +"Gusts" } } + if (showHumidity) { + div { +"Humidity" } + } + div { +"Description" } + div { +"Image" } + } + state.forEach { div("hour-state") { div("time") { +"%tH:%