@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; {{ $category->title }}
                </div>

                <!-- 列表页 -->
                <div class="noGraph">
                    @if ($articles->isNotEmpty())
                        <ul class="GraphList">
                            @foreach ($articles as $relation)
                                <li>
                                    <a href="{{ $relation->link }}">
                                        <div class="ce-img GraphList-img">
                                            <span style="background-image: url({{ $relation->cover_url }});"></span>
                                        </div>
                                        <div class="GraphList-cont">
                                            <div class="nowrap GraphList-name">{{ $relation->title }}</div>
                                            <div class="ellipsis GraphList-text">
                                                {{ $relation->description }}
                                            </div>
                                            <div class="GraphList-time">
                                                <span> {{ $relation->created_at->format('Y-m-d') }}</span>
                                                <div class="GraphList-more">了解详情
                                                    <img src="{{ asset('assets/index/images/linkIcon.png') }}" alt="">
                                                </div>
                                            </div>
                                        </div>
                                    </a>
                                </li>
                            @endforeach
                        </ul>
                        <!-- 分页 -->
                        <div class="pageUl">
                            @if ($articles->isNotEmpty())
                                {{ $articles->links('layouts.pagination') }}
                            @endif
                        </div>
                    @else
                        @include('layouts.empty')
                    @endif
                </div>
            </div>
        </div>
    </div>
    <!-- end 内容 -->
@endsection
