From b272c39acaa669cff9f1ee21be7ff040d3d7fe55 Mon Sep 17 00:00:00 2001 From: lamacchinadesiderante Date: Sun, 28 Apr 2024 19:40:11 +0200 Subject: [PATCH] add not found page and components --- locale/en.json | 5 +++++ locale/it.json | 5 +++++ src/app/[locale]/404/page.tsx | 11 ++++++++++ .../Pages/NotFound/Msg/Msg.module.scss | 13 +++++++++++ src/components/Pages/NotFound/Msg/index.tsx | 22 +++++++++++++++++++ src/components/Pages/NotFound/index.tsx | 18 +++++++++++++++ 6 files changed, 74 insertions(+) create mode 100644 src/app/[locale]/404/page.tsx create mode 100644 src/components/Pages/NotFound/Msg/Msg.module.scss create mode 100644 src/components/Pages/NotFound/Msg/index.tsx create mode 100644 src/components/Pages/NotFound/index.tsx diff --git a/locale/en.json b/locale/en.json index c6b4f4a..96989e4 100644 --- a/locale/en.json +++ b/locale/en.json @@ -10,6 +10,11 @@ "disclaimer_5": "No banners or annoying popups. You can jerk off with no hassle!", "disclaimer_6": "You're choosing image over imagination. What if they're not in antithesis?" }, + "NotFound": { + "uh_oh": "Uh Oh...", + "something_wrong": "Something went wrong :|", + "back_to_home": "Back to homepage" + }, "Search": { "placeholder": "categories, pornostars, etc...", "submit": "Search" diff --git a/locale/it.json b/locale/it.json index 96dcac4..129662a 100644 --- a/locale/it.json +++ b/locale/it.json @@ -10,6 +10,11 @@ "disclaimer_5": "Niente banner o popup fastidiosi. Puoi masturbarti in santa pace.", "disclaimer_6": "Stai preferendo l'immagine all'immaginazione. E se immagine e immaginazione non fossero in antitesi?" }, + "NotFound": { + "uh_oh": "Uh Oh...", + "something_wrong": "Qualcosa รจ andato storto :|", + "back_to_home": "Torna alla home" + }, "Search": { "placeholder": "categorie, pornostar, ecc...", "submit": "Cerca" diff --git a/src/app/[locale]/404/page.tsx b/src/app/[locale]/404/page.tsx new file mode 100644 index 0000000..8a1050a --- /dev/null +++ b/src/app/[locale]/404/page.tsx @@ -0,0 +1,11 @@ +import Layout from "@/components/Layout"; +import NotFound from "@/components/Pages/NotFound"; + +export default function NotFoundPage() { + + return ( + + + + ); +} diff --git a/src/components/Pages/NotFound/Msg/Msg.module.scss b/src/components/Pages/NotFound/Msg/Msg.module.scss new file mode 100644 index 0000000..dca88b8 --- /dev/null +++ b/src/components/Pages/NotFound/Msg/Msg.module.scss @@ -0,0 +1,13 @@ +@import 'fontsize'; + +.header { + font-size: $font-size-xlarge; +} + +.msg { + font-size: $font-size-large; +} + +.link { + color: var(--primary); +} \ No newline at end of file diff --git a/src/components/Pages/NotFound/Msg/index.tsx b/src/components/Pages/NotFound/Msg/index.tsx new file mode 100644 index 0000000..fa1cf09 --- /dev/null +++ b/src/components/Pages/NotFound/Msg/index.tsx @@ -0,0 +1,22 @@ +import React, { } from 'react'; + +import style from './Msg.module.scss'; + +import { useTranslations } from 'next-intl'; +import Link from 'next/link'; + +const Msg: React.FC = () => { + + const t = useTranslations('NotFound'); + + return ( +
+
{t('uh_oh')}
+

{t('something_wrong')}

+ {t('back_to_home')} +
+ ); + +}; + +export default Msg; \ No newline at end of file diff --git a/src/components/Pages/NotFound/index.tsx b/src/components/Pages/NotFound/index.tsx new file mode 100644 index 0000000..ab79a9d --- /dev/null +++ b/src/components/Pages/NotFound/index.tsx @@ -0,0 +1,18 @@ +import React from 'react'; + +import Header from '@/components/Layout/Header'; +import SearchBar from '@/components/Layout/SearchBar'; +import Msg from './Msg'; + +const NotFound: React.FC = (props) => { + + return ( + <> +
+ + + + ); +}; + +export default NotFound; \ No newline at end of file