Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Commit ·
3c5f057
1
Parent(s): de2f8be
tweak dark mode
Browse files- frontend/leaderboard.html +44 -2
frontend/leaderboard.html
CHANGED
|
@@ -61,7 +61,19 @@
|
|
| 61 |
}
|
| 62 |
|
| 63 |
.dark #table-wrapper {
|
| 64 |
-
border: 1px solid #
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
}
|
| 66 |
|
| 67 |
#table-wrapper::-webkit-scrollbar {
|
|
@@ -2241,7 +2253,37 @@ window.toggleExpandText = function (idBase, btn) {
|
|
| 2241 |
|
| 2242 |
})();
|
| 2243 |
</script>
|
| 2244 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2245 |
</body>
|
| 2246 |
|
| 2247 |
</html>
|
|
|
|
| 61 |
}
|
| 62 |
|
| 63 |
.dark #table-wrapper {
|
| 64 |
+
border: 1px solid #252048;
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
/* Search bar dark mode — matches card family */
|
| 68 |
+
.dark #searchInput {
|
| 69 |
+
background-color: #1c2235 !important;
|
| 70 |
+
border-color: #252048 !important;
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
/* Filter panel dark mode — matches card family */
|
| 74 |
+
.dark #filterPanel {
|
| 75 |
+
background-color: #161828 !important;
|
| 76 |
+
border-color: #252048 !important;
|
| 77 |
}
|
| 78 |
|
| 79 |
#table-wrapper::-webkit-scrollbar {
|
|
|
|
| 2253 |
|
| 2254 |
})();
|
| 2255 |
</script>
|
| 2256 |
+
|
| 2257 |
+
<script>
|
| 2258 |
+
// Dark mode overrides for search bar, filter panel, table border
|
| 2259 |
+
// Uses JS (same pattern as header cards) to beat Tailwind CDN specificity
|
| 2260 |
+
function applyLeaderboardDarkMode() {
|
| 2261 |
+
const isDark = document.documentElement.classList.contains('dark');
|
| 2262 |
+
|
| 2263 |
+
const search = document.getElementById('searchInput');
|
| 2264 |
+
if (search) {
|
| 2265 |
+
search.style.backgroundColor = isDark ? '#1c2235' : '';
|
| 2266 |
+
search.style.borderColor = isDark ? '#252048' : '';
|
| 2267 |
+
}
|
| 2268 |
+
|
| 2269 |
+
const filterPanel = document.getElementById('filterPanel');
|
| 2270 |
+
if (filterPanel) {
|
| 2271 |
+
filterPanel.style.backgroundColor = isDark ? '#161828' : '';
|
| 2272 |
+
filterPanel.style.borderColor = isDark ? '#252048' : '';
|
| 2273 |
+
}
|
| 2274 |
+
|
| 2275 |
+
const tableWrapper = document.getElementById('table-wrapper');
|
| 2276 |
+
if (tableWrapper) {
|
| 2277 |
+
tableWrapper.style.borderColor = isDark ? '#252048' : '';
|
| 2278 |
+
}
|
| 2279 |
+
}
|
| 2280 |
+
|
| 2281 |
+
applyLeaderboardDarkMode();
|
| 2282 |
+
new MutationObserver(applyLeaderboardDarkMode).observe(
|
| 2283 |
+
document.documentElement, { attributes: true, attributeFilter: ['class'] }
|
| 2284 |
+
);
|
| 2285 |
+
</script>
|
| 2286 |
+
|
| 2287 |
</body>
|
| 2288 |
|
| 2289 |
</html>
|