Core implementation: controllers, views, routes, models, import command
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title', $q ? "Search: {$q} — GameLog" : 'Search Games — GameLog')
|
||||
|
||||
@section('content')
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-10">
|
||||
|
||||
<h1 class="text-2xl font-bold text-white mb-6">
|
||||
@if($q)
|
||||
Search results for "<span class="text-purple-400">{{ $q }}</span>"
|
||||
@else
|
||||
Search Games
|
||||
@endif
|
||||
</h1>
|
||||
|
||||
<form action="{{ route('games.search') }}" method="GET" class="mb-8 max-w-xl">
|
||||
<div class="relative">
|
||||
<svg class="absolute left-4 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0"/>
|
||||
</svg>
|
||||
<input type="text" name="q" value="{{ $q }}" placeholder="Search for a game…" autofocus
|
||||
class="w-full bg-[#16161d] border border-white/10 rounded-xl pl-12 pr-4 py-3 text-base text-slate-200 placeholder-slate-500 focus:outline-none focus:border-purple-500 focus:ring-1 focus:ring-purple-500 transition">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@if($q && $games->isEmpty())
|
||||
<p class="text-slate-500">No games found for "{{ $q }}".</p>
|
||||
@elseif($games->isNotEmpty())
|
||||
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 gap-4">
|
||||
@foreach($games as $game)
|
||||
<x-game-card :game="$game" />
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user