casino/frontend/src/app/shared/components/navbar/navbar.component.html

70 lines
2.1 KiB
HTML

<nav class="bg-deep-blue border-b border-deep-blue-contrast">
<div class="max-w-full mx-auto px-4">
<div class="flex justify-between items-center h-14">
<div class="flex items-center space-x-6">
<a routerLink="/" class="nav-brand">
<span>Trustworthy Casino</span>
</a>
<div class="hidden md:flex items-center space-x-1">
<a routerLink="/games" class="nav-link">Games</a>
</div>
</div>
<div class="hidden md:flex items-center space-x-4">
@if (!isLoggedIn) {
<button (click)="login()" class="button-base px-4 py-1.5">Login</button>
}
@if (isLoggedIn) {
<button (click)="logout()" class="button-base px-4 py-1.5">Logout</button>
}
</div>
<div class="md:hidden">
<button (click)="toggleMenu()" class="nav-toggle">
<svg
class="h-6 w-6"
[class.hidden]="isMenuOpen"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M4 6h16M4 12h16M4 18h16"
/>
</svg>
<svg
class="h-6 w-6"
[class.hidden]="!isMenuOpen"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M6 18L18 6M6 6l12 12"
/>
</svg>
</button>
</div>
</div>
<div [class]="isMenuOpen ? 'block' : 'hidden'" class="md:hidden">
<div class="nav-mobile-menu">
<a routerLink="/games" class="nav-mobile-link">Games</a>
<div class="pt-2 space-y-2">
@if (!isLoggedIn) {
<button (click)="login()" class="button-base w-full py-1.5">Login</button>
}
@if (isLoggedIn) {
<button (click)="logout()" class="button-base w-full py-1.5">Logout</button>
}
</div>
</div>
</div>
</div>
</nav>