ldc-theme-default/views/layouts/header.blade.php
2025-08-05 15:58:48 +02:00

75 lines
4.6 KiB
PHP

<nav class="navbar navbar-expand-lg shadow">
<div class="container-fluid">
<div class="d-flex flex-column-reverse flex-lg-column flex-grow-1">
<div class="navbar-collapse collapse" id="navbar-main-menu">
<ul class="navbar-nav mb-lg-0 mb-2 ms-auto">
<li class="nav-item">
<a class="fs-4 fw-bold nav-link @if (request()->routeIs('fo.homepage')) active @endif"
href="{{ route('fo.homepage') }}/#howto"
@if (request()->routeIs('fo.homepage')) aria-current="page" @endif>{{ __('Comment jouer ?') }}</a>
</li>
<li class="nav-item">
<a class="fs-4 fw-bold nav-link" href="{{ route('fo.homepage') }}/#gifts">{{ __('Les cadeaux') }}</a>
</li>
@can('fo.gameEnabled')
<li class="nav-item">
<a class="fs-4 fw-bold nav-link link-tertiary @if (request()->routeIs('fo.participate')) active @endif"
href="{{ route('fo.participate') }}"
@if (request()->routeIs('fo.participate')) aria-current="page" @endif>{{ __('Jouer !') }}</a>
</li>
@endcan
@can('fo.showProducts')
<li class="nav-item">
<a class="fs-4 fw-bold nav-link @if (request()->routeIs('fo.produits-porteurs')) active @endif"
href="{{ route('fo.produits-porteurs') }}"
@if (request()->routeIs('fo.produits-porteurs')) aria-current="page" @endif>{{ __('Produits porteurs') }}</a>
</li>
@endcan
<li class="nav-item">
<form class="" action="{{ route('fo.logout') }}" method="POST">
@guest('frontend')
<a class="btn-connect btn btn-tertiary fw-bold fs-4 text-uppercase"
href="{{ route('fo.login') }}">{{ __('Je me connecte') }}</a>
@else
@csrf
<button class="btn btn-tertiary fw-bold fs-4 text-uppercase" type="submit">{{ __('Se déconnecter') }}</button>
@endguest
@can('viewWonList', \App\Models\Participation::class)
<a class="btn btn-quad fw-bold fs-4" data-bs-toggle="tooltip"
href="{{ route('fo.view-winning-participations') }}" title="{{ __('Voir mes gains') }}">
<i class="fa-solid fa-gift"></i>
</a>
@endcan
</form>
</li>
</ul>
</div>
<div class="container-fluid p-0">
<div class="row">
@include('theme::layouts.header-logo')
@if (collect($prizesGlobal)->count())
<div class="rest-in-game-banner-container col-12 col-lg-6 d-flex align-items-end g-0 overflow-x-hidden">
<div
class="rest-in-game-banner flex-column flex-md-row text-bg-quad d-flex flex-grow-1 justify-content-around mt-3 py-1 pe-5 ps-2">
<span
class="d-flex align-items-center fw-bold text-uppercase fs-5 mx-2">{{ __("Encore en jeu\u{00A0}:") }}</span>
@foreach ($prizesGlobal as $prizeModel)
<span class="d-flex justify-content-center">
<span
class="rounded-pill text-tertiary fw-bold fs-4 d-flex align-items-center my-1 bg-white px-3 py-1">
{{ $prizeModel->quantity - \App\Models\InstantWin::query()->whereHas('prize', fn($q) => $q->where('id', $prizeModel->id))->whereHas('participation')->count() }}
</span>
<span
class="fw-bold text-uppercase fs-5 lh-sm d-flex align-items-center mx-2">{{ $prizeModel->label }}</span>
</span>
@endforeach
</div>
</div>
@endif
</div>
</div>
</div>
</div>
</nav>