106 lines
6.6 KiB
PHP
106 lines
6.6 KiB
PHP
<header id="navbar"
|
|
class="fixed top-0 left-0 w-full p-4 lg:px-10 flex justify-between items-center z-50 transition-all duration-200 bg-transparent">
|
|
|
|
<div class="flex lg:hidden items-center z-50">
|
|
<button id="mobile-menu-btn" aria-label="Toggle Mobile Menu" aria-expanded="false" aria-controls="mobile-menu"
|
|
class="rounded-full w-10 h-10 flex items-center justify-center hover:bg-white/10 transition-colors relative group">
|
|
|
|
<svg id="hamburger-icon" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
|
|
stroke-width="1.5" stroke="currentColor"
|
|
class="size-6 text-home-foreground transition-colors duration-300">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" />
|
|
</svg>
|
|
|
|
<svg id="close-icon" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
|
|
stroke-width="1.5" stroke="currentColor"
|
|
class="size-6 text-white hidden transition-transform duration-300">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
|
|
<a href="{{ route('homepage') }}" wire:navigate class="flex items-center ml-8 lg:ml-0 z-50">
|
|
<img src="{{ asset('assets/images/logo.png') }}" alt="Logo"
|
|
class="w-10 h-8 lg:w-16 lg:h-12 transition-all duration-200">
|
|
</a>
|
|
|
|
<nav id="nav-links"
|
|
class="hidden lg:flex items-center gap-6 font-medium px-8 py-3 rounded-full transition-all duration-200 border text-home-foreground"
|
|
aria-label="Main Navigation">
|
|
@foreach ($header as $item)
|
|
<a href="{{ route($item['route']) }}"
|
|
class="{{ request()->routeIs($item['route']) ? 'font-bold text-home-primary' : 'hover:opacity-80' }} transition-opacity"
|
|
wire:navigate>
|
|
{{ $item['title'] }}
|
|
</a>
|
|
@endforeach
|
|
</nav>
|
|
|
|
<section class="flex items-center lg:gap-2 gap-1 z-50">
|
|
{{-- not used yet --}}
|
|
{{-- <button id="cart"
|
|
class="flex items-center rounded-full transition-all duration-200 border border-home-foreground lg:p-0 hover:scale-110">
|
|
<div id="cart-icon"
|
|
class="w-8 h-8 lg:w-10 lg:h-10 flex justify-center items-center rounded-full transition-all duration-200 text-white bg-home-foreground">
|
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2"
|
|
stroke="currentColor" class="size-4 lg:size-6 transition-all duration-200" id="cart-svg">
|
|
<path stroke-linecap="round" stroke-linejoin="round"
|
|
d="M15.75 10.5V6a3.75 3.75 0 1 0-7.5 0v4.5m11.356-1.993 1.263 12c.07.665-.45 1.243-1.119 1.243H4.25a1.125 1.125 0 0 1-1.12-1.243l1.264-12A1.125 1.125 0 0 1 5.513 7.5h12.974c.576 0 1.059.435 1.119 1.007ZM8.625 10.5a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm7.5 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z" />
|
|
</svg>
|
|
</div>
|
|
<span class="ms-2 me-3 transition-all duration-200 hidden lg:block text-home-foreground">Keranjang</span>
|
|
</button> --}}
|
|
|
|
@guest
|
|
<a href="{{ route('login') }}" id="login" wire:navigate
|
|
class="hidden lg:flex items-center border px-4 py-2 rounded-full transition-all duration-200 hover:scale-105 font-medium border-home-foreground text-home-foreground">
|
|
Masuk
|
|
</a>
|
|
|
|
<button id="profile-mobile" wire:navigate
|
|
class="flex lg:hidden items-center rounded-full transition-all duration-200 lg:p-0 lg:border-0 hover:scale-110">
|
|
<div id="profile-icon-mobile"
|
|
class="w-8 h-8 lg:w-10 lg:h-10 flex justify-center items-center rounded-full transition-all duration-200 text-white bg-home-foreground">
|
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2"
|
|
stroke="currentColor" class="size-4 lg:size-6 transition-all duration-200">
|
|
<path stroke-linecap="round" stroke-linejoin="round"
|
|
d="M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
|
|
</svg>
|
|
</div>
|
|
</button>
|
|
@endguest
|
|
|
|
@auth
|
|
<a href="{{ route('profile.redirect') }}" id="profile"
|
|
class="flex items-center rounded-full transition-all duration-200 lg:p-0 lg:border-0 hover:scale-110">
|
|
<div id="profile-icon"
|
|
class="w-8 h-8 lg:w-10 lg:h-10 flex justify-center items-center rounded-full transition-all duration-200 text-white bg-home-foreground">
|
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2"
|
|
stroke="currentColor" class="size-4 lg:size-6 transition-all duration-200" id="profile-svg">
|
|
<path stroke-linecap="round" stroke-linejoin="round"
|
|
d="M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
|
|
</svg>
|
|
</div>
|
|
</a>
|
|
@endauth
|
|
</section>
|
|
|
|
<nav id="mobile-menu"
|
|
class="fixed inset-0 h-screen w-screen bg-home-foreground/80 backdrop-blur-md z-40 flex flex-col items-center justify-center gap-8 hidden transition-all duration-200 opacity-0"
|
|
aria-label="Mobile Navigation">
|
|
|
|
<a href="{{ route('homepage') }}" wire:navigate
|
|
class="text-3xl font-bold text-white hover:text-gray-300 transition-colors">Beranda</a>
|
|
<a href="{{ route('outlet') }}" wire:navigate
|
|
class="text-3xl font-bold text-white hover:text-gray-300 transition-colors">Outlet</a>
|
|
<a href="{{ route('product.index') }}" wire:navigate
|
|
class="text-3xl font-bold text-white hover:text-gray-300 transition-colors">Produk</a>
|
|
<a href="{{ route('voucher') }}"
|
|
class="text-3xl font-bold text-white hover:text-gray-300 transition-colors cursor-pointer">Voucher</a>
|
|
<a href="{{ route('article.index') }}"
|
|
class="text-3xl font-bold text-white hover:text-gray-300 transition-colors">Artikel</a>
|
|
<a href="{{ route('faq') }}"
|
|
class="text-3xl font-bold text-white hover:text-gray-300 transition-colors">FAQ</a>
|
|
</nav>
|
|
</header>
|