diff options
Diffstat (limited to 'themes')
| -rw-r--r-- | themes/danix-xyz-hacker/layouts/404.html | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/themes/danix-xyz-hacker/layouts/404.html b/themes/danix-xyz-hacker/layouts/404.html index a81f34d..efae232 100644 --- a/themes/danix-xyz-hacker/layouts/404.html +++ b/themes/danix-xyz-hacker/layouts/404.html @@ -77,17 +77,21 @@ window.articlesData = [ <!-- Navigation Links --> <div class="space-y-4 flex flex-col items-center mb-12"> - {{ $homeLink := "/" }} - {{ if eq .Lang "it" }} - {{ $homeLink = "/it/" }} + {{ $lang := "en" }} + {{ if in .Permalink "/it/" }} + {{ $lang = "it" }} {{ end }} - <a href="{{ $homeLink }}" class="btn btn-primary"> + {{ $prefix := "" }} + {{ if eq $lang "it" }} + {{ $prefix = "/it" }} + {{ end }} + <a href="{{ $prefix }}/" class="btn btn-primary"> {{ i18n "goHome" }} </a> - <a href="{{ if eq .Lang "it" }}/it{{ end }}/articles/" class="btn btn-secondary"> + <a href="{{ $prefix }}/articles/" class="btn btn-secondary"> {{ i18n "browseArticles" }} </a> - <a href="{{ if eq .Lang "it" }}/it{{ end }}/is/here/" class="btn btn-outline"> + <a href="{{ $prefix }}/is/here/" class="btn btn-outline"> {{ i18n "contactSupport" }} </a> </div> |
