From c9404f26746a4f5115cc8f4381b2962a37478984 Mon Sep 17 00:00:00 2001 From: Arunavo Ray Date: Fri, 20 Jun 2025 11:12:09 +0530 Subject: [PATCH] feat: implement custom 404 page with NotFound component and navigation options --- src/components/NotFound.tsx | 81 +++++++++++++++++++++++++++++++++++++ src/pages/404.astro | 37 +++++++++++++++++ 2 files changed, 118 insertions(+) create mode 100644 src/components/NotFound.tsx create mode 100644 src/pages/404.astro diff --git a/src/components/NotFound.tsx b/src/components/NotFound.tsx new file mode 100644 index 0000000..fc92d33 --- /dev/null +++ b/src/components/NotFound.tsx @@ -0,0 +1,81 @@ +import React from "react"; +import { Button } from "@/components/ui/button"; +import { Card, CardContent, CardHeader } from "@/components/ui/card"; +import { Home, ArrowLeft, GitBranch, BookOpen, Settings, FileQuestion } from "lucide-react"; + +export function NotFound() { + return ( +
+ + +
+ +
+

404

+

Page Not Found

+

+ The page you're looking for doesn't exist or has been moved. +

+
+ + + {/* Action Buttons */} +
+ + +
+ + {/* Divider */} +
+
+ +
+
+ or visit +
+
+ + {/* Quick Links */} +
+ + + Repositories + + + + Config + + + + Docs + +
+ + {/* Error Code */} +
+

+ Error Code: 404_NOT_FOUND +

+
+
+
+
+ ); +} \ No newline at end of file diff --git a/src/pages/404.astro b/src/pages/404.astro new file mode 100644 index 0000000..fa7eaaf --- /dev/null +++ b/src/pages/404.astro @@ -0,0 +1,37 @@ +--- +import '../styles/global.css'; +import ThemeScript from '@/components/theme/ThemeScript.astro'; +import { NotFound } from '@/components/NotFound'; + +const generator = Astro.generator; +--- + + + + + + + + Page Not Found - Gitea Mirror + + + + + + + + \ No newline at end of file