Skip to content

Commit

Permalink
Merge pull request #224 from NilanchalaPanda/bug-NavbarResponsive
Browse files Browse the repository at this point in the history
bug: Navbar bug fixed #221 #208 solved
  • Loading branch information
RamakrushnaBiswal authored Oct 13, 2024
2 parents 7905255 + 6571b5e commit 1420d6f
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 117 deletions.
85 changes: 16 additions & 69 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,42 +140,12 @@ Special thanks to our amazing mentors who are guiding this project! 🙌
<sub><b>Arindam</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/Ashwinib26">
<img src="https://avatars.githubusercontent.com/u/149402720?v=4" width="100;" alt="Ashwinib26"/>
<br />
<sub><b>Ashwini_ab</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/itznayan">
<img src="https://avatars.githubusercontent.com/u/136584376?v=4" width="100;" alt="itznayan"/>
<br />
<sub><b>Mahera Nayan</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/tejasbenibagde">
<img src="https://avatars.githubusercontent.com/u/124677750?v=4" width="100;" alt="tejasbenibagde"/>
<br />
<sub><b>Tejas Benibagde</b></sub>
</a>
</td>
</tr>
<tr>
<td align="center">
<a href="https://github.com/Shirisha-16">
<img src="https://avatars.githubusercontent.com/u/148051550?v=4" width="100;" alt="Shirisha-16"/>
<br />
<sub><b>Tyarla Shirisha</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/haseebzaki-07">
<img src="https://avatars.githubusercontent.com/u/147314463?v=4" width="100;" alt="haseebzaki-07"/>
<br />
<sub><b>Haseeb Zaki</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/Suhas-Koheda">
Expand All @@ -184,36 +154,36 @@ Special thanks to our amazing mentors who are guiding this project! 🙌
<sub><b>Suhas Koheda</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/vishnuprasad2004">
<img src="https://avatars.githubusercontent.com/u/116942066?v=4" width="100;" alt="vishnuprasad2004"/>
<br />
<sub><b>Vishnu Prasad Korada</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/sajalbatra">
<img src="https://avatars.githubusercontent.com/u/125984550?v=4" width="100;" alt="sajalbatra"/>
<br />
<sub><b>Sajal Batra</b></sub>
</a>
</td>
</tr>
<tr>
<td align="center">
<a href="https://github.com/Amnyadav">
<img src="https://avatars.githubusercontent.com/u/127370497?v=4" width="100;" alt="Amnyadav"/>
<a href="https://github.com/vishnuprasad2004">
<img src="https://avatars.githubusercontent.com/u/116942066?v=4" width="100;" alt="vishnuprasad2004"/>
<br />
<sub><b>Aman Yadav</b></sub>
<sub><b>Vishnu Prasad Korada</b></sub>
</a>
</td>
</tr>
<tr>
<td align="center">
<a href="https://github.com/AbhijitMotekar99">
<img src="https://avatars.githubusercontent.com/u/109235675?v=4" width="100;" alt="AbhijitMotekar99"/>
<br />
<sub><b>Abhijit Motekar</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/itznayan">
<img src="https://avatars.githubusercontent.com/u/136584376?v=4" width="100;" alt="itznayan"/>
<br />
<sub><b>Mahera Nayan</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/Navneetdadhich">
<img src="https://avatars.githubusercontent.com/u/156535853?v=4" width="100;" alt="Navneetdadhich"/>
Expand All @@ -235,22 +205,15 @@ Special thanks to our amazing mentors who are guiding this project! 🙌
<sub><b>Shiva Bajpai</b></sub>
</a>
</td>
</tr>
<tr>
<td align="center">
<a href="https://github.com/Sawan-Kushwah">
<img src="https://avatars.githubusercontent.com/u/138680328?v=4" width="100;" alt="Sawan-Kushwah"/>
<br />
<sub><b>Sawan kushwah </b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/devxMani">
<img src="https://avatars.githubusercontent.com/u/122438942?v=4" width="100;" alt="devxMani"/>
<br />
<sub><b>MANI </b></sub>
</a>
</td>
</tr>
<tr>
<td align="center">
<a href="https://github.com/Ayush215mb">
<img src="https://avatars.githubusercontent.com/u/154300084?v=4" width="100;" alt="Ayush215mb"/>
Expand Down Expand Up @@ -286,43 +249,29 @@ Special thanks to our amazing mentors who are guiding this project! 🙌
<sub><b>Jay shah</b></sub>
</a>
</td>
</tr>
<tr>
<td align="center">
<a href="https://github.com/Mohitranag18">
<img src="https://avatars.githubusercontent.com/u/152625405?v=4" width="100;" alt="Mohitranag18"/>
<br />
<sub><b>Mohit Rana </b></sub>
</a>
</td>
</tr>
<tr>
<td align="center">
<a href="https://github.com/MutiatBash">
<img src="https://avatars.githubusercontent.com/u/108807732?v=4" width="100;" alt="MutiatBash"/>
<br />
<sub><b>Bashua Mutiat</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/NilanchalaPanda">
<img src="https://avatars.githubusercontent.com/u/110488337?v=4" width="100;" alt="NilanchalaPanda"/>
<br />
<sub><b>Nilanchal</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/Sapna127">
<img src="https://avatars.githubusercontent.com/u/91309280?v=4" width="100;" alt="Sapna127"/>
<br />
<sub><b>Sapna Kul</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/Sourabh782">
<img src="https://avatars.githubusercontent.com/u/103349890?v=4" width="100;" alt="Sourabh782"/>
<br />
<sub><b>Sourabh Singh Rawat</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/stutxi">
<img src="https://avatars.githubusercontent.com/u/95741837?v=4" width="100;" alt="stutxi"/>
Expand All @@ -337,8 +286,6 @@ Special thanks to our amazing mentors who are guiding this project! 🙌
<sub><b>Syed Faraz</b></sub>
</a>
</td>
</tr>
<tr>
<td align="center">
<a href="https://github.com/Vaibhav-Kumar-K-R">
<img src="https://avatars.githubusercontent.com/u/132189791?v=4" width="100;" alt="Vaibhav-Kumar-K-R"/>
Expand Down
13 changes: 6 additions & 7 deletions frontend/src/components/Shared/Navbar.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { useState, useEffect } from 'react';
import Logo from '../../assets/Logo/playcafe.png';
import { Link, useLocation, useNavigate } from 'react-router-dom';
import Cookies from 'js-cookie'
import Cookies from 'js-cookie';

const Navbar = () => {
const [isloggedIn, setisloggedIn] = useState(false);
const [isModalOpen, setIsModalOpen] = useState(false);
const [isScrolled, setIsScrolled] = useState(false);
const [isMenuOpen, setIsMenuOpen] = useState(false);
const [token,setToken] = useState(Cookies.get('authToken'));
const [token, setToken] = useState(Cookies.get('authToken'));
const location = useLocation();
const navigate = useNavigate(); // Correctly initialize useNavigate

Expand All @@ -33,7 +33,6 @@ const Navbar = () => {
return () => {
window.removeEventListener('scroll', handleScroll);
};

}, []);

const toggleMenu = () => {
Expand All @@ -42,12 +41,12 @@ const Navbar = () => {

const handleLogout = () => {
// setisloggedIn(false); // Set isLoggedIn to false on confirmation
//managing log in , logout using jwt tokens
Cookies.remove("authToken");
//managing log in , logout using jwt tokens
Cookies.remove('authToken');
setToken(null);
setIsModalOpen(false); // Close the modal
setIsMenuOpen(false) // after getting logged out close the menu if it is open
navigate("/login");//navigate to login after get logged out
setIsMenuOpen(false); // after getting logged out close the menu if it is open
navigate('/login'); //navigate to login after get logged out
};

const isHomePage = location.pathname === '/';
Expand Down
70 changes: 34 additions & 36 deletions frontend/src/components/Shared/footer/Content.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React, { useEffect, useState } from 'react';
import { useEffect, useState } from 'react';
import Logo from '../../../assets/Logo/playcafe.png';
import googleImage from "../../../assets/img/google.png"
import { FaFacebook, FaInstagram, FaTiktok, FaGithub } from 'react-icons/fa';
import GoogleTranslate from "../GoogleTranslate";

export default function Content() {
return (
<div className="bg-black pt-24 py-8 px-12 h-full w-full flex flex-col justify-between">
<div className="bg-black pt-16 py-8 px-12 h-full w-full flex flex-col justify-between md:pt-24`">
<Nav />
<Section2 />
</div>
Expand Down Expand Up @@ -43,16 +43,12 @@ const Section2 = () => {
} text-white`}
>
<h1
className={`${
isWide ? 'text-[9vw]' : 'text-[12vw] mt-10'
} leading-[0.8]`}
className={`${isWide ? 'text-[9vw]' : 'text-[12vw]'} leading-[0.8]`}
>
BoardGame {!isWide && <br />}
</h1>
<h1
className={`${
isWide ? 'text-[9vw]' : 'text-[12vw] mt-4'
} leading-[0.8]`}
className={`${isWide ? 'text-[9vw]' : 'text-[12vw]'} leading-[0.8]`}
>
Cafe
</h1>
Expand Down Expand Up @@ -110,35 +106,37 @@ const Nav = () => {
const emailAddress = '[email protected]';

return (
<div className="flex shrink-0 gap-4 sm:gap-20">
<div className="flex flex-col gap-2 text-gray-400">
<h3 className="mb-2 uppercase text-white">About</h3>
{navLinks.map((item, index) => (
<a
className="hover:text-white duration-300"
key={index}
href={item.link}
>
{item.name}
</a>
))}
</div>
<div className="flex flex-col gap-2 text-gray-400">
<h3 className="mb-2 uppercase text-white">Socials</h3>
{socialLink.map((item, index) => (
<a
target="_blank"
className="hover:text-white duration-300 flex items-center gap-2"
key={index}
href={item.link}
aria-label={`${item.name} - opens in a new tab`}
>
{item.icon}
{item.name}
</a>
))}
<div className="flex md:flex-row flex-col shrink-0 gap-4 sm:gap-20">
<div className="flex justify-between md:gap-20">
<div className="flex flex-col gap-2 text-gray-400">
<h3 className="mb-2 uppercase text-white">About</h3>
{navLinks.map((item, index) => (
<a
className="hover:text-white duration-300"
key={index}
href={item.link}
>
{item.name}
</a>
))}
</div>
<div className="flex flex-col gap-2 text-gray-400">
<h3 className="mb-2 uppercase text-white">Socials</h3>
{socialLink.map((item, index) => (
<a
target="_blank"
className="hover:text-white duration-300 flex items-center gap-2"
key={index}
href={item.link}
aria-label={`${item.name} - opens in a new tab`}
>
{item.icon}
{item.name}
</a>
))}
</div>
</div>
<div className="flex flex-col gap-2 text-gray-400">
<div className="flex flex-col text-gray-400">
<h3 className="mb-2 uppercase text-white">Contact Us</h3>
<a
href={`mailto:${emailAddress}`}
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/components/Shared/footer/Footer.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import Content from './Content';

const Footer = () => {
Expand All @@ -8,7 +7,7 @@ const Footer = () => {
style={{ clipPath: 'polygon(0% 0, 100% 0%, 100% 100%, 0 100%)' }}
>
<div className="relative h-[calc(100vh+800px)] -top-[100vh]">
<div className="h-[600px] sticky top-[calc(100vh-600px)]">
<div className="h-[700px] md:h-[600px] sticky top-[calc(100vh-600px)]">
<Content />
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/ui/Landing.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ function Landing() {

return (
<div>
<section className="relative pb-24 h-screen-dvh w-screen bg-cover bg-center overflow-hidden">
<section className="relative pb-24 h-screen-dvh bg-cover bg-center overflow-hidden">
<div className="flex-col md:flex pt-20 z-1">
{/* Text Content */}
<div className="w-screen p-4 md:w-1/2 mb-6 md:mb-0 text-center md:text-left z-10 pt-14">
<div className="p-4 md:w-1/2 mb-6 md:mb-0 text-center md:text-left z-10 pt-14">
<h1 className="text-6xl md:text-9xl font-bold ml-4" ref={textRef}>
A unique café experience awaits you
</h1>
Expand Down
7 changes: 6 additions & 1 deletion frontend/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
}
}

/* ------- THIS IS WILL REMOVE THE EMPTY SPACE THAT IS BEING CREATED ON THE EXTREME RIGHT SIDE OF THE WEBSITE ------- */
/* *::-webkit-scrollbar {
display: none;
} */
/* ------------------------------------------------------------------------------------------------------------------ */

::-webkit-scrollbar {
width: 7px;
height: 7px;
Expand All @@ -36,4 +42,3 @@
background-color: #004d43;
border-radius: 10px;
}

0 comments on commit 1420d6f

Please sign in to comment.