navbar background fixed

This commit is contained in:
ImAlpha 2023-11-06 19:31:43 -08:00
parent c4510b16be
commit 7d85d90e13
12 changed files with 4654 additions and 84 deletions

View File

@ -0,0 +1,5 @@
.nav_background{
z-index: -10;
filter: brightness(.17);
align-items: baseline;
}

View File

@ -7,6 +7,7 @@ import classnames from "classnames";
import { GiHamburgerMenu } from "react-icons/gi"; import { GiHamburgerMenu } from "react-icons/gi";
import { MdOutlineRestaurantMenu } from "react-icons/md"; import { MdOutlineRestaurantMenu } from "react-icons/md";
import Reserve from "./reserveButton"; import Reserve from "./reserveButton";
import './NavBar.css'
const NavBar = () => { const NavBar = () => {
const currentPath = usePathname(); const currentPath = usePathname();
@ -31,25 +32,8 @@ const NavBar = () => {
return ( return (
<nav className=""> <nav className="">
{/* <center className="text-base-100">O</center> */} {/* <center className="text-base-100">O</center> */}
<div className="flex flex-wrap center items-center justify-center p-4 bg-secondary"> <div className="flex items-center relative justify-center p-10">
<div className="-z-10"> <ul className="hover:cursor-pointer hidden md:block space-x-4 text-2xl font-sans antialiased">
<Image
src="/img01.webp"
alt="nav image"
fill
style={{ objectFit: "cover" }}
quality={100}
className="brightness-50 hidden md:block"
/>
<Image
src="/img01.webp"
alt="nav image"
fill
style={{ objectFit: "cover" }}
className="brightness-0 block md:hidden"
/>
</div>
<ul className="hover:cursor-pointer hidden md:block space-x-4 text-xl font-sans antialiased">
{links.map((link) => ( {links.map((link) => (
<Link <Link
key={link.href} key={link.href}
@ -73,7 +57,7 @@ const NavBar = () => {
width={0} width={0}
height={0} height={0}
sizes="200vw" sizes="200vw"
style={{ width: "45%", height: "auto" }} style={{ width: "55%", height: "auto" }}
alt="Logo" alt="Logo"
className="hidden md:block center mx-auto" className="hidden md:block center mx-auto"
/> />
@ -106,6 +90,23 @@ const NavBar = () => {
))} ))}
</ul> </ul>
<Reserve /> <Reserve />
<div className="overflow-hidden">
<Image
src="/header02.webp"
alt="nav image"
fill
style={{ objectFit: "cover" }}
quality={100}
className="hidden md:block nav_background"
/>
<Image
src="/header02.webp"
alt="nav image"
fill
style={{ objectFit: "cover" }}
className="brightness-0 block md:hidden"
/>
</div>
</div> </div>
<div className="block md:hidden"> <div className="block md:hidden">
<GiHamburgerMenu <GiHamburgerMenu

View File

@ -3,9 +3,11 @@ import React from "react";
import useEmblaCarousel from "embla-carousel-react"; import useEmblaCarousel from "embla-carousel-react";
import Image from "next/image"; import Image from "next/image";
import './carousel.css'; import './carousel.css';
import Autoplay from "embla-carousel-autoplay";
import AutoHeight from 'embla-carousel-auto-height'
export const EmblaCarousel = () => { export const EmblaCarousel = () => {
const [emblaRef] = useEmblaCarousel(); const [emblaRef] = useEmblaCarousel({loop: false}, [Autoplay(), AutoHeight()]);
return ( return (
<div className="embla" ref={emblaRef}> <div className="embla" ref={emblaRef}>

View File

@ -1,3 +1,4 @@
"use client";
import React from "react"; import React from "react";
import { useState } from "react"; import { useState } from "react";
import { BsChevronCompactLeft, BsChevronCompactRight } from "react-icons/bs"; import { BsChevronCompactLeft, BsChevronCompactRight } from "react-icons/bs";
@ -5,61 +6,10 @@ import { RxDotFilled } from "react-icons/rx";
import { EmblaCarousel } from "./carousel"; import { EmblaCarousel } from "./carousel";
const Gallery = () => { const Gallery = () => {
// const slides = [
// { url: "/images/1577mobile.webp" },
// { url: "/images/bar01.jpg" },
// { url: "/images/fbimg02.jpg" },
// { url: "/images/food01.jpg" },
// { url: "/images/food02.webp" },
// { url: "/images/IMG_2737.webp" },
// { url: "/images/IMG_2749.webp" },
// { url: "/images/IMG_2766.webp" },
// { url: "/images/img01.webp" },
// { url: "/images/img05.webp" },
// ];
// const [currentIndex, setCurrentIndex] = useState(0);
// const prevSlide = () => {
// const isFirstSlide = currentIndex === 0;
// const newIndex = isFirstSlide ? slides.length - 1 : currentIndex - 1;
// setCurrentIndex(newIndex);
// };
// const nextSlide = () => {
// const isLastSlide = currentIndex === slides.length - 1;
// const newIndex = isLastSlide ? 0 : currentIndex + 1;
// setCurrentIndex(newIndex);
// };
// const goToSlide = (slideIndex) => {
// setCurrentIndex(slideIndex);
// };
return ( return (
<div className=""> <div className="">
<EmblaCarousel /> <EmblaCarousel />
{/* <div
style={{ backgroundImage: `url(${slides[5].url})` }}
className="w-full h-full rounded-2xl bg-center bg-cover duration-500"
></div>
<div className="hidden group-hover:block absolute top-50% -translate-x-0 translate-y-[-50%] left-5 text-2xl rounded-full p-2 bg-black/20 text-base-100 cursor-pointer">
<BsChevronCompactLeft onClick={prevSlide} size={30} />
</div>
<div className="hidden group-hover:block absolute top-50% -translate-x-0 translate-y-[-50%] right-5 text-2xl rounded-full p-2 bg-black/20 text-base-100 cursor-pointer">
<BsChevronCompactRight onClikc={nextSlide} size={30} />
</div>
<div className="flex top-4 justify-center py-2">
{slides.map((slide, slideIndex) => (
<div
key={slideIndex}
onClick={() => goToSlide(slideIndex)}
className="text-2xl cursor-pointer"
>
<RxDotFilled />
</div>
))}
</div> */}
</div> </div>
); );
}; };

View File

@ -0,0 +1,4 @@
.jefes_background{
z-index: -1;
filter: brightness(.19);
}

View File

@ -1,20 +1,20 @@
import type { Metadata } from 'next' import type { Metadata } from "next";
import { Inter } from 'next/font/google' import { Inter } from "next/font/google";
import './globals.css' import "./globals.css";
import NavBar from './components/NavBar/NavBar' import NavBar from "./components/NavBar/NavBar";
import Image from 'next/image' import Image from "next/image";
const inter = Inter({ subsets: ['latin'] }) const inter = Inter({ subsets: ["latin"] });
export const metadata: Metadata = { export const metadata: Metadata = {
title: 'Create Next App', title: "Create Next App",
description: 'Generated by create next app', description: "Generated by create next app",
} };
export default function RootLayout({ export default function RootLayout({
children, children,
}: { }: {
children: React.ReactNode children: React.ReactNode;
}) { }) {
return ( return (
<html lang="en" data-theme="jefes"> <html lang="en" data-theme="jefes">
@ -31,5 +31,5 @@ export default function RootLayout({
<main>{children}</main> <main>{children}</main>
</body> </body>
</html> </html>
) );
} }

View File

@ -1,3 +1,3 @@
.gun_menu{ .gun_menu{
--transform-rotate: 270deg; transform: rotate(0.75turn);
} }

4607
Websites/jefes-nextjs/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -13,6 +13,7 @@
"classnames": "^2.3.2", "classnames": "^2.3.2",
"clsx": "^2.0.0", "clsx": "^2.0.0",
"easymde": "^2.18.0", "easymde": "^2.18.0",
"embla-carousel-auto-height": "^8.0.0-rc14",
"embla-carousel-autoplay": "^8.0.0-rc14", "embla-carousel-autoplay": "^8.0.0-rc14",
"embla-carousel-react": "^8.0.0-rc14", "embla-carousel-react": "^8.0.0-rc14",
"next": "13.5.6", "next": "13.5.6",

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 KiB