From 8bdf4dd20cb7f79b32bd716d45db77583a3bb8c5 Mon Sep 17 00:00:00 2001 From: Aryan Ramesh Jain <138214350+jainaryan04@users.noreply.github.com> Date: Sun, 6 Oct 2024 08:18:59 +0530 Subject: [PATCH] Fixes #8: Responsive landing page and navbar (#15) --- frontend/src/appComponents/Herosection.tsx | 56 ++++++++++++++++++++-- frontend/src/appComponents/Navdar.tsx | 2 +- frontend/src/assets/burger-menu.svg | 6 +++ frontend/src/assets/cross-icon.svg | 4 ++ 4 files changed, 62 insertions(+), 6 deletions(-) create mode 100644 frontend/src/assets/burger-menu.svg create mode 100644 frontend/src/assets/cross-icon.svg diff --git a/frontend/src/appComponents/Herosection.tsx b/frontend/src/appComponents/Herosection.tsx index a977499..455101f 100644 --- a/frontend/src/appComponents/Herosection.tsx +++ b/frontend/src/appComponents/Herosection.tsx @@ -1,16 +1,25 @@ +"use client"; + +import { useState } from "react"; import { Dock, DockIcon } from "@/components/magicui/dock"; +import cross from "../assets/cross-icon.svg"; +import burger from "../assets/burger-menu.svg"; -export type IconProps = React.HTMLAttributes; const Hero: React.FC = () => { + const [isMenuOpen, setIsMenuOpen] = useState(false); + const toggleMenu = () => { + setIsMenuOpen(!isMenuOpen); + }; + return (
-

+

Welcome to dypcetclubs.live

-

+

Discover the vibrant community of clubs at our college, where students - come together to explore,their passions, learn new skills, and make + come together to explore their passions, learn new skills, and make lasting connections.

@@ -22,12 +31,14 @@ const Hero: React.FC = () => {
+ +

@@ -51,6 +62,41 @@ const Hero: React.FC = () => {

+ +
+ +
+ + + {isMenuOpen && ( +
+ + +
    +
  • Home
  • +
  • Clubs
  • +
  • Events
  • +
  • Hiring
  • +
+
+ )} + + +
); }; diff --git a/frontend/src/appComponents/Navdar.tsx b/frontend/src/appComponents/Navdar.tsx index 645ec65..3e84d1e 100644 --- a/frontend/src/appComponents/Navdar.tsx +++ b/frontend/src/appComponents/Navdar.tsx @@ -20,7 +20,7 @@ const Navbar: React.FC = ({ setShowLoginPage }) => { onClick={() => { setShowLoginPage(true); }} - className="text-base rounded-md shadow-xl text-black bg-white border-white border p-2 font-semibold cursor-pointer hover:scale-105 transform transition-all duration-500 hover:bg-transparent hover:text-white" + className="mr-[15vw] lg:mr-0 text-base rounded-md shadow-xl text-black bg-white border-white border p-2 font-semibold cursor-pointer hover:scale-105 transform transition-all duration-500 hover:bg-transparent hover:text-white" > Club login diff --git a/frontend/src/assets/burger-menu.svg b/frontend/src/assets/burger-menu.svg new file mode 100644 index 0000000..cab6d1f --- /dev/null +++ b/frontend/src/assets/burger-menu.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/frontend/src/assets/cross-icon.svg b/frontend/src/assets/cross-icon.svg new file mode 100644 index 0000000..58d4983 --- /dev/null +++ b/frontend/src/assets/cross-icon.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file