页面优化,功能修复

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 active" 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>{{ $newsStats['total'] ?? 0 }}</b></div>
</header>
<x-portal.top-nav active="news" status-label="资讯总量" :status-value="$newsStats['total'] ?? 0" />
<nav class="channel-mobile-nav" aria-label="移动分类导航">
<a class="channel-link @if(empty($filters['category'])) active @endif" href="{{ route('news.index', $resetCategoryFilters) }}">
@@ -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>{{ $newsStats['total'] ?? 0 }}</b></article>
<article class="channel-kpi"><span>今日新增</span><b>{{ $newsStats['today'] ?? 0 }}</b></article>
<article class="channel-kpi"><span>高可信来源</span><b>{{ $newsStats['high_source'] ?? 0 }}</b></article>
<article class="channel-kpi"><span>7天更新</span><b>{{ $newsStats['updated_7d'] ?? 0 }}</b></article>
</section>
<x-portal.stat-grid
:stats="[
['label' => '资讯总量', 'value' => $newsStats['total'] ?? 0],
['label' => '今日新增', 'value' => $newsStats['today'] ?? 0],
['label' => '高可信来源', 'value' => $newsStats['high_source'] ?? 0],
['label' => '7天更新', 'value' => $newsStats['updated_7d'] ?? 0],
]"
/>
</section>
<section class="channel-body">
@@ -117,35 +110,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('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="暂无数据"
/>
<section class="channel-panel">
<header class="channel-panel-head">
<h3 class="channel-panel-title">推荐教程</h3>
<a class="tiny-link" href="{{ route('guides.index') }}">查看全部</a>
</header>
@forelse($sidebarGuides as $guide)
<article class="side-list-item">
<a href="{{ route('guides.show', $guide->slug) }}">{{ $guide->title }}</a>
<small>{{ $guide->difficulty }}</small>
</article>
@empty
<p class="text-muted-soft small mb-0">暂无教程</p>
@endforelse
</section>
<x-portal.side-list-section
title="推荐教程"
:more-url="route('guides.index')"
:items="$sidebarGuides"
:item-url="fn ($guide) => route('guides.show', $guide->slug)"
:item-title="fn ($guide) => $guide->title"
:item-meta="fn ($guide) => $guide->difficulty"
empty-text="暂无教程"
/>
</aside>
</section>
</section>