From 799953c0a2d35016d89a6c6e502d983ecb1caf59 Mon Sep 17 00:00:00 2001 From: Cyberes Date: Mon, 19 Aug 2024 18:29:53 -0600 Subject: [PATCH] make cards look better on smaller screens --- dashboard/www/space-weather-24hr-max-card.js | 1 + dashboard/www/space-weather-pred-card.js | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dashboard/www/space-weather-24hr-max-card.js b/dashboard/www/space-weather-24hr-max-card.js index 37da6d6..c54bee8 100644 --- a/dashboard/www/space-weather-24hr-max-card.js +++ b/dashboard/www/space-weather-24hr-max-card.js @@ -74,6 +74,7 @@ class SpaceWeather24hrMaxCard extends HTMLElement { padding: 16px; margin-bottom: 16px; text-align: center; + line-height: initial; } .scale-item { diff --git a/dashboard/www/space-weather-pred-card.js b/dashboard/www/space-weather-pred-card.js index 8630ae5..cf53bc3 100644 --- a/dashboard/www/space-weather-pred-card.js +++ b/dashboard/www/space-weather-pred-card.js @@ -31,13 +31,13 @@ class SpaceWeatherPredictionCard extends HTMLElement { .prediction-item { text-align: center; - /*margin-bottom: 16px;*/ cursor: pointer; } .prediction-label { font-weight: bold; margin-bottom: 8px; + min-height: 40px; } .prediction-value { @@ -202,8 +202,7 @@ class SpaceWeatherPredictionCard extends HTMLElement { const dayButtons = this.shadowRoot.querySelectorAll('.day-button'); dayButtons.forEach(button => { button.addEventListener('click', () => { - const day = button.dataset.day; - this._selectedDay = day; + this._selectedDay = button.dataset.day; this.render(); }); });