This commit is contained in:
2023-11-28 04:39:36 +08:00
parent a9ac0e48b3
commit dc37274b6c
86 changed files with 2106 additions and 191 deletions

View File

@@ -10,6 +10,12 @@
Discover over <span class="bg-highlighter-yellow fw-bold px-2">{{ $tools_count }} AI Tools</span> Today
@endif
</h1>
<div class="row justify-content-center">
<div class="col-12 col-md-9 col-lg-8 col-xl-7 mx-auto mb-4">
@include('front.partials.search')
</div>
</div>
</div>
<div class="container-lg pb-5">
@@ -19,15 +25,20 @@
<h2 class="accordion-header">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
data-bs-target="#collapseCategory" aria-controls="collapseCategory">
<span class="h5 fw-bold mb-0">Filter by Category ({{ $parent_categories->count() }})</span>
<span class="h5 mb-0">Filter by {{ $parent_categories->count() }} AI Tool Categories </span>
</button>
</h2>
<div id="collapseCategory" class="accordion-collapse collapse" data-bs-parent="#accordionCategory">
<div class="accordion-body">
<div class="accordion-body d-inline-flex justify-content-center flex-wrap gap-1">
<h3 class="d-inline mb-0">
<a href="{{ route('front.discover.home') }}"
class="btn btn-outline-dark text-decoration-none btn-sm border-2 fw-bold mb-0 rounded-pill px-3 {{ is_null($category) ? 'active' : '' }}">All
Categories</a>
</h3>
@foreach ($parent_categories as $parent_category)
<h3 class="d-inline">
<h3 class="d-inline mb-0">
<a href="{{ route('front.discover.category', ['category_slug' => $parent_category->slug]) }}"
class="btn btn-outline-dark text-decoration-none btn-sm border-2 fw-bold mb-1 rounded-pill px-3 {{ !is_null($category) && $category->slug == $parent_category->slug ? 'active' : '' }}">{{ $parent_category->name }}
class="btn btn-outline-dark text-decoration-none btn-sm border-2 fw-bold mb-0 rounded-pill px-3 {{ !is_null($category) && $category->slug == $parent_category->slug ? 'active' : '' }}">{{ $parent_category->name }}
{{ $parent_category->emoji }}</a>
</h3>
@endforeach
@@ -36,12 +47,46 @@ class="btn btn-outline-dark text-decoration-none btn-sm border-2 fw-bold mb-1 ro
</div>
</div>
<div class="row justify-content-center g-3">
@for ($i = 1; $i <= 18; $i++)
<div class="col-6 col-lg-4">
@include('front.partials.ai-tool-card')
@if ($ai_tools->count() > 0)
<div class="row justify-content-center g-3 mb-4">
@foreach ($ai_tools as $ai_tool)
<div class="col-6 col-lg-4">
@include('front.partials.ai-tool-card')
</div>
@endforeach
</div>
@else
<div class="card">
<div class="card-body text-center p-5">
<p class="h4 fw-bold">😱 Yikes!</p>
<p class="h5 mb-3">This is embarassing, there are no AI tools in this category yet.<br> We will find
more AI to add here. In the meantime:</p>
<a class="btn btn-primary btn-lg rounded-pill px-4 text-decoration-none"
href="{{ route('front.discover.home') }}">See more AI Tools</a>
</div>
@endfor
</div>
@endif
<div class="mb-2">
@if ($ai_tools instanceof \Illuminate\Pagination\LengthAwarePaginator)
@if ($ai_tools->hasPages())
<div class="d-flex justify-content-center">
{{ $ai_tools->onEachSide(1)->links('pagination::bootstrap-5-pagination-limit-10') }}
</div>
@endif
@elseif ($ai_tools instanceof \Illuminate\Pagination\CursorPaginator)
@if ($ai_tools->hasPages())
<div class="d-flex justify-content-center">
{{ $ai_tools->links('pagination::simple-bootstrap-5') }}
</div>
@endif
@endif
</div>
<div class="d-flex justify-content-center text-center text-secondary">
<small>Use <b>Search</b> to discover AI tools by brand, task or features.</small>
</div>
</div>
@endsection