@extends('layouts.app')

@section('meta')
    @include('meta.list')
@endsection

@section('content')
    <!-- 详情 -->
    <div class="details">
        <div class="contant">
            <div class="page-left">
                <div class="pagelist">
                    <h1>{{ $parent->title }}</h1>
                    <ul class="listbox">
                        @if ($parent->children->isNotEmpty())
                            @foreach ($parent->children as $children)
                                <li @if($category->id==$children->id) class="active" @endif>
                                    <a href="{{ $children->link }}">{{ $children->title }}</a>
                                </li>
                            @endforeach
                        @endif
                    </ul>
                </div>
            </div>
            <div class="page-right">
                <div class="pagelujing">
                    <div class="name">{{ $category->title }}</div>
                    <span>
                        您当前所在位置：<a href="/">首页</a> &gt;
                        @if ($category->id!=$parent->id)
                            <a href="{{ $parent->link }}">{{ $parent->title }}</a> &gt;
                        @endif
                        <a href="{{ $category->link }}">{{ $category->title }}</a>
                    </span>
                </div>
                <div class="news-txt ny mg-t-b">
                    <div class="news-con">
                        <ul class="newslist ny">
                            @if ($articles->isNotEmpty())
                                @foreach ($articles as $article)
                                    <li>
                                        <a href="{{ $article->link }}">{{ $article->title }}</a>
                                        <span>{{ $article->created_at->format('m-d') }}</span>
                                    </li>
                                @endforeach
                            @endif
                        </ul>
                        <div class="tcdPageCode">
                            @if ($articles->isNotEmpty())
                                {{ $articles->links('layouts.pagination') }}
                            @endif
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- end 详情 -->
@endsection
