页面优化,功能修复

This commit is contained in:
jiangdong.cheng
2026-02-12 13:06:12 +08:00
parent d35c397e8d
commit 67cd9501de
24 changed files with 975 additions and 242 deletions

View File

@@ -33,16 +33,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" href="{{ route('models.index') }}">模型推荐</a>
<a class="channel-tab" href="{{ route('news.index') }}">资讯文章</a>
<a class="channel-tab active" href="{{ route('guides.index') }}">教程学习</a>
<a class="channel-tab" href="{{ route('home') }}">首页</a>
</nav>
<div class="channel-status">教程总量 <b>{{ $guideStats['total'] ?? 0 }}</b></div>
</header>
<x-portal.top-nav active="guides" status-label="教程总量" :status-value="$guideStats['total'] ?? 0" />
<nav class="channel-mobile-nav" aria-label="移动分类导航">
<a class="channel-link @if(empty($filters['difficulty'])) active @endif" href="{{ route('guides.index', $resetDifficultyFilters) }}">
@@ -77,12 +68,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>{{ $guideStats['total'] ?? 0 }}</b></article>
<article class="channel-kpi"><span>入门教程</span><b>{{ $guideStats['beginner'] ?? 0 }}</b></article>
<article class="channel-kpi"><span>进阶教程</span><b>{{ $guideStats['advanced'] ?? 0 }}</b></article>
<article class="channel-kpi"><span>7天更新</span><b>{{ $guideStats['updated_7d'] ?? 0 }}</b></article>
</section>
<x-portal.stat-grid
:stats="[
['label' => '教程总量', 'value' => $guideStats['total'] ?? 0],
['label' => '入门教程', 'value' => $guideStats['beginner'] ?? 0],
['label' => '进阶教程', 'value' => $guideStats['advanced'] ?? 0],
['label' => '7天更新', 'value' => $guideStats['updated_7d'] ?? 0],
]"
/>
</section>
<section class="channel-body">
@@ -113,35 +106,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 }}</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"
empty-text="暂无工具"
/>
<section class="channel-panel">
<header class="channel-panel-head">
<h3 class="channel-panel-title">推荐模型</h3>
<a class="tiny-link" href="{{ route('models.index') }}">查看全部</a>
</header>
@forelse($sidebarModels as $model)
<article class="side-list-item">
<a href="{{ route('models.show', $model->slug) }}">{{ $model->name }}</a>
<small>综合 {{ $model->total_score }} </small>
</article>
@empty
<p class="text-muted-soft small mb-0">暂无模型</p>
@endforelse
</section>
<x-portal.side-list-section
title="推荐模型"
:more-url="route('models.index')"
:items="$sidebarModels"
:item-url="fn ($model) => route('models.show', $model->slug)"
:item-title="fn ($model) => $model->name"
:item-meta="fn ($model) => '综合 '.$model->total_score.' 分'"
empty-text="暂无模型"
/>
</aside>
</section>
</section>