feat: add PartnersPageSeeder for populating partner data and enhance partners view with improved layout and styling for better user experience
This commit is contained in:
@@ -86,11 +86,53 @@
|
||||
max-width: 420px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.partners-cta-card {
|
||||
background: #ffffff;
|
||||
border-radius: 0.8rem;
|
||||
border: 1px solid #e2e8f0;
|
||||
box-shadow: rgba(30, 34, 40, 0.02) 0 2px 1px, rgba(30, 34, 40, 0.02) 0 4px 2px, rgba(30, 34, 40, 0.02) 0 8px 4px, rgba(30, 34, 40, 0.02) 0 16px 8px, rgba(30, 34, 40, 0.03) 0 32px 16px;
|
||||
.partners-showcase {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
.partners-showcase__grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 2rem 1.5rem;
|
||||
align-items: center;
|
||||
justify-items: center;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.partners-showcase__grid {
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 2.25rem 1.75rem;
|
||||
}
|
||||
}
|
||||
.partners-showcase__item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
padding: 0.5rem;
|
||||
text-decoration: none;
|
||||
transition: transform 0.25s ease;
|
||||
}
|
||||
.partners-showcase__item:hover {
|
||||
transform: scale(1.06);
|
||||
}
|
||||
.partners-showcase__item img {
|
||||
max-width: 100%;
|
||||
max-height: 72px;
|
||||
width: auto;
|
||||
height: auto;
|
||||
object-fit: contain;
|
||||
filter: grayscale(15%);
|
||||
opacity: 0.9;
|
||||
transition: filter 0.25s ease, opacity 0.25s ease;
|
||||
}
|
||||
@media (min-width: 992px) {
|
||||
.partners-showcase__item img {
|
||||
max-height: 88px;
|
||||
}
|
||||
}
|
||||
.partners-showcase__item:hover img {
|
||||
filter: grayscale(0%);
|
||||
opacity: 1;
|
||||
}
|
||||
.partners-stats-badge {
|
||||
display: inline-flex;
|
||||
@@ -180,36 +222,33 @@
|
||||
<div class="absolute" style="top: 50%; left: 50%; width: 130%; height: auto; transform: translate(-50%,-50%); z-index:0; pointer-events: none;">
|
||||
<img class="w-full opacity-40" src="{{ asset('assets/img/photos/blurry.png') }}" alt="" loading="lazy">
|
||||
</div>
|
||||
<div class="flex flex-wrap mx-[-15px] xl:mx-[-12.5px] lg:mx-[-12.5px] md:mx-[-12.5px] !mt-[-25px] relative z-[1]">
|
||||
@foreach(array_slice(array_filter($partners, fn ($p) => !empty($p['logo'])), 0, 4) as $index => $featured)
|
||||
@php
|
||||
$colClasses = match ($index) {
|
||||
0 => 'md:w-6/12 lg:w-6/12 xl:w-5/12 w-full !self-end',
|
||||
1 => 'xl:w-6/12 lg:w-6/12 md:w-6/12 w-full !self-end',
|
||||
2 => 'md:w-6/12 lg:w-6/12 xl:w-5/12 xl:!ml-[8.33333333%]',
|
||||
default => 'xl:w-6/12 lg:w-6/12 md:w-6/12 w-full !self-start',
|
||||
};
|
||||
$featuredName = $featured['name'] ?? null;
|
||||
if (!$featuredName && !empty($featured['url'])) {
|
||||
$host = parse_url($featured['url'], PHP_URL_HOST);
|
||||
$featuredName = $host ? preg_replace('/^www\./', '', $host) : t('Çözüm Ortağı');
|
||||
}
|
||||
@endphp
|
||||
<div class="flex-[0_0_auto] !px-[15px] max-w-full xl:!px-[12.5px] lg:!px-[12.5px] md:!px-[12.5px] !mt-[25px] {{ $colClasses }}">
|
||||
<div class="partners-cta-card">
|
||||
<div class="card-body flex-[1_1_auto] p-[32px] xl:p-[40px] text-center">
|
||||
<div class="partner-card__logo-wrap !mb-3 !max-w-[120px]">
|
||||
<img
|
||||
src="{{ asset('storage/' . $featured['logo']) }}"
|
||||
alt="{{ $featuredName }}"
|
||||
loading="lazy"
|
||||
>
|
||||
</div>
|
||||
<h5 class="!mb-0 !text-[0.95rem] !font-bold text-[#1e293b]">{{ $featuredName }}</h5>
|
||||
<div class="partners-showcase relative z-[1]">
|
||||
<div class="partners-showcase__grid">
|
||||
@foreach(array_slice(array_filter($partners, fn ($p) => !empty($p['logo'])), 0, 7) as $featured)
|
||||
@php
|
||||
$featuredName = $featured['name'] ?? null;
|
||||
if (!$featuredName && !empty($featured['url'])) {
|
||||
$host = parse_url($featured['url'], PHP_URL_HOST);
|
||||
$featuredName = $host ? preg_replace('/^www\./', '', $host) : t('Çözüm Ortağı');
|
||||
}
|
||||
@endphp
|
||||
@if(!empty($featured['url']))
|
||||
<a href="{{ $featured['url'] }}" target="_blank" rel="nofollow noopener" class="partners-showcase__item" title="{{ $featuredName }}">
|
||||
@else
|
||||
<div class="partners-showcase__item">
|
||||
@endif
|
||||
<img
|
||||
src="{{ asset('storage/' . $featured['logo']) }}"
|
||||
alt="{{ $featuredName }}"
|
||||
loading="lazy"
|
||||
>
|
||||
@if(!empty($featured['url']))
|
||||
</a>
|
||||
@else
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user