From a3d81d5a1a57a905758b26d9abc1e918eaa39237 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 17 Apr 2026 12:03:21 +0200 Subject: Revert "fix: use language-specific 404 layouts for proper i18n support" This reverts commit 94a11324999f07feff138364633e8442947b628a. --- .../danix-xyz-hacker/assets/js/not-found-page.js | 23 +++ themes/danix-xyz-hacker/layouts/404.html | 156 +++++++++++++++++++++ themes/danix-xyz-hacker/layouts/en/404.html | 151 -------------------- themes/danix-xyz-hacker/layouts/it/404.html | 151 -------------------- 4 files changed, 179 insertions(+), 302 deletions(-) create mode 100644 themes/danix-xyz-hacker/layouts/404.html delete mode 100644 themes/danix-xyz-hacker/layouts/en/404.html delete mode 100644 themes/danix-xyz-hacker/layouts/it/404.html (limited to 'themes') 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 e86af02..cec60bd 100644 --- a/themes/danix-xyz-hacker/assets/js/not-found-page.js +++ b/themes/danix-xyz-hacker/assets/js/not-found-page.js @@ -31,6 +31,29 @@ document.addEventListener('alpine:init', () => { } })); + Alpine.data('notFoundNav', () => { + const isItalian = window.location.pathname.startsWith('/it/'); + return { + get homeLink() { + return isItalian ? '/it/' : '/'; + }, + get articlesLink() { + return isItalian ? '/it/articles/' : '/articles/'; + }, + get contactLink() { + return isItalian ? '/it/is/here/' : '/is/here/'; + }, + goHome() { + window.location.href = this.homeLink; + }, + goArticles() { + window.location.href = this.articlesLink; + }, + goContact() { + window.location.href = this.contactLink; + } + }; + }); console.log('notFoundPage Alpine component registered'); }); diff --git a/themes/danix-xyz-hacker/layouts/404.html b/themes/danix-xyz-hacker/layouts/404.html new file mode 100644 index 0000000..341f90b --- /dev/null +++ b/themes/danix-xyz-hacker/layouts/404.html @@ -0,0 +1,156 @@ +{{ define "main" }} + + + + + + + +
+
+
+ +

+ 404 +

+ + +

+ {{ i18n "notFound" }} +

+ +

+ {{ i18n "notFoundMessage" }} +

+ + +
+
+ + +
+
+ +
+
+ {{ i18n "noSearchResults" }} +
+
+ + +
+

{{ i18n "recentArticles" }}

+
+ {{ range first 5 (where .Site.RegularPages "Section" "articles") }} + + {{ end }} +
+
+ + + + + +
+ +
+ + +
+ +
+ + +
+

{{ i18n "easterEggTitle" }}

+ +
+ + + +
+ + +
+
+
+
+
+ +{{ end }} diff --git a/themes/danix-xyz-hacker/layouts/en/404.html b/themes/danix-xyz-hacker/layouts/en/404.html deleted file mode 100644 index 6ed4892..0000000 --- a/themes/danix-xyz-hacker/layouts/en/404.html +++ /dev/null @@ -1,151 +0,0 @@ -{{ define "main" }} - - - - -
-
-
- -

- 404 -

- - -

- {{ i18n "notFound" }} -

- -

- {{ i18n "notFoundMessage" }} -

- - -
-
- - -
-
- -
-
- {{ i18n "noSearchResults" }} -
-
- - -
-

{{ i18n "recentArticles" }}

-
- {{ range first 5 (where .Site.RegularPages "Section" "articles") }} - - {{ end }} -
-
- - - - - -
- -
- - -
- -
- - -
-

{{ i18n "easterEggTitle" }}

- -
- - - -
- - -
-
-
-
-
- -{{ end }} diff --git a/themes/danix-xyz-hacker/layouts/it/404.html b/themes/danix-xyz-hacker/layouts/it/404.html deleted file mode 100644 index 805b19a..0000000 --- a/themes/danix-xyz-hacker/layouts/it/404.html +++ /dev/null @@ -1,151 +0,0 @@ -{{ define "main" }} - - - - -
-
-
- -

- 404 -

- - -

- {{ i18n "notFound" }} -

- -

- {{ i18n "notFoundMessage" }} -

- - -
-
- - -
-
- -
-
- {{ i18n "noSearchResults" }} -
-
- - -
-

{{ i18n "recentArticles" }}

-
- {{ range first 5 (where .Site.RegularPages "Section" "articles") }} - - {{ end }} -
-
- - - - - -
- -
- - -
- -
- - -
-

{{ i18n "easterEggTitle" }}

- -
- - - -
- - -
-
-
-
-
- -{{ end }} -- cgit v1.2.3