优化功能
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user