diff --git a/_includes/post_list.liquid b/_includes/post_list.liquid index a85f88e..e0e3e9a 100644 --- a/_includes/post_list.liquid +++ b/_includes/post_list.liquid @@ -7,19 +7,19 @@
-
- Show: - - - -
@@ -138,13 +138,16 @@ document.addEventListener('DOMContentLoaded', () => { // Update button active states filterButtons.forEach(btn => { - btn.classList.toggle('active', btn.dataset.filterType === currentFilter); - // Add specific styling for active state if needed, e.g., background color - if (btn.dataset.filterType === currentFilter) { - btn.classList.add('bg-gray-300'); // Example active style - } else { - btn.classList.remove('bg-gray-300'); - } + const isActive = btn.dataset.filterType === currentFilter; + btn.classList.toggle('active', isActive); + // Apply styles consistent with submit.liquid active state + if (isActive) { + btn.classList.add('border-primary', 'bg-primary/10'); + btn.classList.remove('border-gray-300', 'bg-transparent'); // Ensure default border is removed + } else { + btn.classList.add('border-gray-300', 'bg-transparent'); // Use bg-transparent or specific default bg + btn.classList.remove('border-primary', 'bg-primary/10'); + } }); sortButtons.forEach(btn => { btn.classList.toggle('active', btn.dataset.sortBy === currentSort);