Skip to content

Commit 56f39ce

Browse files
feat(components): add Navbar Component
1 parent 75efd0a commit 56f39ce

File tree

1 file changed

+51
-15
lines changed

1 file changed

+51
-15
lines changed

src/components/common/Navbar.astro

Lines changed: 51 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,51 @@
1-
<header>
2-
<nav>
3-
<ul>
4-
<li>
5-
<a class="bg-amber-100" href="#">Home</a>
6-
<a href="#">Home</a>
7-
<a href="#">Home</a>
8-
<a href="#">Home</a>
9-
<a href="#">Home</a>
10-
<a href="#">Home</a>
11-
<a href="#">Home</a>
12-
</li>
13-
</ul>
14-
</nav>
15-
</header>
1+
---
2+
import { FaBars, FaGithub, FaHome, FaMoon } from "react-icons/fa"
3+
---
4+
5+
<nav class="relative bg-black after:pointer-events-none after:absolute after:inset-x-0 after:bottom-0 after:h-px after:bg-white/10">
6+
<div class="mx-auto max-w-7xl px-2 sm:px-6 lg:px-8">
7+
<div class="relative flex h-16 items-center justify-between">
8+
<div class="absolute inset-y-0 left-0 flex items-center sm:hidden">
9+
<button type="button" class="relative inline-flex items-center justify-center rounded-md p-2 text-gray-400 hover:bg-white/5 hover:text-white focus:outline-2 focus:-outline-offset-1 focus:outline-indigo-500">
10+
<span class="absolute -inset-0.5"></span>
11+
<span class="sr-only">Open main menu</span>
12+
<FaBars />
13+
</button>
14+
</div>
15+
<div class="flex flex-1 items-center justify-center sm:items-stretch sm:justify-start">
16+
<div class="flex shrink-0 items-center">
17+
<img src="/favicon.svg" alt="Your Company" class="h-8 w-auto" />
18+
</div>
19+
<div class="hidden sm:ml-6 sm:block">
20+
<div class="flex space-x-4">
21+
<a href="#" aria-current="page" class="rounded-md bg-gray-950/50 px-3 py-2 text-sm font-medium text-white">Dashboard</a>
22+
<a href="#" class="rounded-md px-3 py-2 text-sm font-medium text-gray-300 hover:bg-white/5 hover:text-white">Team</a>
23+
<a href="#" class="rounded-md px-3 py-2 text-sm font-medium text-gray-300 hover:bg-white/5 hover:text-white">Projects</a>
24+
<a href="#" class="rounded-md px-3 py-2 text-sm font-medium text-gray-300 hover:bg-white/5 hover:text-white">Calendar</a>
25+
</div>
26+
</div>
27+
</div>
28+
<div class="absolute inset-y-0 right-0 flex gap-2 items-center pr-2 sm:static sm:inset-auto sm:ml-6 sm:pr-0">
29+
<button type="button" class="relative rounded-full p-1 text-gray-400 hover:text-white focus:outline-2 focus:outline-offset-2 focus:outline-indigo-500 text-2xl">
30+
<span class="absolute -inset-1.5"></span>
31+
<span class="sr-only">Github</span>
32+
<FaGithub />
33+
</button>
34+
<button type="button" class="relative rounded-full p-1 text-gray-400 hover:text-white focus:outline-2 focus:outline-offset-2 focus:outline-indigo-500 text-2xl">
35+
<span class="absolute -inset-1.5"></span>
36+
<span class="sr-only">Github</span>
37+
<FaMoon />
38+
</button>
39+
</div>
40+
</div>
41+
</div>
42+
43+
<el-disclosure id="mobile-menu" hidden class="block sm:hidden">
44+
<div class="space-y-1 px-2 pt-2 pb-3">
45+
<a href="#" aria-current="page" class="block rounded-md bg-gray-950/50 px-3 py-2 text-base font-medium text-white">Docs</a>
46+
<a href="#" class="block rounded-md px-3 py-2 text-base font-medium text-gray-300 hover:bg-white/5 hover:text-white">Themes</a>
47+
<a href="#" class="block rounded-md px-3 py-2 text-base font-medium text-gray-300 hover:bg-white/5 hover:text-white">Features</a>
48+
<a href="#" class="block rounded-md px-3 py-2 text-base font-medium text-gray-300 hover:bg-white/5 hover:text-white">Updates</a>
49+
</div>
50+
</el-disclosure>
51+
</nav>

0 commit comments

Comments
 (0)