diff options
| author | Danilo M. <danix@danix.xyz> | 2026-04-22 12:42:56 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-04-22 12:42:56 +0200 |
| commit | 631547a75142326a7c71bdf123e1475217a5ad73 (patch) | |
| tree | f3cfef6b3c5b42bf626fc823ddcf63b8dcf4cdbb /assets/js/filters.js | |
| parent | 77ccbe72fad5a4870185fff374f75471c16a9043 (diff) | |
| download | danixxyz-theme-631547a75142326a7c71bdf123e1475217a5ad73.tar.gz danixxyz-theme-631547a75142326a7c71bdf123e1475217a5ad73.zip | |
chore: replace with extracted danix.xyz-hacker theme (danix2-hugo-theme)
Diffstat (limited to 'assets/js/filters.js')
| -rw-r--r-- | assets/js/filters.js | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/assets/js/filters.js b/assets/js/filters.js deleted file mode 100644 index f7fa6a6..0000000 --- a/assets/js/filters.js +++ /dev/null @@ -1,37 +0,0 @@ -/** - * filters.js - * Article filtering by type on the articles page - */ - -(function() { - 'use strict'; - - const filterBtns = document.querySelectorAll('.filter-btn'); - const timelineItems = document.querySelectorAll('.timeline-item'); - - filterBtns.forEach((btn) => { - btn.addEventListener('click', () => { - const filter = btn.getAttribute('data-filter'); - - // Update active button - filterBtns.forEach((b) => b.classList.remove('active')); - btn.classList.add('active'); - - // Filter articles - timelineItems.forEach((item) => { - const type = item.getAttribute('data-type'); - - if (filter === 'all' || type === filter) { - item.classList.add('visible'); - } else { - item.classList.remove('visible'); - } - }); - }); - }); - - // Show all on load - timelineItems.forEach((item) => { - item.classList.add('visible'); - }); -})(); |
