lots of improvements
This commit is contained in:
@@ -38,61 +38,74 @@
|
||||
<i class="fas fa-filter me-1"></i> Filter
|
||||
</button>
|
||||
<ul class="dropdown-menu p-3" style="min-width: 300px;">
|
||||
<li class="mb-2">
|
||||
<label class="form-label text-white mb-1"><i class="fas fa-tv me-1"></i> Platform</label>
|
||||
<select name="platform" class="form-select bg-dark text-white border-0" onchange="this.form.submit()">
|
||||
<option value="">All Platforms</option>
|
||||
@foreach($platforms as $platform)
|
||||
<option value="{{ $platform->slug }}" {{ request('platform') == $platform->slug ? 'selected' : '' }}>
|
||||
{{ $platform->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</li>
|
||||
<li class="mb-2">
|
||||
<label class="form-label text-white mb-1"><i class="fas fa-tags me-1"></i> Genre</label>
|
||||
<select name="genre" class="form-select bg-dark text-white border-0" onchange="this.form.submit()">
|
||||
<option value="">All Genres</option>
|
||||
@foreach($genres as $genre)
|
||||
<option value="{{ $genre->slug }}" {{ request('genre') == $genre->slug ? 'selected' : '' }}>
|
||||
{{ $genre->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</li>
|
||||
<li class="mb-2">
|
||||
<label class="form-label text-white mb-1"><i class="fas fa-calendar-alt me-1"></i> Release Year</label>
|
||||
<select name="year" class="form-select bg-dark text-white border-0" onchange="this.form.submit()">
|
||||
<option value="">All Years</option>
|
||||
@foreach($years as $year)
|
||||
<option value="{{ $year }}" {{ request('year') == $year ? 'selected' : '' }}>
|
||||
{{ $year }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</li>
|
||||
<li class="mb-2">
|
||||
<label class="form-label text-white mb-1"><i class="fas fa-star me-1"></i> Rating Range</label>
|
||||
<select name="rating_range" class="form-select bg-dark text-white border-0" onchange="this.form.submit()">
|
||||
<option value="">All Ratings</option>
|
||||
<option value="90-100" {{ request('rating_range') == '90-100' ? 'selected' : '' }}>90+</option>
|
||||
<option value="80-89" {{ request('rating_range') == '80-89' ? 'selected' : '' }}>80-89</option>
|
||||
<option value="70-79" {{ request('rating_range') == '70-79' ? 'selected' : '' }}>70-79</option>
|
||||
<option value="60-69" {{ request('rating_range') == '60-69' ? 'selected' : '' }}>60-69</option>
|
||||
<option value="0-59" {{ request('rating_range') == '0-59' ? 'selected' : '' }}>Below 60</option>
|
||||
</select>
|
||||
</li>
|
||||
<li class="mt-3">
|
||||
<a href="{{ route('games.index') }}" class="btn btn-outline-gradient btn-sm w-100">
|
||||
<i class="fas fa-times me-1"></i> Clear Filters
|
||||
</a>
|
||||
</li>
|
||||
<form action="{{ route('games.index') }}" method="GET">
|
||||
<!-- Preserve any existing query parameters -->
|
||||
@if(request('search'))
|
||||
<input type="hidden" name="search" value="{{ request('search') }}">
|
||||
@endif
|
||||
@if(request('sort'))
|
||||
<input type="hidden" name="sort" value="{{ request('sort') }}">
|
||||
@endif
|
||||
@if(request('direction'))
|
||||
<input type="hidden" name="direction" value="{{ request('direction') }}">
|
||||
@endif
|
||||
|
||||
<li class="mb-2">
|
||||
<label class="form-label text-white mb-1"><i class="fas fa-tv me-1"></i> Platform</label>
|
||||
<select name="platform" class="form-select bg-dark text-white border-0" onchange="this.form.submit()">
|
||||
<option value="">All Platforms</option>
|
||||
@foreach($platforms as $platform)
|
||||
<option value="{{ $platform->slug }}" {{ request('platform') == $platform->slug ? 'selected' : '' }}>
|
||||
{{ $platform->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</li>
|
||||
<li class="mb-2">
|
||||
<label class="form-label text-white mb-1"><i class="fas fa-tags me-1"></i> Genre</label>
|
||||
<select name="genre" class="form-select bg-dark text-white border-0" onchange="this.form.submit()">
|
||||
<option value="">All Genres</option>
|
||||
@foreach($genres as $genre)
|
||||
<option value="{{ $genre->slug }}" {{ request('genre') == $genre->slug ? 'selected' : '' }}>
|
||||
{{ $genre->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</li>
|
||||
<li class="mb-2">
|
||||
<label class="form-label text-white mb-1"><i class="fas fa-calendar-alt me-1"></i> Release Year</label>
|
||||
<select name="year" class="form-select bg-dark text-white border-0" onchange="this.form.submit()">
|
||||
<option value="">All Years</option>
|
||||
@foreach($years as $year)
|
||||
<option value="{{ $year }}" {{ request('year') == $year ? 'selected' : '' }}>
|
||||
{{ $year }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</li>
|
||||
<li class="mb-2">
|
||||
<label class="form-label text-white mb-1"><i class="fas fa-star me-1"></i> Rating Range</label>
|
||||
<select name="rating_range" class="form-select bg-dark text-white border-0" onchange="this.form.submit()">
|
||||
<option value="">All Ratings</option>
|
||||
<option value="90-100" {{ request('rating_range') == '90-100' ? 'selected' : '' }}>90+</option>
|
||||
<option value="80-89" {{ request('rating_range') == '80-89' ? 'selected' : '' }}>80-89</option>
|
||||
<option value="70-79" {{ request('rating_range') == '70-79' ? 'selected' : '' }}>70-79</option>
|
||||
<option value="60-69" {{ request('rating_range') == '60-69' ? 'selected' : '' }}>60-69</option>
|
||||
<option value="0-59" {{ request('rating_range') == '0-59' ? 'selected' : '' }}>Below 60</option>
|
||||
</select>
|
||||
</li>
|
||||
<li class="mt-3">
|
||||
<a href="{{ route('games.index') }}" class="btn btn-outline-gradient btn-sm w-100">
|
||||
<i class="fas fa-times me-1"></i> Clear Filters
|
||||
</a>
|
||||
</li>
|
||||
</form>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(request()->hasAny(['platform', 'genre', 'year ', 'rating_range']))
|
||||
@if(request()->hasAny(['platform', 'genre', 'year', 'rating_range']))
|
||||
<div class="mb-4">
|
||||
<div class="d-flex flex-wrap gap-2">
|
||||
@if(request('platform'))
|
||||
|
||||
Reference in New Issue
Block a user