Skip to content

Commit

Permalink
navbar changes done
Browse files Browse the repository at this point in the history
  • Loading branch information
dheeraj1922d committed Apr 7, 2024
1 parent 995bd18 commit b5a8702
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 36 deletions.
3 changes: 1 addition & 2 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import { Routes, Route } from "react-router-dom";


import { Home, Error, Artist, Gallery, Team } from "./Pages";


import { Navbar, Footer } from "./Components";

const App = () => {

return (
<>
<Navbar />
<Routes>
<Route path="/" element={<Home />} />
<Route path="/artist" element={<Artist />} />
Expand Down
11 changes: 8 additions & 3 deletions src/Components/Navbar/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { useEffect, useRef, useState } from "react";
import { Link } from "react-router-dom";
import styles from "./Navbar.module.scss";

const Navbar = () => {
const Navbar = ({isHome = false}) => {
const [nav, setNav] = useState(false);
const [navVissible , setNavVissible ] = useState(false)
const [navVissible , setNavVissible ] = useState(!isHome)
const menuRef = useRef();
const hamburger = {
inactive:
Expand Down Expand Up @@ -40,7 +40,12 @@ const Navbar = () => {
if (window.scrollY >= 400) {
setNavVissible(true);
} else {
setNavVissible(false);
if(isHome){
setNavVissible(false);
}
else{
setNavVissible(true);
}
}
};

Expand Down
2 changes: 2 additions & 0 deletions src/Pages/Artist/Artist.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ import fluter from "../../../public/artist_assets/flute_right.svg";
import artistimg from "../../../public/artist_assets/artist_img.svg";
import framel from "../../../public/artist_assets/frame_left.svg";
import framer from "../../../public/artist_assets/frame_right.svg";
import { Navbar } from "../../Components";

const Artist = () => {
return (
<div className={styles.artist_page}>
<Navbar/>
<img
alt="tmg"
className={styles.bg_img}
Expand Down
8 changes: 7 additions & 1 deletion src/Pages/Error/Error.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import { Navbar } from "../../Components";
import style from "./Error.module.scss";

const Error = () => {
return <div className={style.error}>Error</div>;
return (
<div>
<Navbar />
<div className={style.error}>Error</div>
</div>
);
};

export default Error;
67 changes: 38 additions & 29 deletions src/Pages/Gallery/Gallery.jsx
Original file line number Diff line number Diff line change
@@ -1,56 +1,65 @@
import { Swiper, SwiperSlide } from 'swiper/react';
import 'swiper/css';
import 'swiper/css/effect-coverflow';
import 'swiper/css/pagination';
import './styles.css';
import { EffectCoverflow, Pagination, Autoplay } from 'swiper/core';
let img1 = "https://res.cloudinary.com/dyn3q57b8/image/upload/f_auto,q_auto,fl_lossy/v1/Oikyotaan%20'24%20assets/Gallery/image1"
let img2 = "https://res.cloudinary.com/dyn3q57b8/image/upload/f_auto,q_auto,fl_lossy/v1/Oikyotaan%20'24%20assets/Gallery/image2"
let img3 = "https://res.cloudinary.com/dyn3q57b8/image/upload/f_auto,q_auto,fl_lossy/v1/Oikyotaan%20'24%20assets/Gallery/image3"
import GalleryHeader from './GalleryHeader/GalleryHeader';
import { Swiper, SwiperSlide } from "swiper/react";
import "swiper/css";
import "swiper/css/effect-coverflow";
import "swiper/css/pagination";
import "./styles.css";
import { EffectCoverflow, Pagination, Autoplay } from "swiper/core";
let img1 =
"https://res.cloudinary.com/dyn3q57b8/image/upload/f_auto,q_auto,fl_lossy/v1/Oikyotaan%20'24%20assets/Gallery/image1";
let img2 =
"https://res.cloudinary.com/dyn3q57b8/image/upload/f_auto,q_auto,fl_lossy/v1/Oikyotaan%20'24%20assets/Gallery/image2";
let img3 =
"https://res.cloudinary.com/dyn3q57b8/image/upload/f_auto,q_auto,fl_lossy/v1/Oikyotaan%20'24%20assets/Gallery/image3";
import GalleryHeader from "./GalleryHeader/GalleryHeader";
import { Navbar } from "../../Components";



const Gallery = ()=> {
const Gallery = () => {
return (
<div className='galleryPage-container'>
<div className="galleryPage-container">
<Navbar />

<GalleryHeader />
<GalleryHeader />

<Swiper
effect={'coverflow'}
effect={"coverflow"}
loop={true}
grabCursor={true}
spaceBetween={0}
centeredSlides={true}
slidesPerView={'auto'}
slidesPerView={"auto"}
coverflowEffect={{
rotate: 50,
stretch: 0,
depth: 100,
modifier: 1,
slideShadows: false,
}}

autoplay={{
delay: 1500,
disableOnInteraction: false,
}}

pagination={true}
modules={[EffectCoverflow, Pagination, Autoplay]}
className="mySwiper"
>
<SwiperSlide><img src={img1} alt='Carousel photos'></img></SwiperSlide>
<SwiperSlide><img src={img2} alt='Carousel photos'></img></SwiperSlide>
<SwiperSlide><img src={img3} alt='Carousel photos'></img></SwiperSlide>
<SwiperSlide><img src={img1} alt='Carousel photos'></img></SwiperSlide>
<SwiperSlide><img src={img2} alt='Carousel photos'></img></SwiperSlide>

<SwiperSlide>
<img src={img1} alt="Carousel photos"></img>
</SwiperSlide>
<SwiperSlide>
<img src={img2} alt="Carousel photos"></img>
</SwiperSlide>
<SwiperSlide>
<img src={img3} alt="Carousel photos"></img>
</SwiperSlide>
<SwiperSlide>
<img src={img1} alt="Carousel photos"></img>
</SwiperSlide>
<SwiperSlide>
<img src={img2} alt="Carousel photos"></img>
</SwiperSlide>
</Swiper>
</div>
</div>
);
}

};

export default Gallery;
export default Gallery;
3 changes: 2 additions & 1 deletion src/Pages/Home/Home.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import styles from "./Home.module.scss";
import {Gallery, Sponsors, AboutUs, AboutNits} from '../../Components'
import {Gallery, Sponsors, AboutUs, AboutNits, Navbar} from '../../Components'
import Hero from "../../Components/Hero/Hero";
const Home = () => {
return (
<main className={styles.home}>
<Navbar isHome={true}/>
<Hero/>
<AboutUs />
<AboutNits />
Expand Down
2 changes: 2 additions & 0 deletions src/Pages/Team/Team.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import drumLeft from "./drum right.json";

import "swiper/css";
import "swiper/css/effect-coverflow";
import { Navbar } from "../../Components";
const Team = () => {
const [isSmallScreen, setIsSmallScreen] = useState(false);

Expand Down Expand Up @@ -72,6 +73,7 @@ const Team = () => {

return (
<div className={styles.wrapper}>
<Navbar/>
<img
alt="tmg"
className={styles.bg_img}
Expand Down

0 comments on commit b5a8702

Please sign in to comment.