Skip to content

Commit 1e0b13b

Browse files
committed
navbar added
1 parent 2284e32 commit 1e0b13b

File tree

4 files changed

+48
-37
lines changed

4 files changed

+48
-37
lines changed

app/components/navbar.jsx

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
1+
import { FaGithub, FaLinkedin, FaProductHunt } from "react-icons/fa";
2+
13
const navlinks = [
24
{ "title" : "Features", "links" : "#features" },
3-
{ "title" : "Components" },
4-
{ "title" : "Reviews" },
5-
{ "title" : "FAQs" },
5+
{ "title" : "Components", "links" : "#components" },
6+
{ "title" : "Reviews", "links" : "#reviews" },
7+
{ "title" : "FAQs", "links" : "#faqs" },
68
];
79

810
const social = [
9-
{ "title" : "Github", "links" : "/" },
10-
{ "title" : "LinkedIn", "links" : "/" },
11-
{ "title" : "ProductHunt", "links" : "/" },
12-
]
11+
{ "title" : "Github", "links" : "/", "icon": <FaGithub size={20} /> },
12+
{ "title" : "LinkedIn", "links" : "/", "icon": <FaLinkedin size={20} /> },
13+
{ "title" : "ProductHunt", "links" : "/", "icon": <FaProductHunt size={20} /> },
14+
];
1315

1416
const Navbar = () => {
1517
return (
16-
<main>
17-
<section className="flex flex-row justify-between">
18-
<div>
19-
<h1 className="text-2xl">
20-
Stream<span className="bg-black text-white px-2 py-2 rounded-lg">Ui</span>
21-
</h1>
22-
</div>
23-
<div>
24-
<ul className="flex gap-4 text-lg">
25-
{navlinks.map((item, index) => (
26-
<li key={index}>
27-
<a href={item.links}>{item.title}</a>
28-
</li>
29-
))}
30-
</ul>
31-
</div>
32-
<div className="flex gap-2">
33-
<p>Follow us on!</p>
34-
<ul className="flex gap-4">
35-
{social.map((item, index) => (
36-
<li key={index}>
37-
<a href={item.links}>{item.title}</a>
38-
</li>
39-
))}
40-
</ul>
18+
<header className="w-full max-w-6xl mx-auto mt-4 rounded-2xl border border-neutral-200 bg-white shadow-md backdrop-blur">
19+
<div className="px-10 flex items-center justify-between py-3">
20+
{/* Logo */}
21+
<div className="text-2xl font-medium text-neutral-900">
22+
Stream<span className="bg-black text-white font-semibold px-2 py-2 rounded-lg">UI</span>
23+
</div>
24+
{/* Navlinks */}
25+
<nav>
26+
<ul className="hidden md:flex gap-6 text-sm md:text-base text-neutral-500">
27+
{navlinks.map((item, index) => (
28+
<li key={index}>
29+
<a href={item.links}>{item.title}</a>
30+
</li>
31+
))}
32+
</ul>
33+
</nav>
34+
{/* Social links with icons */}
35+
<div className="hidden md:flex items-center gap-4 border border-neutral-300 dark:border-neutral-700 rounded-full px-3 py-2 bg-neutral-800">
36+
{social.map((item, index) => (
37+
<a key={index} href={item.links} className="text-neutral-700 dark:text-neutral-300 hover:text-blue-400 hover:duration-300 hover:scale-110 transition">
38+
{item.icon}
39+
</a>
40+
))}
41+
</div>
4142
</div>
42-
</section>
43-
</main>
43+
</header>
4444
);
4545
};
4646

app/layout.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const metadata = {
88
export default function RootLayout({ children }) {
99
return (
1010
<html lang="en">
11-
<body className="font-poppins">
11+
<body className="font-poppins bg-gray-100">
1212
{children}
1313
</body>
1414
</html>

package-lock.json

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"dependencies": {
1212
"next": "15.3.5",
1313
"react": "^19.0.0",
14-
"react-dom": "^19.0.0"
14+
"react-dom": "^19.0.0",
15+
"react-icons": "^5.5.0"
1516
},
1617
"devDependencies": {
1718
"@eslint/eslintrc": "^3",

0 commit comments

Comments
 (0)