The Gallery

(An eclectic, disparate collection of literally thousands of random items from Tim's collection)

@php $activeTag = $currentTag ?? (request('tag') ? \App\Models\Tag::where('slug', request('tag'))->orWhere('name', request('tag'))->first() : null); $activeTagSlug = $activeTag ? ($activeTag->slug ?: $activeTag->name) : request('tag'); $activeTagName = $activeTag ? $activeTag->name : request('tag'); $hasTagFilter = !empty($activeTagSlug); $categoryShapes = [ [ 'rot' => '-rotate-1', 'polygon' => '1,2 99,0 98,39 2,40', ], [ 'rot' => 'rotate-1', 'polygon' => '2,0 99,3 97,40 2,37', ], [ 'rot' => '-rotate-2', 'polygon' => '1,3 98,1 100,38 3,40', ], [ 'rot' => 'rotate-2', 'polygon' => '2,1 98,3 99,38 1,40', ], ]; @endphp
@php $isAllActive = !$currentCategory; $shapeAll = $categoryShapes[0]; @endphp @if($isAllActive) All @else All @endif @foreach($categories as $idx => $category) @php $isActive = $currentCategory && $currentCategory->id === $category->id; $shape = $categoryShapes[($idx + 1) % count($categoryShapes)]; @endphp @if($isActive) {{ $category->name }} @else {{ $category->name }} @endif @endforeach
@if(request('search')) Clear @endif
@if($hasTagFilter) @php $clearTagUrl = route('gallery.index', array_merge(['categorySlug' => $currentCategory ? \Illuminate\Support\Str::slug($currentCategory->name) : 'all'], request()->except(['tag', 'page']))); @endphp
Filtered by #{{ $activeTagName }}
Clear Tag Filter
@endif
@if($resources->isEmpty())

No treasures found in this corner of the vault.

@if($hasTagFilter) Clear Tag Filter (#{{ $activeTagName }}) @endif @if(request('search')) Clear Search @endif
@else
@php $rotations = ['rotate-1', '-rotate-1', 'rotate-[1.5deg]', '-rotate-[1.5deg]']; @endphp @foreach($resources as $index => $resource) @php $rot = $rotations[$index % count($rotations)]; @endphp
{{ $resource->altText() }}

{{ $resource->caption ?: 'Untitled Artifact' }}

@if($resource->tags->isNotEmpty())
@foreach($resource->tags->take(4) as $tag) #{{ $tag->name }} @endforeach @if($resource->tags->count() > 4) +MORE @endif
@endif
@endforeach
{{ $resources->links('vendor.pagination.premium') }}
@endif