Add public community lists browse page
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
a583a13da1
commit
0eab3e8dbf
@@ -0,0 +1,66 @@
|
||||
@extends('layouts.app')
|
||||
@php use Illuminate\Support\Str; @endphp
|
||||
|
||||
@section('title', 'Community Lists — GameLog')
|
||||
@section('description', 'Browse public game lists created by the GameLog community.')
|
||||
|
||||
@section('content')
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-10">
|
||||
|
||||
<div class="flex items-center justify-between mb-8">
|
||||
<div>
|
||||
<h1 class="text-2xl font-bold text-white">Community Lists</h1>
|
||||
<p class="text-sm text-slate-500 mt-1">Public game lists from GameLog members</p>
|
||||
</div>
|
||||
@auth
|
||||
<a href="{{ route('lists.index') }}"
|
||||
class="px-4 py-2 bg-purple-600 hover:bg-purple-700 text-white text-sm font-semibold rounded-lg transition-colors">
|
||||
My Lists
|
||||
</a>
|
||||
@endauth
|
||||
</div>
|
||||
|
||||
@if($lists->isEmpty())
|
||||
<div class="text-center py-20">
|
||||
<svg class="mx-auto w-12 h-12 text-slate-700 mb-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"/>
|
||||
</svg>
|
||||
<p class="text-slate-500 mb-2">No public lists yet.</p>
|
||||
@guest
|
||||
<p class="text-slate-600 text-sm"><a href="{{ route('register') }}" class="text-purple-400 hover:text-purple-300 transition-colors">Sign up</a> and create the first one!</p>
|
||||
@endguest
|
||||
</div>
|
||||
@else
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4">
|
||||
@foreach($lists as $list)
|
||||
<a href="{{ route('lists.show', $list) }}"
|
||||
class="group block bg-[#16161d] border border-white/5 rounded-lg p-5 hover:border-purple-500/50 transition-all">
|
||||
<h2 class="font-semibold text-white group-hover:text-purple-300 transition-colors line-clamp-1 mb-1">
|
||||
{{ $list->title }}
|
||||
</h2>
|
||||
@if($list->description)
|
||||
<p class="text-sm text-slate-500 line-clamp-2 mb-3">{{ $list->description }}</p>
|
||||
@else
|
||||
<div class="mb-3"></div>
|
||||
@endif
|
||||
<div class="flex items-center justify-between mt-auto">
|
||||
<span class="text-xs text-slate-600">
|
||||
{{ $list->list_games_count }} {{ Str::plural('game', $list->list_games_count) }}
|
||||
</span>
|
||||
@if($list->user)
|
||||
<span class="text-xs text-purple-400 truncate max-w-[8rem]">
|
||||
{{ $list->user->username }}
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<div class="mt-8">
|
||||
{{ $lists->links() }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user