@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; }; $pageSeo = $portfolioContent['meta']; // Helper function to generate localized routes (English has no prefix) $localizedRoute = function($routeName, $params = []) use ($locale) { return SeoHelper::localizedRoute($routeName, $params, $locale); }; $compactCategory = static function (?string $category): string { $items = collect(preg_split('/\s*[•|,]\s*/u', $category ?? '')) ->filter() ->take(2) ->values(); return $items->isNotEmpty() ? $items->implode(' • ') : (string) $category; }; @endphp @section('title', $pageSeo['title']) @section('meta_description', $pageSeo['description']) @section('meta_keywords', $pageSeo['keywords']) @section('og_image', $projects->isNotEmpty() && isset($projects->first()['hero']['image']) ? asset($projects->first()['hero']['image']) : asset($pageSeo['image'])) @push('head') @if($projects->isNotEmpty() && isset($projects->first()['hero']['image'])) @endif @endpush @push('styles') @endpush @section('content')

{{ $portfolioText('page.hero_eyebrow') }}

{{ $portfolioText('page.hero_title_1') }}
{{ $portfolioText('page.hero_title_2') }}

{{ $portfolioText('page.hero_description', ['count' => method_exists($projects, 'total') ? $projects->total() : count($projects)]) }}

@php $projectsList = $projects instanceof \Illuminate\Contracts\Pagination\Paginator ? $projects->items() : collect($projects)->values()->all(); $bentoRows = []; $rowPatterns = ['wide-first', 'trio', 'narrow-first']; $cursor = 0; $totalProjects = count($projectsList); $patternIndex = 0; while ($cursor < $totalProjects) { $pattern = $rowPatterns[$patternIndex % 3]; $cards = []; if ($pattern === 'trio') { for ($slot = 0; $slot < 3 && $cursor < $totalProjects; $slot++) { $cards[] = [ 'project' => $projectsList[$cursor], 'size' => 'third', ]; $cursor++; } } else { $sizes = $pattern === 'wide-first' ? ['wide', 'narrow'] : ['narrow', 'wide']; foreach ($sizes as $size) { if ($cursor >= $totalProjects) { break; } $cards[] = [ 'project' => $projectsList[$cursor], 'size' => $size, ]; $cursor++; } } if ($cards !== []) { $bentoRows[] = [ 'type' => $pattern, 'cards' => $cards, ]; } $patternIndex++; } $animIndex = 0; @endphp
@foreach($bentoRows as $row)
@foreach($row['cards'] as $card) @include('components.portfolio-bento-card', [ 'project' => $card['project'], 'size' => $card['size'], 'animIndex' => $animIndex, 'portfolioText' => $portfolioText, 'compactCategory' => $compactCategory, 'localizedRoute' => $localizedRoute, 'locale' => $locale, ]) @php $animIndex++; @endphp @endforeach
@endforeach
@if(method_exists($projects, 'hasPages') && $projects->hasPages())
{{ $projects->withQueryString()->links() }}
@endif

{{ $portfolioText('cta.title') }}

{{ $portfolioText('cta.description') }}

{{ $portfolioText('cta.button') }}
@include('components.explore-site-section', [ 'hidePortfolioSlider' => true, 'explorePortfolioText' => $portfolioContent['explore'] ?? [], ]) @endsection