63 lines
2.1 KiB
PHP
63 lines
2.1 KiB
PHP
@extends('frontend.layouts.app')
|
|
@section('content')
|
|
<div class="home-hero">
|
|
<div class="hero-text">
|
|
<h1>发现优质 AI 工具与产品</h1>
|
|
<p>精选高质量 AI 工具与产品,覆盖写作、设计、编程与办公等场景。</p>
|
|
</div>
|
|
<form class="search-bar" action="{{ route('search.index') }}" method="get">
|
|
<input type="text" name="q" placeholder="搜索 AI 工具、产品、标签" aria-label="搜索">
|
|
<button type="submit">搜索</button>
|
|
</form>
|
|
</div>
|
|
|
|
@include('frontend.partials.ad-slot', ['slotKey' => 'home', 'title' => '推广位'])
|
|
|
|
<section class="section">
|
|
<div class="section-header">
|
|
<h2>热门推荐</h2>
|
|
</div>
|
|
<div class="product-grid">
|
|
@forelse($featuredProducts as $product)
|
|
@include('frontend.partials.product-card', ['product' => $product])
|
|
@empty
|
|
<div class="empty">暂无热门推荐</div>
|
|
@endforelse
|
|
</div>
|
|
</section>
|
|
|
|
<section class="section">
|
|
<div class="section-header">
|
|
<h2>新加产品</h2>
|
|
</div>
|
|
<div class="product-grid">
|
|
@forelse($newProducts as $product)
|
|
@include('frontend.partials.product-card', ['product' => $product])
|
|
@empty
|
|
<div class="empty">暂无新加产品</div>
|
|
@endforelse
|
|
</div>
|
|
</section>
|
|
|
|
<section class="section">
|
|
<div class="section-header">
|
|
<h2>全部分类</h2>
|
|
</div>
|
|
<div class="category-blocks">
|
|
@foreach($categories as $category)
|
|
<div class="category-block">
|
|
<div class="category-block-header">
|
|
<h3>{{ $category->name }}</h3>
|
|
<a href="{{ route('categories.show', $category->slug) }}" class="more-link">更多</a>
|
|
</div>
|
|
<div class="product-grid">
|
|
@foreach($category->products as $product)
|
|
@include('frontend.partials.product-card', ['product' => $product])
|
|
@endforeach
|
|
</div>
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
</section>
|
|
@endsection
|