@extends('layouts.app')

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

@section('content')
    <!-- 内容 -->
    <div class="second">
        <div class="container">

            @include('category.left')

            <div class="secondRight">
                <div class="crumbs">
                    当前位置： 首页 &gt; {{ $parent->title }} &gt; {{ $category->title }}
                </div>

                <!-- 内设机构 -->
                <div class="organ">
                    <div class="organBrief">
                        <div class="organBrief-title">{{ $category->title }}</div>
                        @if ($articles->isNotEmpty())
                            <ul class="insideList">
                                @foreach ($articles as $relation)
                                    @if($loop->iteration<4)
                                        <li>
                                            <a href="{{ $relation->link }}">
                                                <img class="insideList-img" src="{{ $relation->cover_url }}" alt="">
                                                <div class="insideList-name">{{ $relation->title }}</div>
                                            </a>
                                        </li>
                                    @endif
                                @endforeach
                            </ul>
                            @if($articles->count()>3)
                                <ul class="versionList">
                                    @foreach ($articles as $relation)
                                        @if($loop->iteration>3)
                                            <li>
                                                <a href="{{ $relation->link }}">
                                                    <img class="versionList-img" src="{{ $relation->cover_url }}"
                                                         alt="">
                                                    <div class="versionList-name">{{ $relation->title }}</div>
                                                </a>
                                            </li>
                                        @endif
                                    @endforeach
                                </ul>
                            @endif
                        @else
                            @include('layouts.empty')
                        @endif
                    </div>
                </div>
            </div>
        </div>
        <!-- end 内容 -->
@endsection
