@php $pageTitle = '搜索 - '.$siteName; @endphp
@include('partials.head')
<body>
@include('partials.header')
<div id="page">
<div id="content">
    <h1 class="list-title">搜索：{{ $keyword ?: '全部' }}</h1>
    <form action="{{ route('search') }}" method="get" class="search-form">
        <input type="search" name="q" value="{{ $keyword }}" placeholder="输入关键词搜索文章">
        <button type="submit" class="btn">搜索</button>
    </form>

    @forelse($posts as $post)
        @include('partials.post-card', ['post' => $post])
    @empty
        <div class="empty">没有找到相关文章</div>
    @endforelse

    @include('partials.pagination', ['paginator' => $posts])
</div>
@include('partials.sidebar')
</div>{{-- #page --}}
@include('partials.footer')
@stack('theme:body_end')
</body>
</html>
