377 lines
13 KiB
PHP
377 lines
13 KiB
PHP
@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())
|
|
<section class="company-history-timeline-section company-history-fonts wrapper !bg-[#f4f6f8] !pt-8 xl:!pt-12 lg:!pt-12 md:!pt-12">
|
|
<div class="container py-20 xl:py-28 lg:py-28 md:py-28">
|
|
@if($showHeader)
|
|
<div class="flex flex-wrap mx-[-15px] !mb-14 !text-center">
|
|
<div class="w-full flex-[0_0_auto] !px-[15px] max-w-full !mx-auto">
|
|
<span class="company-history-timeline__section-badge inline-block text-[0.75rem] tracking-[0.12rem] uppercase font-bold !mb-3" style="color: #e31e24;">
|
|
{{ __('company_history.timeline_section_badge') }}
|
|
</span>
|
|
<h2 class="company-history-timeline__section-title !text-[calc(1.345rem_+_1.14vw)] font-bold !leading-[1.2] xl:!text-[2.2rem] !mb-3">
|
|
{{ __('company_history.timeline_section_title') }}
|
|
</h2>
|
|
<p class="company-history-timeline__section-subtitle lead text-[1.05rem] !leading-[1.6] !text-[#60697b] max-w-[42rem] !mx-auto">
|
|
{{ __('company_history.timeline_section_subtitle') }}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
|
|
<div class="company-history-timeline">
|
|
<div class="company-history-timeline__start">
|
|
<span>{{ __('company_history.timeline_start') }}</span>
|
|
</div>
|
|
|
|
<div class="company-history-timeline__track" style="--timeline-gradient: linear-gradient(to bottom, {{ $gradientStops }});">
|
|
@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
|
|
<article
|
|
class="company-history-timeline__item company-history-timeline__item--{{ $position }}"
|
|
style="--item-color: {{ $color }};"
|
|
>
|
|
<div class="company-history-timeline__side company-history-timeline__side--outer">
|
|
<div class="company-history-timeline__icon-ring">
|
|
<x-company-history.icon :icon="$item->icon" :color="$color" />
|
|
</div>
|
|
</div>
|
|
|
|
<div class="company-history-timeline__axis">
|
|
<span class="company-history-timeline__dot" aria-hidden="true"></span>
|
|
</div>
|
|
|
|
<div class="company-history-timeline__side company-history-timeline__side--inner">
|
|
<div class="company-history-timeline__content">
|
|
<div class="company-history-timeline__year">
|
|
<span class="company-history-timeline__year-value">{{ $item->year }}</span>
|
|
@if($item->quarter)
|
|
<span class="company-history-timeline__quarter">{{ __('company_history.quarter_label_' . strtolower($item->quarter)) }}</span>
|
|
@endif
|
|
</div>
|
|
@if($titleUpper)
|
|
<h3 class="company-history-timeline__title">{{ $titleUpper }}</h3>
|
|
@endif
|
|
@if($content)
|
|
<p class="company-history-timeline__text">{{ $content }}</p>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</article>
|
|
@endforeach
|
|
</div>
|
|
|
|
<div class="company-history-timeline__finish">
|
|
<span>{{ __('company_history.timeline_finish') }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
@once
|
|
@push('styles')
|
|
<style>
|
|
.company-history-timeline__section-badge {
|
|
font-family: var(--ch-font-label);
|
|
letter-spacing: 0.14em;
|
|
}
|
|
|
|
.company-history-timeline__section-title {
|
|
font-family: var(--ch-font-year);
|
|
letter-spacing: -0.02em;
|
|
}
|
|
|
|
.company-history-timeline__section-subtitle {
|
|
font-family: var(--ch-font-body);
|
|
}
|
|
|
|
.company-history-timeline {
|
|
max-width: 960px;
|
|
margin: 0 auto;
|
|
font-family: var(--ch-font-body);
|
|
}
|
|
|
|
.company-history-timeline__start,
|
|
.company-history-timeline__finish {
|
|
display: flex;
|
|
justify-content: center;
|
|
margin-bottom: 1.75rem;
|
|
}
|
|
|
|
.company-history-timeline__finish {
|
|
margin-top: 1.75rem;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.company-history-timeline__start span,
|
|
.company-history-timeline__finish span {
|
|
display: inline-block;
|
|
padding: 0.45rem 1.4rem;
|
|
border: 2px solid #cbd5e0;
|
|
border-radius: 999px;
|
|
font-family: var(--ch-font-label);
|
|
font-size: 0.72rem;
|
|
font-weight: 600;
|
|
letter-spacing: 0.16em;
|
|
color: #4a5568;
|
|
background: #fff;
|
|
}
|
|
|
|
.company-history-timeline__track {
|
|
position: relative;
|
|
padding: 0.25rem 0;
|
|
}
|
|
|
|
.company-history-timeline__track::before {
|
|
content: '';
|
|
position: absolute;
|
|
left: 50%;
|
|
top: 0;
|
|
bottom: 0;
|
|
width: 4px;
|
|
transform: translateX(-50%);
|
|
background: var(--timeline-gradient);
|
|
border-radius: 4px;
|
|
z-index: 0;
|
|
}
|
|
|
|
.company-history-timeline__item {
|
|
position: relative;
|
|
display: grid;
|
|
grid-template-columns: 1fr 40px 1fr;
|
|
align-items: center;
|
|
gap: 0 1.5rem;
|
|
min-height: 150px;
|
|
margin-bottom: 2.75rem;
|
|
z-index: 1;
|
|
}
|
|
|
|
.company-history-timeline__item:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.company-history-timeline__axis {
|
|
grid-column: 2;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.company-history-timeline__dot {
|
|
width: 18px;
|
|
height: 18px;
|
|
border-radius: 50%;
|
|
background: var(--item-color);
|
|
border: 3px solid #fff;
|
|
box-shadow: 0 0 0 2px var(--item-color);
|
|
}
|
|
|
|
.company-history-timeline__icon-ring {
|
|
width: 76px;
|
|
height: 76px;
|
|
border-radius: 50%;
|
|
border: 3px solid var(--item-color);
|
|
background: #fff;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
|
|
position: relative;
|
|
}
|
|
|
|
.company-history-timeline__icon-ring::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 50%;
|
|
width: 48px;
|
|
height: 0;
|
|
border-top: 2px dotted var(--item-color);
|
|
opacity: 0.65;
|
|
}
|
|
|
|
.company-history-icon-svg {
|
|
width: 34px;
|
|
height: 34px;
|
|
}
|
|
|
|
.company-history-timeline__year {
|
|
font-family: var(--ch-font-year);
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: baseline;
|
|
gap: 0.5rem 0.75rem;
|
|
margin-bottom: 0.35rem;
|
|
}
|
|
|
|
.company-history-timeline__year-value {
|
|
font-size: clamp(2.1rem, 4.2vw, 3rem);
|
|
font-weight: 800;
|
|
line-height: 1;
|
|
letter-spacing: -0.03em;
|
|
font-variant-numeric: tabular-nums;
|
|
color: var(--item-color);
|
|
}
|
|
|
|
.company-history-timeline__quarter {
|
|
font-family: var(--ch-font-label);
|
|
font-size: 0.95rem;
|
|
font-weight: 600;
|
|
letter-spacing: 0.08em;
|
|
color: var(--item-color);
|
|
opacity: 0.85;
|
|
padding: 0.15rem 0.55rem;
|
|
border: 2px solid var(--item-color);
|
|
border-radius: 0.35rem;
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.company-history-timeline__item--left .company-history-timeline__year {
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
.company-history-timeline__title {
|
|
font-family: var(--ch-font-label);
|
|
font-size: 0.82rem;
|
|
font-weight: 600;
|
|
letter-spacing: 0.14em;
|
|
color: var(--item-color);
|
|
margin: 0 0 0.75rem;
|
|
}
|
|
|
|
.company-history-timeline__text {
|
|
font-family: var(--ch-font-body);
|
|
font-size: 0.98rem;
|
|
font-weight: 400;
|
|
line-height: 1.7;
|
|
color: #5c6b7a;
|
|
margin: 0;
|
|
max-width: 340px;
|
|
}
|
|
|
|
/* Sağ taraf: içerik sağda, ikon en sağda */
|
|
.company-history-timeline__item--right .company-history-timeline__side--inner {
|
|
grid-column: 3;
|
|
text-align: left;
|
|
}
|
|
|
|
.company-history-timeline__item--right .company-history-timeline__side--outer {
|
|
grid-column: 3;
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
margin-top: -5.5rem;
|
|
padding-right: 0;
|
|
}
|
|
|
|
.company-history-timeline__item--right .company-history-timeline__icon-ring::before {
|
|
right: 100%;
|
|
margin-right: 4px;
|
|
}
|
|
|
|
.company-history-timeline__item--right .company-history-timeline__content {
|
|
padding-right: 5.5rem;
|
|
}
|
|
|
|
/* Sol taraf: ikon en solda, içerik solda */
|
|
.company-history-timeline__item--left .company-history-timeline__side--inner {
|
|
grid-column: 1;
|
|
text-align: right;
|
|
}
|
|
|
|
.company-history-timeline__item--left .company-history-timeline__side--outer {
|
|
grid-column: 1;
|
|
display: flex;
|
|
justify-content: flex-start;
|
|
margin-top: -5.5rem;
|
|
}
|
|
|
|
.company-history-timeline__item--left .company-history-timeline__icon-ring::before {
|
|
left: 100%;
|
|
margin-left: 4px;
|
|
}
|
|
|
|
.company-history-timeline__item--left .company-history-timeline__content {
|
|
padding-left: 5.5rem;
|
|
}
|
|
|
|
.company-history-timeline__item--left .company-history-timeline__text {
|
|
margin-left: auto;
|
|
}
|
|
|
|
@media (max-width: 767px) {
|
|
.company-history-timeline__track::before {
|
|
left: 24px;
|
|
transform: none;
|
|
}
|
|
|
|
.company-history-timeline__item {
|
|
grid-template-columns: 48px 1fr;
|
|
gap: 0 1rem;
|
|
min-height: auto;
|
|
}
|
|
|
|
.company-history-timeline__axis {
|
|
grid-column: 1;
|
|
grid-row: 1;
|
|
align-self: start;
|
|
padding-top: 1.25rem;
|
|
}
|
|
|
|
.company-history-timeline__item--left .company-history-timeline__side--inner,
|
|
.company-history-timeline__item--right .company-history-timeline__side--inner {
|
|
grid-column: 2;
|
|
grid-row: 1;
|
|
text-align: left;
|
|
}
|
|
|
|
.company-history-timeline__item--left .company-history-timeline__side--outer,
|
|
.company-history-timeline__item--right .company-history-timeline__side--outer {
|
|
grid-column: 2;
|
|
grid-row: 2;
|
|
margin-top: 0.75rem;
|
|
justify-content: flex-start !important;
|
|
}
|
|
|
|
.company-history-timeline__item--left .company-history-timeline__content,
|
|
.company-history-timeline__item--right .company-history-timeline__content {
|
|
padding: 0 !important;
|
|
}
|
|
|
|
.company-history-timeline__icon-ring {
|
|
width: 60px;
|
|
height: 60px;
|
|
}
|
|
|
|
.company-history-timeline__icon-ring::before {
|
|
display: none;
|
|
}
|
|
|
|
.company-history-timeline__item--left .company-history-timeline__text {
|
|
margin-left: 0;
|
|
}
|
|
}
|
|
</style>
|
|
@endpush
|
|
@endonce
|
|
@endif
|