@extends('layouts.app')

@section(section: 'content')
<div class="container">
    @if($tags->isEmpty())
        <p>등록된 태그가 없습니다.</p>
    @else
        <div id="tags">
            @foreach($tags as $tag)
                <button class="tag-nav-link" data-name="{{ $tag->name }}">
                    {{ $tag->name }} ({{ $tag->count }})
                </button>
            @endforeach
        </div>
        <hr/>
        <div id="posts" class="list-group list-group-flush">
            <div class="text-center my-4">태그를 선택하면 게시글이 조회됩니다.</div>
        </div>
        <div id="pagination"></div>
    @endif
</div>
@endsection

@push('styles')
    <link rel="stylesheet" href="{{ asset('css/desktop/board/tag.css') }}"/>
@endpush

@push('scripts')
    <script src="{{ asset('js/board/tag.js') }}" defer></script>
@endpush
