Make home more responsive depending on screen width

This commit is contained in:
2026-05-24 12:06:44 +02:00
parent 64a621173c
commit cbea71d9ae
4 changed files with 83 additions and 6 deletions

View File

@@ -5,12 +5,16 @@
? 'grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-6'
: 'grid-cols-2 sm:grid-cols-3 md:grid-cols-4 xl:grid-cols-5 2xl:grid-cols-8';
$limit = $isThumbnail ? 12 : 16;
// Render enough items for largest possible layout
$limit = 24;
$view = $isThumbnail ? 'thumbnail' : 'poster';
@endphp
<div class="grid {{ $gridClasses }}">
<div
class="episode-grid grid {{ $gridClasses }}"
data-rows="2"
>
@foreach ($episodes->take($limit) as $ep)
@php
$episode = isset($popularView)
@@ -18,9 +22,11 @@
: $ep;
@endphp
<x-episode-cover
:episode="$episode"
:view="$view"
/>
<div class="episode-item">
<x-episode-cover
:episode="$episode"
:view="$view"
/>
</div>
@endforeach
</div>