diff --git a/src/main/resources/static/js/homecard.js b/src/main/resources/static/js/homecard.js index 6534104c..09d5a8cb 100644 --- a/src/main/resources/static/js/homecard.js +++ b/src/main/resources/static/js/homecard.js @@ -95,24 +95,23 @@ function reorderCards(container) { function initializeCards() { updateFavoritesSection(); + updateFavoritesView(); updateFavoritesDropdown(); filterCards(); } function updateFavoritesView() { const isFavoritesView = JSON.parse(localStorage.getItem('favoritesView') || 'false'); - const textElement = document.getElementById('toggle-favourites-text'); const iconElement = document.getElementById('toggle-favourites-icon'); const favoritesGroup = document.querySelector('#groupFavorites'); const favoritesList = JSON.parse(localStorage.getItem('favoritesList')) || []; - document.getElementById('favouritesVisibility').style.display = 'flex'; if (isFavoritesView && favoritesList.length > 0) { - iconElement.textContent = 'visibility_off'; + document.getElementById('favouritesVisibility').style.display = 'flex'; favoritesGroup.style.display = 'flex'; } else { if (favoritesList.length > 0) { - iconElement.textContent = 'visibility'; + document.getElementById('favouritesVisibility').style.display = 'flex'; favoritesGroup.style.display = 'none'; } else { document.getElementById('favouritesVisibility').style.display = 'none'; diff --git a/src/main/resources/static/js/pages/home.js b/src/main/resources/static/js/pages/home.js index 1be5e796..9633c9a4 100644 --- a/src/main/resources/static/js/pages/home.js +++ b/src/main/resources/static/js/pages/home.js @@ -127,14 +127,9 @@ function adjustVisibleElements() { } function adjustContainerAlignment() { - console.log('Adjusting container alignment'); - document.querySelectorAll('.features-container').forEach((parent) => { parent.querySelectorAll('.feature-rows').forEach((container) => { - const childElements = Array.from(container.children); - const containerWidth = parent.offsetWidth; - console.log(containerWidth < 32 * parseFloat(getComputedStyle(document.documentElement).fontSize)); if (containerWidth < 32 * parseFloat(getComputedStyle(document.documentElement).fontSize)) { container.classList.add('single-column'); } else { diff --git a/src/main/resources/templates/home.html b/src/main/resources/templates/home.html index 5e39c768..f53558c6 100644 --- a/src/main/resources/templates/home.html +++ b/src/main/resources/templates/home.html @@ -55,7 +55,7 @@ -