summaryrefslogtreecommitdiffstats
path: root/themes
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-04-17 11:35:24 +0200
committerDanilo M. <danix@danix.xyz>2026-04-17 11:35:24 +0200
commit681ee6ca03258402deefc62a4d08f44ae7b70cbe (patch)
tree6ac38c48869fffec830dc9781ab57ef6577f014d /themes
parent77e4202027f75cfb1dcea21f6e0d1e7372348c91 (diff)
downloaddanixxyz-681ee6ca03258402deefc62a4d08f44ae7b70cbe.tar.gz
danixxyz-681ee6ca03258402deefc62a4d08f44ae7b70cbe.zip
fix: simplify Alpine.js component initialization by loading articles data directly
Diffstat (limited to 'themes')
-rw-r--r--themes/danix-xyz-hacker/assets/js/not-found-page.js9
-rw-r--r--themes/danix-xyz-hacker/layouts/404.html2
2 files changed, 2 insertions, 9 deletions
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 = [
</script>
<main class="min-h-screen px-4 py-12">
- <div class="mx-auto px-4 py-12 max-w-4xl border border-border glow-accent rounded-lg bg-bg p-8" x-data="notFoundPage()" x-init="init()">
+ <div class="mx-auto px-4 py-12 max-w-4xl border border-border glow-accent rounded-lg bg-bg p-8" x-data="notFoundPage()">
<div class="text-center">
<!-- 404 Heading -->
<h1 class="text-7xl md:text-8xl font-bold text-accent mb-4 animate-fade-in">