Skip to content

Commit df5bbd3

Browse files
Merge pull request #9 from geo-engine/404
404 page
2 parents bce8f29 + 1ac0798 commit df5bbd3

File tree

4 files changed

+34
-0
lines changed

4 files changed

+34
-0
lines changed

src/i18n/translations.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ export const translations = {
6868
'footer.imprint': 'Impressum',
6969
'footer.externalLinks': 'Externe Links',
7070
'footer.projectPageUni': 'Projektseite Uni Marburg',
71+
'404.title': '404 – Seite nicht gefunden',
72+
'404.description':
73+
'Die angeforderte Seite existiert nicht. Möglicherweise wurde sie entfernt, umbenannt oder ist vorübergehend nicht verfügbar.',
74+
'404.back': 'Zurück zur Startseite',
7175
},
7276
en: {
7377
'nav.contact': 'Contact',
@@ -130,6 +134,9 @@ export const translations = {
130134
'footer.imprint': 'Imprint',
131135
'footer.externalLinks': 'External Links',
132136
'footer.projectPageUni': 'Project page Uni Marburg',
137+
'404.title': '404 – Page not found',
138+
'404.description': 'The requested page does not exist. It may have been removed, renamed, or is temporarily unavailable.',
139+
'404.back': 'Back to homepage',
133140
},
134141
} as const;
135142

@@ -142,6 +149,7 @@ export const pages = {
142149
privacyPolicy: '/datenschutzerklaerung/',
143150
references: '/beispiele-referenzen/',
144151
services: '/services/',
152+
404: '/404/',
145153
},
146154
en: {
147155
about: '/en/about-us/',
@@ -151,5 +159,6 @@ export const pages = {
151159
privacyPolicy: '/en/privacy-policy/',
152160
references: '/en/examples-references/',
153161
services: '/en/services/',
162+
404: '/en/404/',
154163
},
155164
} as const;

src/images/icons/404.svg

Lines changed: 1 addition & 0 deletions
Loading

src/pages/404.astro

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
import {currentLanguage, useTranslations} from '../i18n/utils';
3+
import Section from '../components/Section.astro';
4+
import Layout from '../layouts/Layout.astro';
5+
import {getRelativeLocaleUrl} from 'astro:i18n';
6+
import {Icon} from 'astro-icon/components';
7+
8+
const currentLang = currentLanguage(Astro.currentLocale);
9+
const t = useTranslations(currentLang);
10+
const homeLink = getRelativeLocaleUrl(currentLang, '/');
11+
---
12+
13+
<Layout title={t('404.title')} description={t('404.description')}>
14+
<Section>
15+
<p class="text-center text-xl">{t('404.description')}</p>
16+
<p class="my-8 text-center text-xl"><a class="text-main-green hover:underline" href={homeLink}>{t('404.back')}</a></p>
17+
<Icon name="404" class="text-main-lightgreen m-auto text-[25vw]" />
18+
</Section>
19+
</Layout>

src/pages/en/404.astro

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
import Page from '../404.astro';
3+
---
4+
5+
<Page />

0 commit comments

Comments
 (0)