@props(['product', 'resource']) @php $productSlug = \Illuminate\Support\Str::slug($product->name); $imageUrl = Storage::url($resource->file); $caption = $resource->caption ?: 'Fibbers Archive Item'; $hasPhotoTeeWhite = file_exists(public_path('images/mockups/tshirt-white.jpg')); $hasPhotoTeeBlack = file_exists(public_path('images/mockups/tshirt-black.jpg')); $hasPhotoMug = file_exists(public_path('images/mockups/mug-white.jpg')); $hasPhotoHoodieWhite = file_exists(public_path('images/mockups/hoodie-white.jpg')); $hasPhotoHoodieBlack = file_exists(public_path('images/mockups/hoodie-black.jpg')); $hasArtPrintPortrait = file_exists(public_path('images/mockups/art-print-portrait.jpg')); $hasArtPrintLandscape = file_exists(public_path('images/mockups/art-print-landscape.jpg')); $resourcePath = public_path('storage/' . $resource->file); $isLandscape = false; if (file_exists($resourcePath)) { $imgSize = @getimagesize($resourcePath); if ($imgSize && $imgSize[0] > $imgSize[1]) { $isLandscape = true; } } @endphp
{{ $caption }}

Original Artifact Detail

{{-- -------------------------------------------------------- --}} {{-- CASE 1: PHOTOGRAPHIC T-SHIRT (WHITE & BLACK STUDIO) --}} {{-- -------------------------------------------------------- --}} @if($productSlug === 't-shirt')
@if($hasPhotoTeeBlack) Black T-Shirt Mockup @endif @if($hasPhotoTeeWhite) White T-Shirt Mockup @endif
{{ $caption }}
{{-- -------------------------------------------------------- --}} {{-- CASE 2: PHOTOGRAPHIC CERAMIC MUG --}} {{-- -------------------------------------------------------- --}} @elseif($productSlug === 'mug')
@if($hasPhotoMug) Ceramic Mug Mockup @endif
{{ $caption }}
{{-- -------------------------------------------------------- --}} {{-- CASE 3: HOODIE (PHOTOGRAPHIC IF AVAILABLE / FALLBACK) --}} {{-- -------------------------------------------------------- --}} @elseif($productSlug === 'hoodie')
@if($hasPhotoHoodieWhite || $hasPhotoHoodieBlack) @if($hasPhotoHoodieBlack) Black Hoodie Mockup @endif @if($hasPhotoHoodieWhite) White Hoodie Mockup @endif
{{ $caption }}
@else
{{ $caption }}
@endif
{{-- -------------------------------------------------------- --}} {{-- CASE 4: PHOTOGRAPHIC FRAMED ART PRINT --}} {{-- -------------------------------------------------------- --}} @elseif($productSlug === 'art-print')
@if($hasArtPrintPortrait) Art Print Portrait Mockup @endif
{{ $caption }}
@if($hasArtPrintLandscape) Art Print Landscape Mockup @endif
{{ $caption }}
{{-- -------------------------------------------------------- --}} {{-- CASE 5: GENERIC FALLBACK --}} {{-- -------------------------------------------------------- --}} @else
{{ $caption }}
@endif
Official Fibbers Archive Merch
@if(in_array($productSlug, ['t-shirt', 'hoodie']))
Colour:
@endif