Skip to content

Commit

Permalink
feat: 404 page, minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gitlimes committed Aug 10, 2024
1 parent 69150fd commit 1ecf6e7
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 6 deletions.
Binary file added public/assets/images/bandwidthlost.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import Header from '@/components/Header/HeaderWrapper';
import Footer from '@/components/Footer/Footer';
import Script from 'next/script';

import type { Metadata } from 'next';

import { Poppins } from 'next/font/google';
const poppins = Poppins({
weight: ['400', '700'],
Expand All @@ -28,7 +30,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
);
}

export const metadata = {
export const metadata: Metadata = {
title: {
template: '%s | Pretendo Network',
default: 'Pretendo Network', // a default is required when creating a template
Expand Down
24 changes: 24 additions & 0 deletions src/app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import ShowcaseSection from '@/components/ShowcaseSection/ShowcaseSection';

import bandwidthlost from '@/public/assets/images/bandwidthlost.png';

import { getLocale } from '@/utils/locale';

import type { Metadata } from 'next';

export const metadata: Metadata = {
title: '404',
};

export default function NotFound() {
const { locale } = getLocale('TODO'); /* TODO */

return (
<ShowcaseSection
title={'404.'}
caption={locale.notfound.description}
image={bandwidthlost}
bigText={true}
/>
);
}
2 changes: 1 addition & 1 deletion src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const metadata = {
};

export default function Home() {
const { locale } = getLocale('TODO');
const { locale } = getLocale('TODO'); /* TODO */

return (
<main>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header/HeaderWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Header from './Header';
import { getLocale, getLocaleList, localeSetter } from '@/utils/locale';

export default function HeaderWrapper() {
const { locale } = getLocale('TODO');
const { locale } = getLocale('TODO'); /* TODO */

const localeList = getLocaleList();

Expand Down
17 changes: 17 additions & 0 deletions src/components/ShowcaseSection/ShowcaseSection.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@
grid-row: 1;
}

.bigText h2 {
font-size: 8rem;
margin-bottom: -2rem;
}

.bigText p {
font-size: 1.5rem;
}

@media screen and (max-width: 840px) {
.content {
grid-template-columns: 1fr;
Expand All @@ -52,4 +61,12 @@
grid-row: 2;
}

.bigText h2 {
font-size: 8rem;
margin-bottom: -2rem;
}

.bigText p {
font-size: 1.25rem;
}
}
7 changes: 4 additions & 3 deletions src/components/ShowcaseSection/ShowcaseSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ interface ShowcaseSectionProps {
title?: string;
caption?: string;
image?: StaticImageData;
isOdd?: boolean
isOdd?: boolean;
bigText?: boolean;
}

export default function ShowcaseSection(ctx: ShowcaseSectionProps) {
const { title, caption, image, isOdd } = ctx;
const { title, caption, image, isOdd, bigText } = ctx;
return (
<Section
className={classNames(styles.sectionWrapper, { [styles.odd]: isOdd })}
className={classNames(styles.sectionWrapper, { [styles.odd]: isOdd, [styles.bigText]: bigText })}
contentClassName={styles.content}
>
<div className={styles.text}>
Expand Down

0 comments on commit 1ecf6e7

Please sign in to comment.