Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added carousel to the hero section #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 24 additions & 74 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@
},
"dependencies": {
"init": "^0.1.2",
"lucide-react": "^0.479.0",
"next": "15.2.0",
"npx": "^10.2.2",
"react": "^19.0.0",
"react-dom": "^19.0.0"
"react-dom": "^19.0.0",
"tailwindcss-animate": "^1.0.7"
},
"devDependencies": {
"@eslint/eslintrc": "^3",
Expand Down
37 changes: 27 additions & 10 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@

"use client";

import React, { useState } from "react";
import Image from "next/image";
import Link from "next/link";
import { Button } from "../components/ui/Button";
import web3logo from "@/public/assets/web3logo.svg";
import SearchForm from "@/components/Search-form";

export const Header: React.FC = () => {
const [isMenuOpen, setIsMenuOpen] = useState(false);
const [showSearch, setShowSearch] = useState(false);

const toggleSearch = () => {
setShowSearch(!showSearch);
};

return (
<header className="bg-white shadow-sm">
Expand Down Expand Up @@ -43,12 +51,12 @@ export const Header: React.FC = () => {
>
Host a hackaton
</Link>
<Link
href="/about"
className="px-3 py-2 text-sm font-medium text-[#4D4D4D] hover:text-gray-900"
<button
onClick={toggleSearch}
className="px-3 py-2 text-sm font-medium text-[#4D4D4D] hover:text-gray-900 cursor-pointer"
>
Search
</Link>
</button>
</nav>
</div>
<div className="hidden md:flex items-center space-x-4">
Expand Down Expand Up @@ -106,6 +114,13 @@ export const Header: React.FC = () => {
</div>
</div>

{/* Search container that shows when search is toggled */}
{showSearch && (
<div>
<SearchForm />
</div>
)}

{/* Mobile menu, show/hide based on menu state */}
{isMenuOpen && (
<div className="md:hidden">
Expand All @@ -128,20 +143,22 @@ export const Header: React.FC = () => {
>
Host a hackaton
</Link>
<Link
href="/about"
className="block px-3 py-2 text-base font-medium text-[#4D4D4D] hover:text-gray-900"
<button
onClick={toggleSearch}
className="block w-full text-left px-3 py-2 text-base font-medium text-[#4D4D4D] hover:text-gray-900"
>
Search
</Link>
</button>
</div>


<div className="pt-4 pb-3 border-t border-gray-200">
<div className="px-4 space-y-3">
<Button variant="outline" className="w-full border-[#009AFF]">
<Button variant="outline" className="w-full border-[#009AFF]">
<Link href="/login">Log in</Link>
</Button>
<Button variant="primary" className="w-full">
Sign up
<Link href="/signup">Sign up</Link>
</Button>
</div>
</div>
Expand Down
Loading