b2in/resources/views/livewire/web/components/sections/our-values.blade.php
2026-04-10 17:18:17 +02:00

67 lines
4 KiB
PHP

{{-- Hero Icons Helper Function --}}
@php
if (!function_exists('renderHeroIcon')) {
function renderHeroIcon($iconName, $style = 'outline') {
$iconPath = public_path("heroicons/optimized/24/{$style}/{$iconName}.svg");
$fallbackPath = public_path("heroicons/optimized/24/outline/sparkles.svg");
if (file_exists($iconPath)) {
$svg = file_get_contents($iconPath);
// Add classes for styling
return str_replace('<svg', '<svg class="w-10 h-10 text-secondary"', $svg);
} elseif (file_exists($fallbackPath)) {
$svg = file_get_contents($fallbackPath);
return str_replace('<svg', '<svg class="w-10 h-10 text-secondary"', $svg);
}
// Ultimate fallback - simple star icon
return '<svg class="w-10 h-10 text-secondary" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.563.563 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z"/>
</svg>';
}
}
@endphp
<section class="section-padding bg-accent">
<div class="container-padding">
<div class="text-center mb-16 slide-up delay-300">
<h2 class="text-section-title">{!! $content['title'] !!}</h2>
<p class="text-large text-muted-foreground mt-4 max-w-3xl mx-auto">
{!! $content['subtitle'] !!}
</p>
</div>
<div class="grid md:grid-cols-2 lg:grid-cols-3 gap-8">
@foreach($content['values'] as $index => $value)
<div class="group {{ $index === 4 ? 'md:col-span-2 lg:col-span-1 lg:col-start-2' : '' }}">
<div class="card-elevated overflow-hidden group hover:shadow-elevated transition-all duration-300 flex flex-col h-full slide-up delay-{{ $index * 200 }}">
@if(isset($value['icon']))
<div class="relative pt-12 pb-8">
<div class="mx-auto w-20 h-20 icon-secondary-linear glow-soft group-hover:glow-medium rounded-2xl flex items-center justify-center transition-colors duration-300">
@svg('heroicon-o-'.$value['icon'], 'w-10 h-10 text-secondary-foreground')
</div>
</div>
@endif
<div class="p-6 spacing-small flex flex-col justify-between flex-grow">
<div class="mb-4">
@if (isset($value['logo']))
<img src="{{ asset($value['logo']) }}" alt="{{ $value['title'] }}"
class="{{ $value['logo_width'] }} h-18 object-contain" />
@endif
@if(isset($value['title']))
<h3 class="text-xl font-medium text-center">{{ $value['title'] }}</h3>
@endif
@if(isset($value['description']))
<p class="text-muted-foreground leading-relaxed mt-2 text-center">
{{ $value['description'] }}
</p>
@endif
</div>
</div>
<div class="absolute bottom-0 left-0 right-0 h-1 bg-gradient-to-r from-secondary/20 via-secondary to-secondary/20 transform scale-x-0 group-hover:scale-x-100 transition-transform duration-300"></div>
</div>
</div>
@endforeach
</div>
</div>
</section>