112 lines
5.5 KiB
PHP
112 lines
5.5 KiB
PHP
@extends('layouts.site')
|
||
|
||
@section('page_class', 'page-tools-list')
|
||
@section('title', 'AI工具列表 - AIWeb')
|
||
@section('meta_description', 'AI工具独立列表页,支持关键词、分类、价格、API能力等筛选。')
|
||
@section('canonical', route('tools.list'))
|
||
|
||
@section('content')
|
||
<section class="module-hero">
|
||
<div class="position-relative">
|
||
<span class="hero-chip"><i class="bi bi-grid-1x2-fill"></i> 工具列表</span>
|
||
<h1 class="h2 fw-bold mt-2">AI工具独立列表页</h1>
|
||
<p class="hero-subtext">从工具集首页点击“查看更多”进入,支持完整筛选与分页浏览。</p>
|
||
</div>
|
||
</section>
|
||
|
||
<div class="channel-body">
|
||
<section class="channel-panel">
|
||
<x-portal.top-nav
|
||
active="tool-list"
|
||
status-label="收录工具"
|
||
:status-value="$toolStats['total'] ?? 0"
|
||
wrapper-class="tool-top"
|
||
status-class="tool-status"
|
||
/>
|
||
|
||
<form class="channel-search mb-3" method="get" action="{{ route('tools.list') }}" role="search" aria-label="筛选 AI 工具列表">
|
||
<input type="hidden" name="tab" value="{{ $activeTab }}">
|
||
<input type="search" name="q" value="{{ $filters['q'] ?? '' }}" placeholder="搜索工具名称或能力" autocomplete="off" spellcheck="false">
|
||
|
||
<select name="category" aria-label="按分类筛选">
|
||
<option value="">全部分类</option>
|
||
@foreach($categories as $category)
|
||
<option value="{{ $category->slug }}" @selected(($filters['category'] ?? '') === $category->slug)>{{ $category->name }}</option>
|
||
@endforeach
|
||
</select>
|
||
|
||
<select name="pricing" aria-label="按价格筛选">
|
||
<option value="">价格类型</option>
|
||
<option value="free" @selected(($filters['pricing'] ?? '') === 'free')>免费</option>
|
||
<option value="freemium" @selected(($filters['pricing'] ?? '') === 'freemium')>免费增值</option>
|
||
<option value="paid" @selected(($filters['pricing'] ?? '') === 'paid')>付费</option>
|
||
<option value="open_source" @selected(($filters['pricing'] ?? '') === 'open_source')>开源</option>
|
||
</select>
|
||
|
||
<select name="api" aria-label="按 API 筛选">
|
||
<option value="">接口能力</option>
|
||
<option value="1" @selected(($filters['api'] ?? '') === '1')>支持 API</option>
|
||
<option value="0" @selected(($filters['api'] ?? '') === '0')>无 API</option>
|
||
</select>
|
||
|
||
<button class="btn btn-primary" type="submit"><i class="bi bi-search"></i> 搜索</button>
|
||
</form>
|
||
|
||
<nav class="channel-tabs mb-3" aria-label="列表排序">
|
||
@foreach($tabOptions as $tab)
|
||
<a class="channel-tab @if($activeTab === $tab['key']) active @endif" href="{{ route('tools.list', array_filter(array_merge($filters, ['tab' => $tab['key']]))) }}">{{ $tab['label'] }}</a>
|
||
@endforeach
|
||
</nav>
|
||
|
||
@if($items->isNotEmpty())
|
||
<div class="entity-grid">
|
||
@foreach($items as $tool)
|
||
<article class="entity-card">
|
||
<a class="entity-title" href="{{ route('tools.show', $tool->slug) }}">{{ $tool->name }}</a>
|
||
<div class="entity-meta">{{ $tool->category?->name ?? '未分类' }} · {{ $tool->pricing_type }}</div>
|
||
<p class="entity-desc line-clamp-2">{{ $tool->summary }}</p>
|
||
<div class="d-flex align-items-center justify-content-between gap-2">
|
||
<span class="chip">{{ $tool->has_api ? '支持 API' : '无 API' }}</span>
|
||
<a class="btn btn-sm btn-outline-primary" href="{{ route('tools.show', $tool->slug) }}">详情</a>
|
||
</div>
|
||
</article>
|
||
@endforeach
|
||
</div>
|
||
|
||
<div class="mt-3">{{ $items->links() }}</div>
|
||
@else
|
||
<p class="text-muted-soft mb-0">没有找到匹配工具,请尝试调整筛选条件。</p>
|
||
@endif
|
||
</section>
|
||
|
||
<aside class="channel-list">
|
||
<x-portal.side-list-section
|
||
title="站点概览"
|
||
:items="[
|
||
['title' => '返回工具集首页', 'meta' => '支持分类定位导航', 'url' => route('tools.index')],
|
||
['title' => '模型推荐', 'meta' => '综合评分维度筛选', 'url' => route('models.index')],
|
||
['title' => '资讯文章', 'meta' => '追踪行业动态', 'url' => route('news.index')],
|
||
['title' => '教程学习', 'meta' => '入门到实战路径', 'url' => route('guides.index')],
|
||
]"
|
||
:item-url="fn ($item) => $item['url']"
|
||
:item-title="fn ($item) => $item['title']"
|
||
:item-meta="fn ($item) => $item['meta']"
|
||
/>
|
||
|
||
<x-portal.side-list-section
|
||
title="数据统计"
|
||
:items="[
|
||
['title' => '收录工具', 'meta' => (string) ($toolStats['total'] ?? 0)],
|
||
['title' => '支持 API', 'meta' => (string) ($toolStats['api'] ?? 0)],
|
||
['title' => '免费可用', 'meta' => (string) ($toolStats['free'] ?? 0)],
|
||
['title' => '7天更新', 'meta' => (string) ($toolStats['updated_7d'] ?? 0)],
|
||
]"
|
||
:item-url="fn () => '#'"
|
||
:item-title="fn ($item) => $item['title']"
|
||
:item-meta="fn ($item) => $item['meta']"
|
||
/>
|
||
</aside>
|
||
</div>
|
||
@endsection
|
||
|