From: Danilo M. Date: Fri, 17 Apr 2026 09:35:24 +0000 (+0200) Subject: fix: simplify Alpine.js component initialization by loading articles data directly X-Git-Tag: release_22042026-1342~142 X-Git-Url: https://git.danix.xyz/?a=commitdiff_plain;h=681ee6ca03258402deefc62a4d08f44ae7b70cbe;p=danix.xyz-2.git fix: simplify Alpine.js component initialization by loading articles data directly --- diff --git a/themes/danix-xyz-hacker/assets/js/not-found-page.js b/themes/danix-xyz-hacker/assets/js/not-found-page.js index 1590b75..ec42708 100644 --- a/themes/danix-xyz-hacker/assets/js/not-found-page.js +++ b/themes/danix-xyz-hacker/assets/js/not-found-page.js @@ -3,14 +3,7 @@ document.addEventListener('alpine:init', () => { showEasterEgg: false, searchQuery: '', filteredArticles: [], - allArticles: [], - - init() { - // Initialize articles from window.articlesData if available - if (window.articlesData) { - this.allArticles = window.articlesData; - } - }, + allArticles: window.articlesData || [], filterArticles(query) { this.searchQuery = query.toLowerCase(); diff --git a/themes/danix-xyz-hacker/layouts/404.html b/themes/danix-xyz-hacker/layouts/404.html index 9d5fb68..16cbb22 100644 --- a/themes/danix-xyz-hacker/layouts/404.html +++ b/themes/danix-xyz-hacker/layouts/404.html @@ -15,7 +15,7 @@ window.articlesData = [
-
+