@extends('layouts.app') @php use App\Helpers\SeoHelper; use App\Helpers\MarketContent; $locale = app()->getLocale(); $portfolioContent = $portfolioContent ?? MarketContent::portfolio($locale); $portfolioText = function (string $key, array $replace = []) use ($portfolioContent) { $value = data_get($portfolioContent, $key, ''); foreach ($replace as $placeholder => $replacement) { $value = str_replace(':' . $placeholder, $replacement, (string) $value); } return $value; }; $isGraficaAlcalima = ($project['slug'] ?? '') === 'grafica-alcalima'; $isSquareFeedImage = static function (?string $path): bool { return is_string($path) && $path !== '' && str_contains($path, '/social-feed-'); }; $sectionImageFrameClasses = static function (?string $path) use ($isGraficaAlcalima, $isSquareFeedImage): string { if ($isGraficaAlcalima) { return 'h-[400px] bg-transparent'; } if ($isSquareFeedImage($path)) { return 'aspect-square w-full max-w-sm md:max-w-md bg-white shadow-sm ring-1 ring-neutral-200/80'; } return 'aspect-[4/3] bg-neutral-100'; }; $sectionImageClasses = static function (?string $path) use ($isGraficaAlcalima, $isSquareFeedImage): string { if ($isGraficaAlcalima || $isSquareFeedImage($path)) { return 'object-contain'; } return 'object-cover'; }; $categoryItems = collect(preg_split('/\s*[•|,]\s*/u', $project['category'] ?? '')) ->filter() ->take(5) ->values() ->all(); $servicesApplied = $servicesApplied ?? []; // Helper function to generate localized routes (English has no prefix) $localizedRoute = function($routeName, $params = []) use ($locale) { return SeoHelper::localizedRoute($routeName, $params, $locale); }; @endphp @section('title', $project['metadata']['title'] ?? $metaTitle) @section('meta_description', $project['metadata']['description'] ?? $metaDescription) @section('meta_keywords', $project['metadata']['keywords'] ?? implode(', ', $project['tags'] ?? [])) @section('og_image', asset($project['metadata']['image'] ?? $project['hero']['image'] ?? 'images/og-portfolio.jpg')) @section('og_type', 'article') @push('head') @if(!empty($project['hero']['image'])) @endif @endpush @push('schema') {{-- CreativeWork Schema for Portfolio Item --}} @foreach(($project['sections'] ?? []) as $schemaSection) @if(($schemaSection['type'] ?? null) === 'video_walkthrough' && !empty($schemaSection['video'])) @endif @endforeach @endpush @section('content') {{-- Portfolio Detail Page - Complete with ALL Sections --}}
{{-- Hero Section - Matching Service Pages Design --}}
{{-- Title & Description --}}

{{ $project['title'] }}

{{ $project['hero']['subtitle'] }}

{{-- Hero Image --}}
{{ $project['alt_text']['hero'] ?? ($project['title'] . ' - Criazo') }}
{{ $portfolioText('detail.category') }}
@if(count($categoryItems) > 0) @foreach($categoryItems as $categoryItem) {{ $categoryItem }} @endforeach @else {{ $project['category'] }} @endif
{{ $portfolioText('detail.year') }}
{{ $project['year'] }}
{{ $portfolioText('detail.duration') }}
{{ $project['duration'] }}
@if(isset($project['overview']))

{{ $portfolioText('detail.project_overview') }}

{{ $portfolioText('detail.challenge') }}

{{ $project['overview']['challenge'] }}

{{ $portfolioText('detail.solution') }}

{{ $project['overview']['solution'] }}

{{ $portfolioText('detail.results') }}

{{ $project['overview']['results'] }}

@endif @if(isset($project['sections']) && count($project['sections']) > 0)

{{ $portfolioText('detail.project_details') }}

@foreach($project['sections'] as $index => $section) @if(($section['type'] ?? null) === 'accountable_stats') @continue @endif @php $sectionType = $section['type'] ?? null; $isProductShowcase = $sectionType === 'product_showcase'; $isSocialSection = in_array($sectionType, ['social_media_feed_wall', 'social_media_motion_duo', 'social_media_showcase', 'product_showcase'], true); $sectionSpacing = ($isSocialSection ? 'mb-12' : 'mb-24') . ($index > 0 ? ' ' . ($isSocialSection ? 'pt-12' : 'pt-24') . ' border-t border-neutral-300' : ''); @endphp
@if(($section['type'] ?? null) === 'video_walkthrough' && !empty($section['video'])) @php $walkthroughSizing = ($section['video_sizing'] ?? 'cover') === 'intrinsic' ? 'intrinsic' : 'cover'; @endphp {{-- Chromeless: muted autoplay + loop, no native controls. Click or Space/Enter to pause/play (WCAG). --}} {{-- video_sizing intrinsic: do not upscale low-res masters (sharp, centered). cover: full-bleed crop when source is HD. --}}
@if($walkthroughSizing === 'intrinsic')
@else
@endif
@elseif(($section['type'] ?? null) === 'product_showcase' && !empty($section['image'])) @if(!empty($section['title']))

{{ $section['title'] }}

@if(!empty($section['content']))
{{ $section['content'] }}
@endif @if(!empty($section['highlights']) && count($section['highlights']) > 0)
    @foreach($section['highlights'] as $highlight)
  • {{ $highlight }}
  • @endforeach
@endif
@endif
{{ $portfolioText('detail.gallery_image_alt') }} - {{ $section['title'] ?? $project['title'] }} - {{ $project['title'] }}
@elseif(($section['type'] ?? null) === 'social_media_motion_duo' && !empty($section['feed_video']) && !empty($section['story_video'])) @if(!empty($section['title']))

{{ $section['title'] }}

@if(!empty($section['content']))
{{ $section['content'] }}
@endif
@endif
{{ $section['feed_label'] ?? 'Instagram feed' }}
{{ $section['story_label'] ?? 'Instagram stories' }}
@elseif(($section['type'] ?? null) === 'social_media_feed_wall' && !empty($section['images']) && is_array($section['images'])) @if(!empty($section['title']))

{{ $section['title'] }}

@if(!empty($section['content']))
{{ $section['content'] }}
@endif @if(!empty($section['highlights']) && count($section['highlights']) > 0)
    @foreach($section['highlights'] as $highlight)
  • {{ $highlight }}
  • @endforeach
@endif
@endif
@foreach($section['images'] as $socialImage)
{{ $portfolioText('detail.gallery_image_alt') }} - {{ $project['title'] }}
@endforeach
@elseif(($section['type'] ?? null) === 'social_media_showcase' && !empty($section['images']) && is_array($section['images'])) @php $socialFormat = ($section['format'] ?? 'feed') === 'stories' ? 'stories' : 'feed'; @endphp @if(!empty($section['title']))

{{ $section['title'] }}

@if(!empty($section['content']))
{{ $section['content'] }}
@endif @if(!empty($section['highlights']) && count($section['highlights']) > 0)
    @foreach($section['highlights'] as $highlight)
  • {{ $highlight }}
  • @endforeach
@endif
@endif @if($socialFormat === 'feed')
@foreach($section['images'] as $socialImage)
{{ $project['alt_text']['gallery'] ?? ($project['title'] . ' - Criazo') }}
@endforeach
@else
@foreach($section['images'] as $socialImage)
{{ $project['alt_text']['gallery'] ?? ($project['title'] . ' - Criazo') }}
@endforeach
@endif @elseif(isset($section['type']) && $section['type'] === 'mockup_pair' && isset($section['images']) && count($section['images']) >= 2)
@foreach(array_slice($section['images'], 0, 2) as $mockupImage)
{{ $project['alt_text']['gallery'] ?? ($project['title'] . ' - Criazo') }}
@endforeach
@else
@if($section['imagePosition'] === 'left')
{{ $portfolioText('detail.gallery_image_alt') }} - {{ $section['title'] }} - {{ $project['title'] }}

{{ $section['title'] }}

{{ $section['content'] }}
@if(isset($section['highlights']) && count($section['highlights']) > 0)
    @foreach($section['highlights'] as $highlight)
  • {{ $highlight }}
  • @endforeach
@endif
@else

{{ $section['title'] }}

{{ $section['content'] }}
@if(isset($section['highlights']) && count($section['highlights']) > 0)
    @foreach($section['highlights'] as $highlight)
  • {{ $highlight }}
  • @endforeach
@endif
{{ $portfolioText('detail.gallery_image_alt') }} - {{ $section['title'] }} - {{ $project['title'] }}
@endif
@endif
@endforeach
@endif @if(!empty($servicesApplied))

{{ $portfolioText('detail.services_applied') }}

@endif @if(isset($project['testimonial']))

{{ $portfolioText('detail.what_client_says') }}

"{{ $project['testimonial']['quote'] }}"

{{ $project['testimonial']['author'] }}

{{ $project['testimonial']['role'] }}, {{ $project['testimonial']['company'] }}

@endif @if(isset($project['gallery']) && count($project['gallery']) > 0) @if($isGraficaAlcalima)

{{ $portfolioText('detail.project_gallery') }}

{{-- Horizontal infinite slider: 5 visible at a time (Alcalima only) --}}
@else @php $sectionImages = []; foreach (($project['sections'] ?? []) as $section) { if (!empty($section['image'])) { $sectionImages[] = $section['image']; } if (!empty($section['images']) && is_array($section['images'])) { $sectionImages = array_merge($sectionImages, $section['images']); } } $usedImages = array_filter(array_merge([($project['hero']['image'] ?? null)], $sectionImages)); $galleryImages = array_values(array_unique(array_diff($project['gallery'], $usedImages))); @endphp @if(count($galleryImages) > 0)

{{ $portfolioText('detail.project_gallery') }}

@foreach($galleryImages as $galleryImage)
{{ $project['alt_text']['gallery'] ?? ($project['title'] . ' - Criazo') }}
@endforeach
@endif @endif @endif {{-- Back to Portfolio --}}
@if($isGraficaAlcalima && isset($project['gallery']) && count($project['gallery']) > 0) @push('scripts') @endpush @endif @include('components.explore-site-section', [ 'projects' => collect(array_slice(MarketContent::portfolioProjects($locale), 0, 6)), 'hideServicesSlider' => true, 'explorePortfolioText' => $portfolioContent['explore'] ?? [], ]) @push('scripts') @endpush @push('styles') @endpush @endsection