Files
fewo-stommer/resources/themes/seebad/views/sections/offers.blade.php
T
LarsandClaude Opus 5.5 6930d3ab0f Theme Seebad 0.3.0: own gallery, offers, reviews, FAQ, contact, booking and rich text
- All 15 sections now in Seebad style: offers and contact framed with terrace-brace brackets,
  reviews with large average and serif quotes, FAQ with large toggles, gallery with captions on focus
- Booking page offers the phone number ("Lieber persönlich?")

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 10:01:58 +02:00

77 lines
5.7 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{{-- Contract: $heading, $display (grid|list|rotating), $offers (Collection of App\Pricing\AdvertisedOffer) --}}
@if ($offers->isNotEmpty())
@php($layout = $display === 'rotating' && $offers->count() === 1 ? 'grid' : $display)
@php($rotating = $layout === 'rotating')
@php($wide = $layout === 'list' || $rotating)
<section class="mx-auto max-w-7xl px-4 py-16 sm:px-8 sm:py-20" aria-labelledby="{{ $sectionId }}-title"
@if ($rotating) data-rotator aria-roledescription="Karussell" @endif>
<div class="mb-10 flex items-end justify-between gap-4">
<h2 id="{{ $sectionId }}-title" class="heading-display">{{ $heading }}</h2>
@if ($rotating)
<div class="flex gap-2">
<button type="button" data-rotator-prev class="flex size-12 items-center justify-center rounded-md border-2 border-ink hover:bg-ink/5" aria-label="Vorheriges Angebot"><x-heroicon-o-chevron-left class="size-5" aria-hidden="true" /></button>
<button type="button" data-rotator-next class="flex size-12 items-center justify-center rounded-md border-2 border-ink hover:bg-ink/5" aria-label="Nächstes Angebot"><x-heroicon-o-chevron-right class="size-5" aria-hidden="true" /></button>
</div>
@endif
</div>
<ul @class([
'grid gap-8 sm:grid-cols-2 lg:grid-cols-3' => $layout === 'grid',
'grid gap-8' => $layout === 'list',
'relative' => $rotating,
]) @if ($rotating) data-rotator-track aria-live="polite" @endif>
@foreach ($offers as $advertised)
<li data-offer="{{ $advertised->key() }}" @class([
'reveal relative flex flex-col border-2 border-ink bg-surface px-6 pt-9 pb-7 sm:px-8',
'sm:flex-row sm:items-center sm:gap-10' => $wide,
]) @if ($rotating) data-rotator-slide @if (! $loop->first) hidden @endif aria-label="Angebot {{ $loop->iteration }} von {{ $offers->count() }}" @endif>
<span class="absolute -top-0.5 -left-0.5" aria-hidden="true">@include('theme::partials.motif', ['slot' => 'bracket', 'class' => 'size-9'])</span>
<span class="absolute -top-0.5 -right-0.5 -scale-x-100" aria-hidden="true">@include('theme::partials.motif', ['slot' => 'bracket', 'class' => 'size-9'])</span>
<div class="flex-1">
<p class="inline-block bg-accent px-3 py-1 font-semibold text-accent-ink">{{ $advertised->advantage }}</p>
<p class="mt-4 font-display text-[1.875rem] leading-tight">{{ $advertised->title }}</p>
@if ($advertised->arrival)
<p class="mt-2 font-semibold">
{{ $advertised->arrival->locale('de')->isoFormat('dd, DD.MM.') }} bis {{ $advertised->departure->locale('de')->isoFormat('dd, DD.MM.YYYY') }}
<span class="font-normal text-muted">({{ $advertised->nights() }} {{ $advertised->nights() === 1 ? 'Nacht' : 'Nächte' }})</span>
</p>
@endif
@if ($advertised->description)<p class="mt-3 text-muted">{{ $advertised->description }}</p>@endif
@if ($advertised->conditions)
<ul class="mt-4 space-y-1 text-muted">
@foreach ($advertised->conditions as $condition)
<li class="flex gap-2"><x-heroicon-o-check class="mt-1 size-5 shrink-0 text-accent" aria-hidden="true" />{{ $condition }}</li>
@endforeach
</ul>
@endif
</div>
<div @class(['mt-6', 'border-t border-line pt-5' => $advertised->quote, 'sm:mt-0 sm:min-w-56 sm:border-t-0 sm:pt-0 sm:text-right' => $wide, 'sm:border-l sm:pl-10' => $wide && $advertised->quote])>
@if ($advertised->quote)
<p>
<span class="font-display text-[2rem] leading-none">{{ \App\Support\Money::format($advertised->quote->total()) }}</span>
@if ($advertised->regularTotal() > $advertised->quote->total())
<span class="block text-muted">statt <s>{{ \App\Support\Money::format($advertised->regularTotal()) }}</s></span>
@endif
</p>
<p class="text-muted">für {{ $advertised->quote->guests }} {{ $advertised->quote->guests === 1 ? 'Person' : 'Personen' }}, inkl. Endreinigung</p>
@endif
<a href="{{ $advertised->bookingUrl() }}" class="btn-accent mt-4">
{{ $advertised->arrival ? 'Diesen Termin anfragen' : 'Preis berechnen' }}
</a>
</div>
</li>
@endforeach
</ul>
@if ($rotating)
<div class="mt-6 flex justify-center gap-1" role="tablist" aria-label="Angebote">
@foreach ($offers as $advertised)
<button type="button" data-rotator-dot="{{ $loop->index }}" role="tab" aria-label="Angebot {{ $loop->iteration }}"
aria-selected="{{ $loop->first ? 'true' : 'false' }}" class="group flex size-11 items-center justify-center"><span class="size-3 rounded-full bg-line group-aria-selected:bg-accent"></span></button>
@endforeach
</div>
@endif
<p class="mt-6 text-muted">Angebote werden bei der Preisberechnung automatisch berücksichtigt – Sie erhalten immer das für Sie günstigste.</p>
</section>
@endif