From 82875856b57b195e9030eed09562aadbdcd6dacd Mon Sep 17 00:00:00 2001 From: "estevez.sebastian@gmail.com" Date: Fri, 11 Jul 2025 01:07:13 -0400 Subject: [PATCH] nav bar --- frontend/components/navigation.tsx | 60 ++++++++--------- frontend/src/app/layout.tsx | 17 +++-- frontend/src/app/page.tsx | 103 +++++++++++++++-------------- 3 files changed, 92 insertions(+), 88 deletions(-) diff --git a/frontend/components/navigation.tsx b/frontend/components/navigation.tsx index 8ee035fb..5c529bbe 100644 --- a/frontend/components/navigation.tsx +++ b/frontend/components/navigation.tsx @@ -10,39 +10,31 @@ export function Navigation() { const pathname = usePathname() return ( - + ) } \ No newline at end of file diff --git a/frontend/src/app/layout.tsx b/frontend/src/app/layout.tsx index 345e8cf2..227b3385 100644 --- a/frontend/src/app/layout.tsx +++ b/frontend/src/app/layout.tsx @@ -3,6 +3,7 @@ import { Geist, Geist_Mono } from "next/font/google"; import "./globals.css"; import { ThemeProvider } from "@/components/theme-provider"; import { Navigation } from "@/components/navigation"; +import { ModeToggle } from "@/components/mode-toggle"; const geistSans = Geist({ variable: "--font-geist-sans", @@ -35,11 +36,19 @@ export default function RootLayout({ enableSystem disableTransitionOnChange > -
+
-
- {children} -
+
+
+

GenDB

+
+ +
+
+
+ {children} +
+
diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index 077a7518..2b2e487b 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -63,7 +63,7 @@ export default function SearchPage() {

Search through your indexed documents

- + @@ -104,57 +104,60 @@ export default function SearchPage() { )} + {/* Always render the results area, but show it empty if no search has been performed */} +
+ {searchPerformed ? ( +
+
+

Search Results

+ + {results.length} result{results.length !== 1 ? 's' : ''} found + +
+ {results.length === 0 ? ( + + +

+ No documents found matching your search query. +

+
+
+ ) : ( +
+ {results.map((result, index) => ( + + +
+ + + {result.filename} + +
+ Score: {result.score.toFixed(2)} +
+
+ + Type: {result.mimetype} • Page {result.page} + +
+ +
+

+ {result.text} +

+
+
+
+ ))} +
+ )} +
+ ) : ( +
+ )} +
- - {searchPerformed && ( -
-
-

Search Results

- - {results.length} result{results.length !== 1 ? 's' : ''} found - -
- - {results.length === 0 ? ( - - -

- No documents found matching your search query. -

-
-
- ) : ( -
- {results.map((result, index) => ( - - -
- - - {result.filename} - -
- Score: {result.score.toFixed(2)} -
-
- - Type: {result.mimetype} • Page {result.page} - -
- -
-

- {result.text} -

-
-
-
- ))} -
- )} -
- )}
) }