mirror of
https://github.com/openclassify/openclassify.git
synced 2026-04-14 11:12:09 -05:00
- Complete rewrite using Laravel 12 framework - Modular architecture with nwidart/laravel-modules v11 - Modules: Category, Listing, Location, Profile - 8 top-level categories with 33 subcategories seeded - 6 sample listings seeded - 5 countries, 13 cities, districts seeded - Multi-language support: en, tr, ar, zh, es, fr, de, pt, ru, ja - Auth scaffolding via Laravel Breeze - Partner dashboard for user listing management - Tailwind CSS via CDN for styling - SQLite database for development - RTL support for Arabic locale Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
34 lines
1.6 KiB
PHP
34 lines
1.6 KiB
PHP
@extends('layouts.app')
|
|
@section('content')
|
|
<div class="container mx-auto px-4 py-8">
|
|
<div class="mb-6">
|
|
<h1 class="text-3xl font-bold">{{ $category->icon ?? '' }} {{ $category->name }}</h1>
|
|
@if($category->description)<p class="text-gray-600 mt-2">{{ $category->description }}</p>@endif
|
|
</div>
|
|
@if($category->children->count())
|
|
<div class="grid grid-cols-2 md:grid-cols-4 gap-4 mb-8">
|
|
@foreach($category->children as $child)
|
|
<a href="{{ route('categories.show', $child) }}" class="bg-blue-50 rounded-lg p-4 text-center hover:bg-blue-100 transition">
|
|
<h3 class="font-medium text-blue-800">{{ $child->name }}</h3>
|
|
</a>
|
|
@endforeach
|
|
</div>
|
|
@endif
|
|
<h2 class="text-xl font-bold mb-4">Listings in {{ $category->name }}</h2>
|
|
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
|
@forelse($listings as $listing)
|
|
<div class="bg-white rounded-lg shadow-md overflow-hidden">
|
|
<div class="p-4">
|
|
<h3 class="font-semibold">{{ $listing->title }}</h3>
|
|
<p class="text-green-600 font-bold">{{ $listing->price ? number_format($listing->price, 0).' '.$listing->currency : 'Free' }}</p>
|
|
<a href="{{ route('listings.show', $listing) }}" class="mt-2 block text-blue-600 hover:underline">View →</a>
|
|
</div>
|
|
</div>
|
|
@empty
|
|
<p class="text-gray-500 col-span-3">No listings in this category yet.</p>
|
|
@endforelse
|
|
</div>
|
|
<div class="mt-6">{{ $listings->links() }}</div>
|
|
</div>
|
|
@endsection
|