Skip to content
This repository was archived by the owner on Jun 8, 2025. It is now read-only.

Commit e81aaad

Browse files
updated
1 parent 6218c8b commit e81aaad

26 files changed

+3993
-672
lines changed

components/Header.jsx

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,26 @@
11
import Image from "next/image";
22
import Link from "next/link";
3-
import React from "react";
3+
import React, { useState, useRef } from "react";
44

55
const Header = () => {
6+
const [isDropdownOpen, setIsDropdownOpen] = useState(false);
7+
const timeoutRef = useRef(null);
8+
9+
const handleMouseEnter = () => {
10+
clearTimeout(timeoutRef.current);
11+
setIsDropdownOpen(true);
12+
};
13+
14+
const handleMouseLeave = () => {
15+
timeoutRef.current = setTimeout(() => {
16+
setIsDropdownOpen(false);
17+
}, 200);
18+
};
19+
620
return (
721
<div className="h-[72px] w-full flex items-center justify-between bg-[#D9D9D9]">
822
<div className="flex justify-between w-full px-10">
9-
<div className="w-[201px] ml-5">
23+
<div className="w-[201px] ml-5">
1024
<Image
1125
src="/assets/Home/Logo_Home.png"
1226
alt=""
@@ -18,9 +32,37 @@ const Header = () => {
1832
<Link href="/" className="text-[#000000] w-auto">
1933
Home
2034
</Link>
21-
<Link href="/blog" className="text-[#000000] w-auto">
22-
Explore
23-
</Link>
35+
<div
36+
className="relative w-auto"
37+
onMouseEnter={handleMouseEnter}
38+
onMouseLeave={handleMouseLeave}
39+
>
40+
<div className="text-[#000000] cursor-pointer w-auto">
41+
Explore
42+
</div>
43+
{isDropdownOpen && (
44+
<div className="absolute top-full mt-2 w-40 bg-white shadow-lg rounded-md">
45+
<Link
46+
href="/intro"
47+
className="block px-4 py-2 rounded-t-md text-[#000000] hover:bg-gray-200"
48+
>
49+
Intro
50+
</Link>
51+
<Link
52+
href="/git-and-github/how-to-install-git-git-tutorial"
53+
className="block px-4 py-2 text-[#000000] hover:bg-gray-200"
54+
>
55+
Git and GitHub
56+
</Link>
57+
<Link
58+
href="/blog/5-best-apps-vloggers-should-have-on-a-phone"
59+
className="block px-4 py-2 rounded-b-md text-[#000000] hover:bg-gray-200"
60+
>
61+
All Blogs
62+
</Link>
63+
</div>
64+
)}
65+
</div>
2466
<Link href="/" className="text-[#000000] w-auto">
2567
About
2668
</Link>

components/MainPage.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ const MainPage = () => {
223223
</div>
224224

225225
<p className="text-2xl text-white font-normal">
226-
What you were looking for wasn't found? Our writing team will
226+
What you were looking for wasn&apos;t found? Our writing team will
227227
ensure that we start covering the topic extensively
228228
</p>
229229
<p className="text-xl text-white font-light">Suggest topics</p>

0 commit comments

Comments
 (0)