From 6ece2188cb15f6c21acd4507ec9b0d000055bc6f Mon Sep 17 00:00:00 2001 From: Xavier Lora Date: Mon, 1 Apr 2024 19:58:38 -0400 Subject: [PATCH] Major UI Updates --- _includes/blog.html | 47 +++++++++++++------------- _includes/bottomNavLive.html | 2 +- _includes/bottomNavStatEast.html | 15 +++++++-- _includes/bottomNavStatWest.html | 15 +++++++-- _includes/eastWest.html | 16 +++++++-- _includes/liveGames.html | 2 +- _includes/navBottom.html | 28 ++++++++------- _includes/navTop.html | 30 ++++++++++------- assets/global.css | 37 ++++++++++++++++++++ blog/index.html | 47 +++++++++++++------------- index.html | 58 ++++++++++++++++++-------------- index.js | 34 +++++++++++++++++-- live/index.html | 4 +-- live/live.js | 34 ++++++++++++++++++- stats/eastWestPage/index.html | 16 +++++++-- stats/statsEast.js | 36 ++++++++++++++++++-- stats/statsEast/index.html | 15 +++++++-- stats/statsWest.js | 36 ++++++++++++++++++-- stats/statsWest/index.html | 15 +++++++-- style.css | 27 +++++++++++++-- 20 files changed, 382 insertions(+), 132 deletions(-) diff --git a/_includes/blog.html b/_includes/blog.html index 752ea7c..6fec273 100644 --- a/_includes/blog.html +++ b/_includes/blog.html @@ -6,6 +6,7 @@ + {{title}} @@ -23,33 +24,29 @@ diff --git a/_includes/bottomNavStatWest.html b/_includes/bottomNavStatWest.html index 5b24bc6..f2d47e7 100644 --- a/_includes/bottomNavStatWest.html +++ b/_includes/bottomNavStatWest.html @@ -24,9 +24,18 @@ diff --git a/_includes/eastWest.html b/_includes/eastWest.html index 40d6f05..1e13b55 100644 --- a/_includes/eastWest.html +++ b/_includes/eastWest.html @@ -6,6 +6,7 @@ + {{title}} @@ -38,9 +39,18 @@

OR

diff --git a/_includes/liveGames.html b/_includes/liveGames.html index 944ba55..95054bf 100644 --- a/_includes/liveGames.html +++ b/_includes/liveGames.html @@ -9,7 +9,7 @@

-
+
diff --git a/_includes/navBottom.html b/_includes/navBottom.html index a002233..086b24e 100644 --- a/_includes/navBottom.html +++ b/_includes/navBottom.html @@ -3,19 +3,21 @@
-
+
@@ -45,7 +45,7 @@

diff --git a/stats/statsEast.js b/stats/statsEast.js index dd970eb..eb8c7eb 100644 --- a/stats/statsEast.js +++ b/stats/statsEast.js @@ -290,7 +290,7 @@ const generateTeamPlayers = (players) => { continue; // Skip this iteration and move to the next one } playerHtml+= ` -
+
@@ -307,4 +307,36 @@ function displayTeams(obj){ function fadeMain(){ const mainElement = document.getElementById("liveGamesCardContainer"); mainElement.classList.add("fadein"); -} \ No newline at end of file +} + +function updateCheckboxState() { + var checkboxes = document.querySelectorAll('.theme-controller'); + checkboxes.forEach(function(checkbox) { + if (localStorage.getItem(checkbox.value) === 'checked') { + checkbox.checked = true; + } else { + checkbox.checked = false; + } + }); +} + +// Function to store checkbox state in localStorage +function storeCheckboxState() { + var checkbox = this; + if (checkbox.checked) { + localStorage.setItem(checkbox.value, 'checked'); + } else { + localStorage.setItem(checkbox.value, 'unchecked'); + } +} + +// Call updateCheckboxState when the page loads +document.addEventListener('DOMContentLoaded', function () { + updateCheckboxState(); +}); + +// Attach an event listener to the checkbox for changes +var checkboxes = document.querySelectorAll('.theme-controller'); +checkboxes.forEach(function(checkbox) { + checkbox.addEventListener('change', storeCheckboxState); +}); \ No newline at end of file diff --git a/stats/statsEast/index.html b/stats/statsEast/index.html index b1d116f..100726b 100644 --- a/stats/statsEast/index.html +++ b/stats/statsEast/index.html @@ -48,9 +48,18 @@

diff --git a/stats/statsWest.js b/stats/statsWest.js index 5262cf7..62bc239 100644 --- a/stats/statsWest.js +++ b/stats/statsWest.js @@ -290,7 +290,7 @@ const generateTeamPlayers = (players) => { continue; // Skip this iteration and move to the next one } playerHtml+= ` -
+
@@ -307,4 +307,36 @@ function displayTeams(obj){ function fadeMain(){ const mainElement = document.getElementById("liveGamesCardContainer"); mainElement.classList.add("fadein"); -} \ No newline at end of file +} + +function updateCheckboxState() { + var checkboxes = document.querySelectorAll('.theme-controller'); + checkboxes.forEach(function(checkbox) { + if (localStorage.getItem(checkbox.value) === 'checked') { + checkbox.checked = true; + } else { + checkbox.checked = false; + } + }); +} + +// Function to store checkbox state in localStorage +function storeCheckboxState() { + var checkbox = this; + if (checkbox.checked) { + localStorage.setItem(checkbox.value, 'checked'); + } else { + localStorage.setItem(checkbox.value, 'unchecked'); + } +} + +// Call updateCheckboxState when the page loads +document.addEventListener('DOMContentLoaded', function () { + updateCheckboxState(); +}); + +// Attach an event listener to the checkbox for changes +var checkboxes = document.querySelectorAll('.theme-controller'); +checkboxes.forEach(function(checkbox) { + checkbox.addEventListener('change', storeCheckboxState); +}); \ No newline at end of file diff --git a/stats/statsWest/index.html b/stats/statsWest/index.html index 56cf207..c1e6bd7 100644 --- a/stats/statsWest/index.html +++ b/stats/statsWest/index.html @@ -47,9 +47,18 @@

diff --git a/style.css b/style.css index aa90cc3..6a32365 100644 --- a/style.css +++ b/style.css @@ -2318,6 +2318,21 @@ details.collapse summary::-webkit-details-marker { outline: 2px solid currentColor; outline-offset: 2px; } +.loading { + pointer-events: none; + display: inline-block; + aspect-ratio: 1 / 1; + width: 1.5rem; + background-color: currentColor; + -webkit-mask-size: 100%; + mask-size: 100%; + -webkit-mask-repeat: no-repeat; + mask-repeat: no-repeat; + -webkit-mask-position: center; + mask-position: center; + -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='%23000' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cstyle%3E.spinner_V8m1%7Btransform-origin:center;animation:spinner_zKoa 2s linear infinite%7D.spinner_V8m1 circle%7Bstroke-linecap:round;animation:spinner_YpZS 1.5s ease-out infinite%7D%40keyframes spinner_zKoa%7B100%25%7Btransform:rotate(360deg)%7D%7D%40keyframes spinner_YpZS%7B0%25%7Bstroke-dasharray:0 150;stroke-dashoffset:0%7D47.5%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-16%7D95%25%2C100%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-59%7D%7D%3C%2Fstyle%3E%3Cg class='spinner_V8m1'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3'%3E%3C%2Fcircle%3E%3C%2Fg%3E%3C%2Fsvg%3E"); + mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='%23000' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cstyle%3E.spinner_V8m1%7Btransform-origin:center;animation:spinner_zKoa 2s linear infinite%7D.spinner_V8m1 circle%7Bstroke-linecap:round;animation:spinner_YpZS 1.5s ease-out infinite%7D%40keyframes spinner_zKoa%7B100%25%7Btransform:rotate(360deg)%7D%7D%40keyframes spinner_YpZS%7B0%25%7Bstroke-dasharray:0 150;stroke-dashoffset:0%7D47.5%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-16%7D95%25%2C100%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-59%7D%7D%3C%2Fstyle%3E%3Cg class='spinner_V8m1'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3'%3E%3C%2Fcircle%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} :where(.menu li:empty) { --tw-bg-opacity: 1; background-color: var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity))); @@ -3263,6 +3278,9 @@ html:has(.drawer-toggle:checked) { .hidden { display: none; } +.h-32 { + height: 8rem; +} .h-6 { height: 1.5rem; } @@ -3369,9 +3387,9 @@ html:has(.drawer-toggle:checked) { .rounded-xl { border-radius: 0.75rem; } -.border-\[\#212124\] { +.border-neutral { --tw-border-opacity: 1; - border-color: rgb(33 33 36 / var(--tw-border-opacity)); + border-color: var(--fallback-n,oklch(var(--n)/var(--tw-border-opacity))); } .bg-neutral { --tw-bg-opacity: 1; @@ -3496,6 +3514,11 @@ html:has(.drawer-toggle:checked) { .lg\:flex-row { flex-direction: row; } + + .lg\:text-5xl { + font-size: 3rem; + line-height: 1; + } } .rtl\:space-x-reverse:where([dir="rtl"], [dir="rtl"] *) > :not([hidden]) ~ :not([hidden]) { --tw-space-x-reverse: 1;