<header class="m-header">
    <div class="m-container">
        <a href="{{ route('home') }}" class="m-logo">{{ $siteName }}</a>
        <nav class="m-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>
            <form class="m-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>
                <form action="{{ route('logout') }}" method="post" class="inline-form">
                    @csrf
                    <button type="submit" class="m-link-btn">退出</button>
                </form>
            @else
                <a href="{{ route('login') }}">登录</a>
                <a href="{{ route('register') }}">注册</a>
            @endauth
        </nav>
    </div>
</header>
@stack('theme:header')
