页面优化,功能修复
This commit is contained in:
27
resources/views/components/portal/top-nav.blade.php
Normal file
27
resources/views/components/portal/top-nav.blade.php
Normal file
@@ -0,0 +1,27 @@
|
||||
@props([
|
||||
'active' => 'tools',
|
||||
'statusLabel' => '数据总量',
|
||||
'statusValue' => 0,
|
||||
'wrapperClass' => 'channel-head',
|
||||
'tabsClass' => 'channel-tabs',
|
||||
'statusClass' => 'channel-status',
|
||||
])
|
||||
|
||||
@php
|
||||
$tabs = [
|
||||
['key' => 'tools', 'label' => 'AI工具集', 'url' => route('tools.index')],
|
||||
['key' => 'models', 'label' => 'AI应用集', 'url' => route('models.index')],
|
||||
['key' => 'news', 'label' => '每日AI资讯', 'url' => route('news.index')],
|
||||
['key' => 'guides', 'label' => 'AI教程资源', 'url' => route('guides.index')],
|
||||
['key' => 'tool-list', 'label' => '工具列表', 'url' => route('tools.list')],
|
||||
];
|
||||
@endphp
|
||||
|
||||
<header class="{{ $wrapperClass }}">
|
||||
<nav class="{{ $tabsClass }}" aria-label="频道导航">
|
||||
@foreach($tabs as $tab)
|
||||
<a class="channel-tab @if($active === $tab['key']) active @endif" href="{{ $tab['url'] }}">{{ $tab['label'] }}</a>
|
||||
@endforeach
|
||||
</nav>
|
||||
<div class="{{ $statusClass }}">{{ $statusLabel }} <b>{{ $statusValue }}</b></div>
|
||||
</header>
|
||||
Reference in New Issue
Block a user