优化功能
Some checks failed
Tests / PHP 8.2 (push) Has been cancelled
Tests / PHP 8.3 (push) Has been cancelled
Tests / PHP 8.4 (push) Has been cancelled

This commit is contained in:
jiangdong.cheng
2026-02-12 17:10:36 +08:00
parent 56c685b579
commit a795b2c896
29 changed files with 2155 additions and 884 deletions

View File

@@ -998,6 +998,46 @@
<body class="@yield('page_class', 'page-home')">
<a class="skip-link" href="#main-content">跳到主内容</a>
@php
$topNavItems = [
['route' => 'tools.index', 'label' => 'AI工具集'],
['route' => 'models.index', 'label' => '模型推荐'],
['route' => 'news.index', 'label' => '文章资讯'],
['route' => 'guides.index', 'label' => '教程学习'],
['route' => 'tools.list', 'label' => '工具列表'],
];
@endphp
<header class="site-header" aria-label="全站顶部导航">
<div class="container d-flex align-items-center justify-content-between gap-3 py-2">
<a class="brand-link" href="{{ route('home') }}">
<span class="brand-mark">AI</span>
<span>AIWeb</span>
</a>
<nav class="site-nav d-none d-lg-flex" aria-label="主菜单">
@foreach($topNavItems as $item)
<a class="site-nav-link @if(request()->routeIs($item['route'])) active @endif" href="{{ route($item['route']) }}">{{ $item['label'] }}</a>
@endforeach
</nav>
<a class="admin-entry d-none d-lg-inline-flex" href="{{ route('admin.login') }}">
<i class="bi bi-speedometer2 me-1"></i>后台
</a>
</div>
<div class="mobile-nav d-lg-none">
<div class="container d-flex flex-wrap gap-2 py-2">
@foreach($topNavItems as $item)
<a class="site-nav-link @if(request()->routeIs($item['route'])) active @endif" href="{{ route($item['route']) }}">{{ $item['label'] }}</a>
@endforeach
<a class="admin-entry" href="{{ route('admin.login') }}">
<i class="bi bi-speedometer2 me-1"></i>后台
</a>
</div>
</div>
</header>
<main id="main-content" class="page-main" tabindex="-1">
<div class="container">
@yield('content')