From ac3b71ffe67654ed77b37efc20c7f52eb7c01702 Mon Sep 17 00:00:00 2001 From: jvarCS Date: Thu, 12 Oct 2023 23:32:54 -0700 Subject: [PATCH 1/4] navbar add --- src/components/Navigation.jsx | 79 ++++++++++++++++++++++++++++++++++- src/data/navigation.js | 18 ++++++++ 2 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 src/data/navigation.js diff --git a/src/components/Navigation.jsx b/src/components/Navigation.jsx index 3252523..20a0907 100644 --- a/src/components/Navigation.jsx +++ b/src/components/Navigation.jsx @@ -1,5 +1,82 @@ +"use client"; +import Navbar from "react-bootstrap/Navbar"; +import React from "react"; +import blueLogo from "../../public/assets/blueLogo.svg"; +import Link from "next/link"; +import Image from "next/image"; +import { items } from "../data/navigation"; +import Nav from "react-bootstrap/Nav"; +import { useState } from "react"; +import { NavDropdown } from "react-bootstrap"; + const Navigation = () => { - return
Navigation
; + const [selected, setSelected] = useState(""); + return ( + + + + + + + + + + ); }; export default Navigation; diff --git a/src/data/navigation.js b/src/data/navigation.js new file mode 100644 index 0000000..170a1a3 --- /dev/null +++ b/src/data/navigation.js @@ -0,0 +1,18 @@ +export const items = [ + { + name: "ABOUT", + link: "about", + }, + { + name: "PROJECTS", + link: "projects", + }, + { + name: "EVENTS", + link: "events", + }, + { + name: "BOARD", + link: "board", + }, +]; From 82a8d97ead16a6d2a35cd06c6b95a34f74889ec2 Mon Sep 17 00:00:00 2001 From: jvarCS Date: Fri, 13 Oct 2023 01:24:52 -0700 Subject: [PATCH 2/4] navbar fix --- src/components/Navigation.jsx | 44 +++++++++++++++++++++++------------ src/data/navigation.js | 4 ++++ 2 files changed, 33 insertions(+), 15 deletions(-) diff --git a/src/components/Navigation.jsx b/src/components/Navigation.jsx index 20a0907..986d0fa 100644 --- a/src/components/Navigation.jsx +++ b/src/components/Navigation.jsx @@ -16,7 +16,7 @@ const Navigation = () => { collapseOnSelect expand="md" fixed="top" - className="w-full md:h-[8vh] flex pb-10 font-playfair !bg-slate-400 justify-between items-center" + className="w-full md:h-[8vh] flex pb-10 font-playfair !bg-white justify-between items-center" > @@ -25,18 +25,21 @@ const Navigation = () => { diff --git a/src/data/navigation.js b/src/data/navigation.js index 170a1a3..06ccdd0 100644 --- a/src/data/navigation.js +++ b/src/data/navigation.js @@ -2,17 +2,21 @@ export const items = [ { name: "ABOUT", link: "about", + drop: false, }, { name: "PROJECTS", link: "projects", + drop: true, }, { name: "EVENTS", link: "events", + drop: false, }, { name: "BOARD", link: "board", + drop: false, }, ]; From 0480562f38e24bb41af2da8f49b44806f822a608 Mon Sep 17 00:00:00 2001 From: jvarCS Date: Wed, 18 Oct 2023 15:48:54 -0700 Subject: [PATCH 3/4] Added changes --- src/components/Navigation.jsx | 45 ++++++++++------------------------- 1 file changed, 12 insertions(+), 33 deletions(-) diff --git a/src/components/Navigation.jsx b/src/components/Navigation.jsx index a2222c7..9b28976 100644 --- a/src/components/Navigation.jsx +++ b/src/components/Navigation.jsx @@ -33,53 +33,32 @@ const Navigation = () => { {item.name} } > - - Costa Rica - - - Tanzania - - - Water Quality and Filtration - - - Robotics - - - Air Quality System - + {item.sub.map((country, index) => ( + + {country.name} + + ))} ) : ( setSelected(item.name)} // Blue border when selected became squared immediately after selecting something else so applied rounded-full + onClick={() => setSelected(item.name)} className={`hover:cursor-pointer rounded-full mb-0 py-1 px-4 no-underline !text-black text-2xl whitespace-nowrap !font-normal hover:!text-blue-600 duration-300 ${ selected === item.name && - "!bg-ewb-blue-200 rounded-full text-white hover:!text-white" // To remove blue hover i set new hover to white + "!bg-ewb-blue-200 rounded-full text-white hover:!text-white" }`} > {item.name} From 10183a640281d25aadf2b5254707dbdd8b9662a9 Mon Sep 17 00:00:00 2001 From: menthy-wu Date: Wed, 18 Oct 2023 17:42:50 -0700 Subject: [PATCH 4/4] fix dropdown --- src/app/layout.js | 2 +- src/components/Navigation.jsx | 39 +++++++++++++++++++++++------------ src/data/navigation.js | 18 ++++++++-------- 3 files changed, 36 insertions(+), 23 deletions(-) diff --git a/src/app/layout.js b/src/app/layout.js index b2653d0..780cb2c 100644 --- a/src/app/layout.js +++ b/src/app/layout.js @@ -17,7 +17,7 @@ export default function RootLayout({ children }) { -
+
{children}