@extends('app::layouts.app') @section('content') @php $menuCategories = $categories->take(8); $heroListing = $featuredListings->first() ?? $recentListings->first(); $heroImage = $heroListing?->getFirstMediaUrl('listing-images'); $listingCards = $recentListings->take(6); $homeSlides = collect($generalSettings['home_slides'] ?? []) ->filter(fn ($slide): bool => is_array($slide)) ->map(function (array $slide): array { $badge = trim((string) ($slide['badge'] ?? '')); $title = trim((string) ($slide['title'] ?? '')); $subtitle = trim((string) ($slide['subtitle'] ?? '')); $primaryButtonText = trim((string) ($slide['primary_button_text'] ?? '')); $secondaryButtonText = trim((string) ($slide['secondary_button_text'] ?? '')); return [ 'badge' => $badge !== '' ? $badge : 'OpenClassify Marketplace', 'title' => $title !== '' ? $title : 'İlan ücreti ödemeden ürününü hızla sat!', 'subtitle' => $subtitle !== '' ? $subtitle : 'Buy and sell everything in your area', 'primary_button_text' => $primaryButtonText !== '' ? $primaryButtonText : 'İncele', 'secondary_button_text' => $secondaryButtonText !== '' ? $secondaryButtonText : 'Post Listing', ]; }) ->values(); if ($homeSlides->isEmpty()) { $homeSlides = collect([ [ 'badge' => 'OpenClassify Marketplace', 'title' => 'İlan ücreti ödemeden ürününü hızla sat!', 'subtitle' => 'Buy and sell everything in your area', 'primary_button_text' => 'İncele', 'secondary_button_text' => 'Post Listing', ], ]); } $trendSkins = [ ['gradient' => 'from-emerald-800 via-emerald-700 to-emerald-600', 'glow' => 'bg-emerald-200/45'], ['gradient' => 'from-rose-700 via-rose-600 to-pink-500', 'glow' => 'bg-rose-200/40'], ['gradient' => 'from-rose-700 via-pink-600 to-fuchsia-500', 'glow' => 'bg-pink-200/40'], ['gradient' => 'from-rose-700 via-rose-600 to-orange-500', 'glow' => 'bg-orange-200/40'], ['gradient' => 'from-rose-700 via-pink-600 to-red-500', 'glow' => 'bg-rose-200/40'], ['gradient' => 'from-fuchsia-700 via-pink-600 to-rose-500', 'glow' => 'bg-fuchsia-200/40'], ['gradient' => 'from-rose-700 via-rose-600 to-pink-500', 'glow' => 'bg-rose-200/40'], ['gradient' => 'from-red-700 via-rose-600 to-pink-500', 'glow' => 'bg-red-200/40'], ]; $trendIcons = [ 'gift', 'computer', 'bike', 'sparkles', 'coffee', 'laptop', 'fitness', 'game', ]; @endphp
@foreach($homeSlides as $index => $slide)
$index !== 0]) aria-hidden="{{ $index === 0 ? 'false' : 'true' }}" >

{{ $slide['badge'] }}

{{ $slide['title'] }}

{{ $slide['subtitle'] }}

@endforeach
@if($homeSlides->count() > 1)
@foreach($homeSlides as $index => $slide) @endforeach
@else
@endif

OpenClassify

Ürün, kategori, satıcı ara

@if($heroImage) {{ $heroListing?->title }} @else
🚗

Görsel eklendiğinde burada öne çıkan ilan yer alacak.

@endif

Trend Kategoriler

@foreach($menuCategories as $index => $category) @php $trendSkin = $trendSkins[$index % count($trendSkins)]; $trendIcon = $trendIcons[$index % count($trendIcons)]; @endphp
@switch($trendIcon) @case('gift') @break @case('computer') @break @case('bike') @break @case('sparkles') @break @case('coffee') @break @case('laptop') @break @case('fitness') @break @default @endswitch

{{ $category->name }}

@endforeach

Popüler İkinci El İlanlar

@forelse($listingCards as $listing) @php $listingImage = $listing->getFirstMediaUrl('listing-images'); $priceLabel = $listing->price ? number_format((float) $listing->price, 0).' '.$listing->currency : __('messages.free'); $locationLabel = trim(collect([$listing->city, $listing->country])->filter()->join(', ')); $isFavorited = in_array($listing->id, $favoriteListingIds ?? [], true); @endphp
@if($listingImage) {{ $listing->title }} @else
@endif
@if($listing->is_featured) Öne Çıkan @endif Büyük İlan
@auth
@csrf
@else @endauth

{{ $priceLabel }}

{{ $listing->title }}

12 taksit
{{ $locationLabel !== '' ? $locationLabel : 'Konum belirtilmedi' }} {{ $listing->created_at->diffForHumans() }}
İlan detayını aç
@empty
Henüz ilan bulunmuyor.
@endforelse

{{ __('messages.sell_something') }}

Dakikalar içinde ücretsiz ilan oluştur, binlerce alıcıya ulaş.

@auth Hemen İlan Ver @else Ücretsiz Başla @endauth
@endsection