From 8772332b85a98096d79eae381b397a59ca9af904 Mon Sep 17 00:00:00 2001 From: ImAlpha Date: Mon, 27 Nov 2023 02:58:00 -0800 Subject: [PATCH] fixed nav and scrolling nav --- .../app/components/NavBar/NavBar.css | 2 +- .../app/components/NavBar/NavBar.tsx | 159 ++++++++++++------ .../app/components/NavBar/reserveButton.tsx | 6 +- .../app/components/StoreHours/StoreHours.tsx | 13 +- Websites/jefes-nextjs/app/menuButton.tsx | 4 +- .../jefes-nextjs/components/ui/button.tsx | 1 + 6 files changed, 121 insertions(+), 64 deletions(-) diff --git a/Websites/jefes-nextjs/app/components/NavBar/NavBar.css b/Websites/jefes-nextjs/app/components/NavBar/NavBar.css index e2accea..4bb78e6 100644 --- a/Websites/jefes-nextjs/app/components/NavBar/NavBar.css +++ b/Websites/jefes-nextjs/app/components/NavBar/NavBar.css @@ -9,7 +9,7 @@ } .active { - background: green; + position: fixed; width: 100%; justify-content: space-around; diff --git a/Websites/jefes-nextjs/app/components/NavBar/NavBar.tsx b/Websites/jefes-nextjs/app/components/NavBar/NavBar.tsx index 1a73c2b..cc45e7c 100644 --- a/Websites/jefes-nextjs/app/components/NavBar/NavBar.tsx +++ b/Websites/jefes-nextjs/app/components/NavBar/NavBar.tsx @@ -12,6 +12,9 @@ import { FaTiktok } from "react-icons/fa"; import { RiCellphoneLine } from "react-icons/ri"; import { FaPhone } from "react-icons/fa6"; import StoreHours from "../StoreHours/StoreHours"; +import { Button } from "@/components/ui/button"; +import { IoLocationSharp } from "react-icons/io5"; +import { IoIosMail } from "react-icons/io"; const NavBar = () => { const currentPath = usePathname(); @@ -28,6 +31,8 @@ const NavBar = () => { { label: "HOME", href: "/" }, { label: "MENU", href: "/menu" }, { label: "GALLERY", href: "/gallery" }, + { label: "ABOUT", href: "/about-us" }, + { label: "CONTACT", href: "/contact" }, ]; // Create an array to hold the list items const links2 = [ @@ -41,7 +46,7 @@ const NavBar = () => { const changeBackground = () => { // console.log(window.scrollY); - if (window.scrollY >= 70) { + if (window.scrollY >= 120) { setNavbar(true); } else { setNavbar(false); @@ -58,31 +63,105 @@ const NavBar = () => {
+ {/* Top Bar */} +
+
+ {/* left side */} +
+
+
+ +
+ + 24188 E Hwy 51, Broken Arrow, OK 74014 + +
+
+ +
+
+ {/* right side */} +
+
+
+ +
+ +
+ +
+
+
+
+ {/* Phone Number */} + + {/* logo */} + + Logo + Logo + + + {/* Pages */} - {/* logo */} - - Logo - Logo - - - {/* Reservation button */} -
- +
diff --git a/Websites/jefes-nextjs/app/components/NavBar/reserveButton.tsx b/Websites/jefes-nextjs/app/components/NavBar/reserveButton.tsx index b688714..9e37b7f 100644 --- a/Websites/jefes-nextjs/app/components/NavBar/reserveButton.tsx +++ b/Websites/jefes-nextjs/app/components/NavBar/reserveButton.tsx @@ -7,11 +7,11 @@ const Reserve = () => { return (
-
diff --git a/Websites/jefes-nextjs/app/components/StoreHours/StoreHours.tsx b/Websites/jefes-nextjs/app/components/StoreHours/StoreHours.tsx index 94ac047..8ec3bf7 100644 --- a/Websites/jefes-nextjs/app/components/StoreHours/StoreHours.tsx +++ b/Websites/jefes-nextjs/app/components/StoreHours/StoreHours.tsx @@ -1,6 +1,6 @@ import { getDay } from "date-fns"; import React from "react"; -import { FaRegClock } from "react-icons/fa"; +import { FaClock } from "react-icons/fa6"; const StoreHours = () => { var week = [ @@ -38,11 +38,14 @@ const StoreHours = () => { return ( <> -
-
- +
+
+ + + Today +
-
{hours}
+
{hours}
); diff --git a/Websites/jefes-nextjs/app/menuButton.tsx b/Websites/jefes-nextjs/app/menuButton.tsx index 16d7131..d0cb81c 100644 --- a/Websites/jefes-nextjs/app/menuButton.tsx +++ b/Websites/jefes-nextjs/app/menuButton.tsx @@ -6,8 +6,8 @@ const MenuButton = () => { return (
- diff --git a/Websites/jefes-nextjs/components/ui/button.tsx b/Websites/jefes-nextjs/components/ui/button.tsx index ed4bba8..b9cb6ff 100644 --- a/Websites/jefes-nextjs/components/ui/button.tsx +++ b/Websites/jefes-nextjs/components/ui/button.tsx @@ -21,6 +21,7 @@ const buttonVariants = cva( }, size: { default: "h-10 px-4 py-2", + xs: "h-9 rounded-md px-1", sm: "h-9 rounded-md px-3", lg: "h-11 rounded-md px-8", icon: "h-10 w-10",