@props([ 'items' => collect(), 'showHeader' => true, ]) @php $historyItems = $items instanceof \Illuminate\Support\Collection ? $items : collect($items); $gradientStops = $historyItems->values()->map(function ($item, $index) use ($historyItems) { $percent = $historyItems->count() > 1 ? round(($index / ($historyItems->count() - 1)) * 100, 1) : 0; return ($item->color ?? '#17a2b8') . ' ' . $percent . '%'; })->implode(', '); @endphp @include('components.company-history.fonts') @if($historyItems->isNotEmpty()) @if($showHeader) {{ __('company_history.timeline_section_badge') }} {{ __('company_history.timeline_section_title') }} {{ __('company_history.timeline_section_subtitle') }} @endif {{ __('company_history.timeline_start') }} @foreach($historyItems as $item) @php $color = $item->color ?? '#17a2b8'; $position = $item->resolved_position; $title = method_exists($item, 'translate') ? ($item->translate('title') ?: $item->title) : $item->title; $titleUpper = $title ? locale_upper($title) : null; $content = method_exists($item, 'translate') ? ($item->translate('content') ?: $item->content) : $item->content; @endphp {{ $item->year }} @if($titleUpper) {{ $titleUpper }} @endif @if($content) {{ $content }} @endif @endforeach {{ __('company_history.timeline_finish') }} @once @push('styles') @endpush @endonce @endif
{{ __('company_history.timeline_section_subtitle') }}
{{ $content }}