@php // Los filtros son enlaces: cada uno conserva lo demás que esté activo. $link = fn (array $change) => route('events', array_filter(array_merge([ 'ver' => $showingPast ? 'pasados' : null, 'tipo' => $activeType, 'sede' => $activeCampus, ], $change))); $chip = 'inline-flex min-h-10 items-center gap-2 rounded-full bg-bg px-3.5 font-semibold ring-1 ring-line hover:ring-link aria-[current=true]:bg-field aria-[current=true]:text-white aria-[current=true]:ring-field'; $count = 'text-sm font-normal text-muted tabular-nums'; $segment = 'inline-flex min-h-10 flex-1 items-center justify-center rounded-md px-2 font-semibold whitespace-nowrap hover:text-link sm:px-4 aria-[current=true]:bg-field aria-[current=true]:text-white'; $tab = 'inline-flex min-h-11 items-center rounded-md px-5 font-bold text-on-field hover:text-white aria-[current=page]:bg-accent aria-[current=page]:text-accent-ink'; @endphp

Eventos

La agenda de la Facultad: conferencias, talleres, ceremonias y actividades para la comunidad universitaria.

{{-- Dos filtros con forma distinta para que no se confundan: el tipo son etiquetas con su cantidad; la sede, un selector de tres posiciones. En celular las etiquetas bajan de línea: todas quedan a la vista, sin depender de un desplazamiento lateral que no se nota. --}}
@if ($types->isNotEmpty()) @endif

{{ $events->total() }} {{ $events->total() === 1 ? 'evento' : 'eventos' }} {{ $showingPast ? ($events->total() === 1 ? 'pasado' : 'pasados') : ($events->total() === 1 ? 'próximo' : 'próximos') }}@if ($hasFilters) con estos filtros @endif @if ($hasFilters) Quitar filtros @endif

@if ($events->isEmpty())
@if ($hasFilters)

No encontramos eventos con esos filtros.

Quitar filtros @elseif ($showingPast)

Todavía no hay eventos pasados.

Ver próximos eventos @else

No hay eventos programados por ahora.

Cuando se anuncie uno, aparecerá aquí.

Ver eventos pasados @endif
@else
@foreach ($groups as $month => $monthEvents) @php [$monthName, $year] = explode(' ', $month) + [1 => '']; $monthId = 'month-'.Str::slug($month); @endphp {{-- El mes queda a la izquierda y acompaña el desplazamiento de sus eventos. --}}

{{ $monthName }} {{ $year }} · {{ trans_choice('{1} 1 evento|[2,*] :count eventos', $monthEvents->count()) }}

@foreach ($monthEvents as $event) @endforeach
@endforeach
{{-- Con JavaScript, «Ver más eventos»; sin él, las páginas numeradas. --}} @if ($events->hasMorePages())
@endif

{{ $events->onEachSide(1)->links('site.partials.pagination') }}
@endif