webdlh-net/Views/Shared/Partials/_Navbar.cshtml

54 lines
2.2 KiB
Plaintext

@using InfiniLore.Lucide
@addTagHelper *, InfiniLore.Lucide
<nav class="bg-white shadow-sm relative z-50">
<div class="flex flex-wrap justify-between items-center mx-auto max-w-6xl px-4 py-3 lg:py-4">
<a href="@Url.Action("Index", "Home")" class="flex items-center space-x-3">
<img src="@Url.Content("~/logo-dlh.png")" class="h-10" alt="DLH Logo" />
<div>
<span class="text-lg font-bold text-gray-900 leading-tight">DINAS LINGKUNGAN HIDUP</span>
<span class="block text-sm text-orange-600 font-medium">PROVINSI DKI JAKARTA</span>
</div>
</a>
<!-- Mobile menu button -->
<button id="mobile-drawer-button" type="button"
class="inline-flex items-center p-2 ml-3 text-gray-700 rounded-lg md:hidden hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-orange-400"
aria-controls="mobile-drawer" aria-expanded="false">
<span class="sr-only">Open main menu</span>
<i class="w-5 h-5" data-lucide="menu"></i>
</button>
<!-- Desktop Menu -->
<div class="hidden md:flex md:items-center md:w-auto">
<ul class="flex flex-col md:flex-row md:space-x-6 font-medium">
<li class="relative group">
<a href="@Url.Action("Index", "Home")" class="flex items-center py-2 text-gray-900 hover:text-orange-600">
Beranda
</a>
</li>
@* Dropdown Menu Buttons *@
@{
var menus = new[] { "Program", "Profil", "Publikasi Data", "Layanan", "Seputar DLH" };
}
@for (int i = 0; i < menus.Length; i++)
{
<li class="relative group">
<button id="dropdown-button-@(i + 1)"
class="flex items-center justify-between py-2 text-gray-900 hover:text-orange-600 group">
<span>@menus[i]</span>
<i class="w-5 h-5 ml-1 transition-transform group-hover:rotate-180" data-lucide="chevron-down"></i>
</button>
</li>
}
</ul>
</div>
</div>
<partial name="~/Views/Shared/Partials/_MegaMenu.cshtml" />
</nav>