From ece68e4ca846e7b9d2e7fe7026beec95f86dc908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lker=20G=C3=BCl?= Date: Sun, 26 May 2024 20:02:01 +0200 Subject: [PATCH] filter type reformatted --- docs/index.html | 31 +++++++++++++++++-------------- docs/static/map.js | 9 ++++++--- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/docs/index.html b/docs/index.html index 6205295..eb0be37 100644 --- a/docs/index.html +++ b/docs/index.html @@ -335,13 +335,21 @@ box-shadow: 0 0 15px 3px rgba(41, 128, 185, 0.75); /* Enhanced focus state */ } - #rating-min-display, #rating-max-display { - margin-left: 10px; - font-weight: bold; + .rating-range-container { + display: flex; + align-items: center; } input[type="range"] { - width: 100%; + flex: 1; + margin: 0 10px; + } + + #rating-display { + padding: 5px; + background-color: #e0f7e9; /* Light green background */ + border-radius: 5px; + font-weight: bold; } @@ -476,16 +484,11 @@

Filter Options

- -
- - - 0.0 -
-
- - - 5.0 + +
+ + 0.0 - 5.0 +
diff --git a/docs/static/map.js b/docs/static/map.js index fbbcd64..04721fd 100644 --- a/docs/static/map.js +++ b/docs/static/map.js @@ -202,6 +202,7 @@ addTogglePanelControl(); // Initialize filter event listeners initializeFilterControls(); +updateRatingDisplay(); // Set initial rating display values function applyThemeColors(theme) { const themeColors = colorThemes[theme] || colorThemes['default']; @@ -580,9 +581,11 @@ function formatCountryName(countryName) { return formattedWords.join(' '); } -// Update the display for the rating slider -function updateRatingDisplay(type, value) { - document.getElementById(`rating-${type}-display`).innerText = value; +// Update the display for the rating sliders +function updateRatingDisplay() { + const minRating = document.getElementById('rating-min').value; + const maxRating = document.getElementById('rating-max').value; + document.getElementById('rating-display').innerText = `${minRating} - ${maxRating}`; } // Filter part