@extends('app::layouts.app') @section('content') @php $menuCategories = $categories->take(8); $heroListing = $featuredListings->first() ?? $recentListings->first(); $heroImage = $heroListing?->primaryImageData('gallery'); $listingCards = $recentListings->take(6); $demoEnabled = (bool) config('demo.enabled'); $prepareDemoRoute = $demoEnabled ? route('demo.prepare') : null; $prepareDemoRedirect = url()->full(); $hasDemoSession = (bool) session('is_demo_session') || filled(session('demo_uuid')); $demoLandingMode = $demoEnabled && !auth()->check() && !$hasDemoSession; $demoTtlMinutes = (int) config('demo.ttl_minutes', 360); $demoTtlHours = intdiv($demoTtlMinutes, 60); $demoTtlRemainderMinutes = $demoTtlMinutes % 60; $demoTtlLabelParts = []; if ($demoTtlHours > 0) { $demoTtlLabelParts[] = $demoTtlHours.' '.\Illuminate\Support\Str::plural('hour', $demoTtlHours); } if ($demoTtlRemainderMinutes > 0) { $demoTtlLabelParts[] = $demoTtlRemainderMinutes.' '.\Illuminate\Support\Str::plural('minute', $demoTtlRemainderMinutes); } $demoTtlLabel = $demoTtlLabelParts !== [] ? implode(' ', $demoTtlLabelParts) : '0 minutes'; $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'] ?? '')); $imagePath = trim((string) ($slide['image_path'] ?? '')); return [ 'badge' => $badge !== '' ? $badge : 'OpenClassify Marketplace', 'title' => $title !== '' ? $title : 'Sell faster with a cleaner local marketplace.', 'subtitle' => $subtitle !== '' ? $subtitle : 'Buy and sell everything in your area', 'primary_button_text' => $primaryButtonText !== '' ? $primaryButtonText : 'Browse Listings', 'secondary_button_text' => $secondaryButtonText !== '' ? $secondaryButtonText : 'Post Listing', 'image_url' => \Modules\S3\Support\MediaStorage::url($imagePath, $slide['disk'] ?? null), ]; }) ->values(); if ($homeSlides->isEmpty()) { $homeSlides = collect([ [ 'badge' => 'OpenClassify Marketplace', 'title' => 'Sell faster with a cleaner local marketplace.', 'subtitle' => 'Buy and sell everything in your area', 'primary_button_text' => 'Browse Listings', 'secondary_button_text' => 'Post Listing', 'image_url' => null, ], ]); } @endphp @if($demoLandingMode && $prepareDemoRoute)
@csrf

Prepare Demo

Launch a private seeded marketplace for this browser. Listings, favorites, inbox data, and admin access are prepared automatically.

This demo is deleted automatically after {{ $demoTtlLabel }}.

@else
@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

Trending Categories

View all
@foreach($menuCategories as $category) @php $categoryIconUrl = $category->iconUrl(); $fallbackLabel = strtoupper(\Illuminate\Support\Str::substr($category->name, 0, 1)); @endphp @if($categoryIconUrl) {{ $category->name }} @else {{ $fallbackLabel }} @endif {{ $category->name }} @endforeach

Popular Listings

@forelse($listingCards as $listing) @php $listingImage = $listing->primaryImageData('card'); $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 @empty
No listings yet.
@endforelse

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

Create a free listing in minutes and reach thousands of buyers.

@auth Post listing @else Start free @endauth
@endif @endsection