Files
dumbo2/resources/views/localsearch.blade.php
2023-02-23 18:58:41 +01:00

41 lines
2.5 KiB
PHP

@foreach($filme as $film)
@if($loop->first)
<div class="sm:rounded-lg bg-coal text-yelmax mt-6 p-4">Gesehene, vorgeschlagene & abgelehnte Filme</div>
<div class="flex flex-wrap">
@endif
<a class="my-4 px-4 w-full md:w-1/3 lg:w-1/4 xl:w-1/5 flex-grow-0 flex-shrink-0 block" href="/film/{{$film->id}}">
<img src="{{ $ihelp->getUrl($film->poster, 'w92') }}" alt ="{{$film->title}}" class="rounded-lg shadow-md shadow-burnt float-left mr-2">
<div class="text-yelmax font-semibold">{{ $film->name }}</div>
@if(!is_null($film->seen))
<div class="flex">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 mr-2 text-green-600" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z" />
</svg>
{{ \Carbon\Carbon::parse($film->seen)->format('d.m.Y') }}
</div>
@elseif(!is_null($film->rejected))
<div class="flex">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 mr-2 text-red-600" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636" />
</svg>
{{ \Carbon\Carbon::parse($film->rejected)->format('d.m.Y') }}
</div>
@else
<div class="text-field flex my-2">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 mr-2 text-yelmax" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
{{ \Carbon\Carbon::parse($film->suggested)->format('d.m.Y') }}
</div>
@endif
<div class="text-field flex my-2"><img src="/avatar/{{$film->suggester->getAvatar() }}" class="max-h-7 rounded-lg mr-2"> {{ $film->suggester->name }}</div>
</a>
@if($loop->last)
</div>
@endif
@endforeach
@if($count > 12)
<div class="w-full text-center italic mt-2">Es gibt weitere Suchergebnisse. Grenze die Suche ein, falls das gewünschte Ergebnis nicht gefunden wurde.</div>
@endif