页面优化,功能修复
This commit is contained in:
@@ -34,16 +34,7 @@
|
||||
</aside>
|
||||
|
||||
<section class="channel-main">
|
||||
<header class="channel-head">
|
||||
<nav class="channel-tabs" aria-label="频道导航">
|
||||
<a class="channel-tab" href="{{ route('tools.index') }}">AI工具集</a>
|
||||
<a class="channel-tab active" href="{{ route('models.index') }}">模型推荐</a>
|
||||
<a class="channel-tab" href="{{ route('news.index') }}">资讯文章</a>
|
||||
<a class="channel-tab" href="{{ route('guides.index') }}">教程学习</a>
|
||||
<a class="channel-tab" href="{{ route('home') }}">首页</a>
|
||||
</nav>
|
||||
<div class="channel-status">收录模型 <b>{{ $modelStats['total'] ?? 0 }}</b></div>
|
||||
</header>
|
||||
<x-portal.top-nav active="models" status-label="收录模型" :status-value="$modelStats['total'] ?? 0" />
|
||||
|
||||
<nav class="channel-mobile-nav" aria-label="移动分类导航">
|
||||
<a class="channel-link @if(empty($filters['modality'])) active @endif" href="{{ route('models.index', $resetModalityFilters) }}">
|
||||
@@ -83,12 +74,14 @@
|
||||
<button class="btn btn-primary" type="submit"><i class="bi bi-search"></i> 搜索</button>
|
||||
</form>
|
||||
|
||||
<section class="channel-kpis" aria-label="模型统计概览">
|
||||
<article class="channel-kpi"><span>收录模型</span><b>{{ $modelStats['total'] ?? 0 }}</b></article>
|
||||
<article class="channel-kpi"><span>多模态</span><b>{{ $modelStats['multimodal'] ?? 0 }}</b></article>
|
||||
<article class="channel-kpi"><span>API部署</span><b>{{ $modelStats['api'] ?? 0 }}</b></article>
|
||||
<article class="channel-kpi"><span>7天更新</span><b>{{ $modelStats['updated_7d'] ?? 0 }}</b></article>
|
||||
</section>
|
||||
<x-portal.stat-grid
|
||||
:stats="[
|
||||
['label' => '收录模型', 'value' => $modelStats['total'] ?? 0],
|
||||
['label' => '多模态', 'value' => $modelStats['multimodal'] ?? 0],
|
||||
['label' => 'API部署', 'value' => $modelStats['api'] ?? 0],
|
||||
['label' => '7天更新', 'value' => $modelStats['updated_7d'] ?? 0],
|
||||
]"
|
||||
/>
|
||||
</section>
|
||||
|
||||
<section class="channel-body">
|
||||
@@ -119,35 +112,25 @@
|
||||
</section>
|
||||
|
||||
<aside class="channel-list">
|
||||
<section class="channel-panel">
|
||||
<header class="channel-panel-head">
|
||||
<h3 class="channel-panel-title">相关工具</h3>
|
||||
<a class="tiny-link" href="{{ route('tools.index') }}">查看全部</a>
|
||||
</header>
|
||||
@forelse($sidebarTools as $tool)
|
||||
<article class="side-list-item">
|
||||
<a href="{{ route('tools.show', $tool->slug) }}">{{ $tool->name }}</a>
|
||||
<small>{{ $tool->pricing_type }} · {{ $tool->has_api ? '支持 API' : '无 API' }}</small>
|
||||
</article>
|
||||
@empty
|
||||
<p class="text-muted-soft small mb-0">暂无工具</p>
|
||||
@endforelse
|
||||
</section>
|
||||
<x-portal.side-list-section
|
||||
title="相关工具"
|
||||
:more-url="route('tools.index')"
|
||||
:items="$sidebarTools"
|
||||
:item-url="fn ($tool) => route('tools.show', $tool->slug)"
|
||||
:item-title="fn ($tool) => $tool->name"
|
||||
:item-meta="fn ($tool) => $tool->pricing_type.' · '.($tool->has_api ? '支持 API' : '无 API')"
|
||||
empty-text="暂无工具"
|
||||
/>
|
||||
|
||||
<section class="channel-panel">
|
||||
<header class="channel-panel-head">
|
||||
<h3 class="channel-panel-title">最新资讯</h3>
|
||||
<a class="tiny-link" href="{{ route('news.index') }}">查看全部</a>
|
||||
</header>
|
||||
@forelse($sidebarNews as $news)
|
||||
<article class="side-list-item">
|
||||
<a href="{{ route('news.show', $news->slug) }}">{{ $news->title }}</a>
|
||||
<small>{{ $news->published_at?->format('m-d H:i') }}</small>
|
||||
</article>
|
||||
@empty
|
||||
<p class="text-muted-soft small mb-0">暂无资讯</p>
|
||||
@endforelse
|
||||
</section>
|
||||
<x-portal.side-list-section
|
||||
title="最新资讯"
|
||||
:more-url="route('news.index')"
|
||||
:items="$sidebarNews"
|
||||
:item-url="fn ($news) => route('news.show', $news->slug)"
|
||||
:item-title="fn ($news) => $news->title"
|
||||
:item-meta="fn ($news) => (string) $news->published_at?->format('m-d H:i')"
|
||||
empty-text="暂无资讯"
|
||||
/>
|
||||
</aside>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user