Let admin and editor open /admin in a new tab from the public header and profile, so they can jump to the backend without leaving the site. Co-authored-by: Cursor <cursoragent@cursor.com>
28 lines
1.5 KiB
PHP
28 lines
1.5 KiB
PHP
<header class="d-header">
|
|
<div class="d-container">
|
|
<a href="{{ route('home') }}" class="d-logo">{{ $siteName }}</a>
|
|
<nav class="d-nav">
|
|
<a href="{{ route('home') }}" class="{{ request()->routeIs('home') ? 'active' : '' }}">首页</a>
|
|
<a href="{{ route('archives') }}" class="{{ request()->routeIs('archives*') ? 'active' : '' }}">归档</a>
|
|
<a href="{{ route('tags') }}" class="{{ request()->routeIs('tags*') ? 'active' : '' }}">标签</a>
|
|
<a href="{{ route('links') }}" class="{{ request()->routeIs('links') ? 'active' : '' }}">友链</a>
|
|
@include('partials.feed-links')
|
|
<form class="d-search" action="{{ route('search') }}" method="get">
|
|
<input type="search" name="q" placeholder="搜索..." value="{{ request('q', request('keyword', '')) }}">
|
|
</form>
|
|
@auth
|
|
<a href="{{ route('profile') }}">{{ auth()->user()->name }}</a>
|
|
@include('partials.admin-link')
|
|
<form action="{{ route('logout') }}" method="post" class="inline-form">
|
|
@csrf
|
|
<button type="submit" class="d-link-btn">退出</button>
|
|
</form>
|
|
@else
|
|
<a href="{{ route('login') }}">登录</a>
|
|
<a href="{{ route('register') }}">注册</a>
|
|
@endauth
|
|
</nav>
|
|
</div>
|
|
</header>
|
|
@include('partials.theme-inject', ['point' => 'header'])
|