@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="trends">
                    <div class="trendsNotice">
                        <div class="trendsTitle">
                            <img src="{{ asset('assets/index/images/newsIcon_1.png') }}">{{ $tzCate->title }}
                            <span>/  {{ $tzCate->description }}</span>
                            <a href="{{ $tzCate->link }}" class="trendsTitle-more">查看更多 +</a>
                        </div>
                        <ul class="noticeList">
                            @if($tzArticles->isNotEmpty())
                                @foreach($tzArticles as $article)
                                    <li>
                                        <a href="{{ $article->link }}">
                                            <div class="noticeList-time">
                                                <span>{{ $article->getDateD() }}</span>{{ $article->getDateYM() }}
                                            </div>
                                            <div class="noticeList-cont">
                                                <div class="nowrap noticeList-name">{{ $article->title }}</div>
                                                <div class="ellipsis noticeList-text">
                                                    {{ $article->description }}
                                                </div>
                                            </div>
                                        </a>
                                    </li>
                                @endforeach
                            @endif
                        </ul>
                    </div>
                </div>

                <!-- 能源院新闻 -->
                <div class="trends">
                    <div class="trendsNotice">
                        <div class="trendsTitle">
                            <img src="{{ asset('assets/index/images/newsIcon_2.png') }}">{{ $nyydtCate->title }}
                            <span>/  {{ $nyydtCate->description }}</span>
                            <a href="{{ $nyydtCate->link }}" class="trendsTitle-more">查看更多 +</a>
                        </div>
                        <ul class="pressList">
                            @if($nyydtArticles->isNotEmpty())
                                @foreach($nyydtArticles as $article)
                                    <li>
                                        <a href="{{ $article->link }}">
                                            <div class="ce-img pressList-img">
                                        <span style="background-image: url({{ $article->cover_url }});">
                                            <div class="pressList-time">
                                                <span>{{ $article->getDateD() }}</span><small>{{ $article->getDateYM() }}</small>
                                            </div>
                                        </span>
                                            </div>
                                            <div class="pressList-cont">
                                                <div class="nowrap pressList-name">{{ $article->title }}</div>
                                                <div class="ellipsis pressList-text">
                                                    {{ $article->description }}
                                                </div>
                                                <div class="pressList-more">查看详情
                                                    <img src="{{ asset('assets/index/images/pressArrow.png') }}">
                                                </div>
                                            </div>
                                        </a>
                                    </li>
                                @endforeach
                            @endif
                        </ul>
                    </div>
                </div>

                <!-- 媒体报道 -->
                <div class="trends">
                    <div class="trendsNotice">
                        <div class="trendsTitle">
                            <img src="{{ asset('assets/index/images/newsIcon_2.png') }}">{{ $mtbdCate->title }}
                            <span>/  {{ $mtbdCate->description }}</span>
                            <a href="{{ $mtbdCate->link }}" class="trendsTitle-more">查看更多 +</a>
                        </div>
                        <ul class="specialList">
                            @if($mtbdArticles->isNotEmpty())
                                @foreach($mtbdArticles as $article)
                                    <li>
                                        <a href="{{ $article->link }}">
                                            <div class="ce-img specialList-img">
                                                <span style="background-image: url({{ $article->cover_url }});"></span>
                                            </div>
                                            <div class="specialList-cont">
                                                <div class="specialList-name">
                                                    <span class="specialList-title">标 题：</span>
                                                    <span class="ellipsis specialList-text">{{ $article->title }}</span>
                                                </div>
                                                <div class="specialList-name">
                                                    <span class="specialList-title">时 间：</span>
                                                    <span class="specialList-text specialList-time">{{ $article->created_at->format('Y-m-d') }}</span>
                                                </div>
                                            </div>
                                        </a>
                                    </li>
                                @endforeach
                            @endif
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- end 内容 -->
@endsection
