diff options
| author | Danilo M. <danix@danix.xyz> | 2026-04-17 11:53:56 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-04-17 11:53:56 +0200 |
| commit | 1ae60588c0ceb8a3ec0b35f4c2cb45a2116ec89a (patch) | |
| tree | 833fd7865f89a452a2c48e425712862827a7eb7f /themes/danix-xyz-hacker/layouts/404.html | |
| parent | 1cab4424a5c6dd2aeb453d299b6a2f12a840599d (diff) | |
| download | danixxyz-1ae60588c0ceb8a3ec0b35f4c2cb45a2116ec89a.tar.gz danixxyz-1ae60588c0ceb8a3ec0b35f4c2cb45a2116ec89a.zip | |
Revert "fix: use Hugo content-based 404 pages for proper multilingual support"
This reverts commit 1cab4424a5c6dd2aeb453d299b6a2f12a840599d.
Diffstat (limited to 'themes/danix-xyz-hacker/layouts/404.html')
| -rw-r--r-- | themes/danix-xyz-hacker/layouts/404.html | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/themes/danix-xyz-hacker/layouts/404.html b/themes/danix-xyz-hacker/layouts/404.html index a81f34d..0fb6c9a 100644 --- a/themes/danix-xyz-hacker/layouts/404.html +++ b/themes/danix-xyz-hacker/layouts/404.html @@ -1,5 +1,10 @@ {{ define "main" }} +<!-- Detect language from current URL --> +<script> +window.currentLang = window.location.pathname.startsWith('/it/') ? 'it' : 'en'; +</script> + <!-- Pass articles data to JavaScript for Alpine.js --> <script> window.articlesData = [ @@ -76,18 +81,14 @@ window.articlesData = [ </div> <!-- Navigation Links --> - <div class="space-y-4 flex flex-col items-center mb-12"> - {{ $homeLink := "/" }} - {{ if eq .Lang "it" }} - {{ $homeLink = "/it/" }} - {{ end }} - <a href="{{ $homeLink }}" class="btn btn-primary"> + <div class="space-y-4 flex flex-col items-center mb-12" x-data="notFoundNav()"> + <a :href="homeLink" class="btn btn-primary"> {{ i18n "goHome" }} </a> - <a href="{{ if eq .Lang "it" }}/it{{ end }}/articles/" class="btn btn-secondary"> + <a :href="articlesLink" class="btn btn-secondary"> {{ i18n "browseArticles" }} </a> - <a href="{{ if eq .Lang "it" }}/it{{ end }}/is/here/" class="btn btn-outline"> + <a :href="contactLink" class="btn btn-outline"> {{ i18n "contactSupport" }} </a> </div> |
