diff options
| author | Danilo M. <danix@danix.xyz> | 2026-04-17 12:03:21 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-04-17 12:03:21 +0200 |
| commit | a3d81d5a1a57a905758b26d9abc1e918eaa39237 (patch) | |
| tree | c3a0dde60f6bad8a6272467ab53fd5d9e71072c1 /themes/danix-xyz-hacker/assets | |
| parent | 94a11324999f07feff138364633e8442947b628a (diff) | |
| download | danixxyz-a3d81d5a1a57a905758b26d9abc1e918eaa39237.tar.gz danixxyz-a3d81d5a1a57a905758b26d9abc1e918eaa39237.zip | |
Revert "fix: use language-specific 404 layouts for proper i18n support"
This reverts commit 94a11324999f07feff138364633e8442947b628a.
Diffstat (limited to 'themes/danix-xyz-hacker/assets')
| -rw-r--r-- | themes/danix-xyz-hacker/assets/js/not-found-page.js | 23 |
1 files changed, 23 insertions, 0 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 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'); }); |
