@php $locale = app()->getLocale(); $name = $collection->getTranslation('name', $locale); $products = $collection->activeProducts; $gallery = collect([ $collection->hero_image, $collection->cover_image, ]) ->merge($products->pluck('cover_image')) ->merge($products->flatMap(fn ($product) => $product->images->pluck('path'))) ->merge($collection->galleryImages->pluck('path')) ->filter() ->unique() ->values(); @endphp @extends('layouts.app') @section('title', 'Çisa Salotti — '.$name) @section('content')
{{ $name }}
{{ __('site.collection.back') }}

{{ $name }}

01

{{ $collection->getTranslation('description', $locale) }}

{{ __('site.collection.lead') }}

    @foreach([ ['site.collection.spec1.title', 'site.collection.spec1.text'], ['site.collection.spec2.title', 'site.collection.spec2.text'], ['site.collection.spec3.title', 'site.collection.spec3.text'], ] as $spec)
  • {{ __($spec[0]) }} {{ __($spec[1]) }}
  • @endforeach
@if($products->isNotEmpty())
02
@foreach($products as $index => $product) @php $productName = $product->getTranslation('name', $locale); $productType = $product->getTranslation('type', $locale); $productDesc = $product->getTranslation('description', $locale); $productImage = $product->cover_image; $productThumbs = $product->images; $productImageIndex = $productImage ? ($gallery->search($productImage) !== false ? $gallery->search($productImage) : 0) : 0; $dimensions = $product->formattedDimensions($locale); @endphp
@if($productImage) @endif
{{ str_pad((string) ($index + 1), 2, '0', STR_PAD_LEFT) }} @if($productType)

{{ $productType }}

@endif

{{ $productName }}

@if($productDesc)

{{ $productDesc }}

@endif @if($dimensions)

{{ $dimensions }}

@endif @if($productThumbs->isNotEmpty())
@foreach($productThumbs->take(4) as $image) @php $thumbIndex = $gallery->search($image->path) !== false ? $gallery->search($image->path) : 0; @endphp @endforeach
@endif
@endforeach
@endif
@include('partials.lightbox') @include('partials.quote-modal', ['collectionName' => $name]) @endsection @push('scripts') @endpush