From c22affe6e347feb3a24a0986a64eeb25ba869cf9 Mon Sep 17 00:00:00 2001 From: parsa aghaei Date: Tue, 1 Oct 2024 14:50:54 +0330 Subject: [PATCH] some updates for styles --- package.json | 2 +- .../(routes)/(website)/[...notFound]/page.tsx | 32 ++++++++++ src/app/(routes)/(website)/not-found.tsx | 19 ------ src/app/(routes)/blog/[...notFound]/page.tsx | 38 ++++++++++++ .../blog/components/button/button.tsx | 32 +++++----- .../blog/components/footer/footer.tsx | 6 +- .../blog/components/header/header.tsx | 59 +++++++------------ .../blog/components/header/navLinks.tsx | 43 ++++++++++++++ .../home/filtered-posts/filteredPosts.tsx | 8 +-- .../(routes)/blog/components/home/new/new.tsx | 8 +-- .../blog/components/home/random/random.tsx | 58 +++++++++++++++++- .../home/reading-lists/readingList.tsx | 10 ++-- src/app/(routes)/blog/layout.tsx | 2 +- src/app/(routes)/blog/new/page.tsx | 7 +++ src/app/(routes)/blog/not-found.tsx | 19 ------ src/app/globals.css | 25 ++++++++ 16 files changed, 254 insertions(+), 114 deletions(-) create mode 100644 src/app/(routes)/(website)/[...notFound]/page.tsx delete mode 100644 src/app/(routes)/(website)/not-found.tsx create mode 100644 src/app/(routes)/blog/[...notFound]/page.tsx create mode 100644 src/app/(routes)/blog/components/header/navLinks.tsx create mode 100644 src/app/(routes)/blog/new/page.tsx delete mode 100644 src/app/(routes)/blog/not-found.tsx diff --git a/package.json b/package.json index ac0dc10..7ec872a 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "scripts": { - "dev": "next dev --turbo", + "dev": "next dev", "build": "next build", "start": "next start", "lint": "next lint", diff --git a/src/app/(routes)/(website)/[...notFound]/page.tsx b/src/app/(routes)/(website)/[...notFound]/page.tsx new file mode 100644 index 0000000..70167cb --- /dev/null +++ b/src/app/(routes)/(website)/[...notFound]/page.tsx @@ -0,0 +1,32 @@ +import Image from "next/image"; +import Link from "next/link"; + +interface PropsType { + params: { + notFound: string[]; + }; +} + +export default function NotFound({ params }: PropsType) { + const imageUrl = `/images/404/${Math.floor(Math.random() * 5) + 1}.jpg`; + + return ( +
+ 404 illustration +

Nothing Found!

+

+ Could not find{" "} + + /blog/{params.notFound.join("/")} + {" "} + ! +

+ + Return Home + +
+ ); +} diff --git a/src/app/(routes)/(website)/not-found.tsx b/src/app/(routes)/(website)/not-found.tsx deleted file mode 100644 index ff835f9..0000000 --- a/src/app/(routes)/(website)/not-found.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import Image from "next/image"; -import Link from "next/link"; - -export default function NotFound() { - const imageUrl = `/images/404/${Math.floor(Math.random() * 5) + 1}.jpg`; - return ( -
- 404 illustration -

Not Found

-

Could not find requested resource

- - Return Home - -
- ); -} diff --git a/src/app/(routes)/blog/[...notFound]/page.tsx b/src/app/(routes)/blog/[...notFound]/page.tsx new file mode 100644 index 0000000..19fc1e5 --- /dev/null +++ b/src/app/(routes)/blog/[...notFound]/page.tsx @@ -0,0 +1,38 @@ +import Image from "next/image"; +import Link from "next/link"; + +interface PropsType { + params: { + notFound: string[]; + }; +} + +export default function NotFound({ params }: PropsType) { + const imageUrl = `/images/404/${Math.floor(Math.random() * 5) + 1}.jpg`; + + return ( +
+ 404 illustration +

Nothing Found!

+

+ Could not find{" "} + + /blog/{params.notFound.join("/")} + {" "} + ! +

+ + Return Home + +
+ ); +} diff --git a/src/app/(routes)/blog/components/button/button.tsx b/src/app/(routes)/blog/components/button/button.tsx index 4c4d348..27b7edd 100644 --- a/src/app/(routes)/blog/components/button/button.tsx +++ b/src/app/(routes)/blog/components/button/button.tsx @@ -7,46 +7,46 @@ type buttonPropsType = { export default function Button({ type, color, text }: buttonPropsType) { return (