Files

63 lines
2.1 KiB
PHP
Raw Permalink Normal View History

2026-02-07 22:55:07 +08:00
@extends('frontend.layouts.app')
2026-02-05 22:22:10 +08:00
@section('content')
<div class="home-hero">
<div class="hero-text">
2026-02-07 22:55:07 +08:00
<h1>发现优质 AI 工具与产品</h1>
<p>精选高质量 AI 工具与产品,覆盖写作、设计、编程与办公等场景。</p>
2026-02-05 22:22:10 +08:00
</div>
<form class="search-bar" action="{{ route('search.index') }}" method="get">
2026-02-07 22:55:07 +08:00
<input type="text" name="q" placeholder="搜索 AI 工具、产品、标签" aria-label="搜索">
2026-02-05 22:22:10 +08:00
<button type="submit">搜索</button>
</form>
</div>
2026-02-07 22:55:07 +08:00
@include('frontend.partials.ad-slot', ['slotKey' => 'home', 'title' => '推广位'])
2026-02-05 22:22:10 +08:00
<section class="section">
<div class="section-header">
<h2>热门推荐</h2>
</div>
<div class="product-grid">
@forelse($featuredProducts as $product)
2026-02-07 22:55:07 +08:00
@include('frontend.partials.product-card', ['product' => $product])
2026-02-05 22:22:10 +08:00
@empty
2026-02-07 22:55:07 +08:00
<div class="empty">暂无热门推荐</div>
2026-02-05 22:22:10 +08:00
@endforelse
</div>
</section>
<section class="section">
<div class="section-header">
<h2>新加产品</h2>
</div>
<div class="product-grid">
@forelse($newProducts as $product)
2026-02-07 22:55:07 +08:00
@include('frontend.partials.product-card', ['product' => $product])
2026-02-05 22:22:10 +08:00
@empty
2026-02-07 22:55:07 +08:00
<div class="empty">暂无新加产品</div>
2026-02-05 22:22:10 +08:00
@endforelse
</div>
</section>
<section class="section">
<div class="section-header">
2026-02-07 22:55:07 +08:00
<h2>全部分类</h2>
2026-02-05 22:22:10 +08:00
</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)
2026-02-07 22:55:07 +08:00
@include('frontend.partials.product-card', ['product' => $product])
2026-02-05 22:22:10 +08:00
@endforeach
</div>
</div>
@endforeach
</div>
</section>
@endsection