@extends('layouts.app')


@section('content')

    <!-- 新闻动态 -->
    <div class="survey" style="background-image: url(/assets/index/images/newsBack.png);">
        <div class="container">
            <div class="row">
                @include('category.left')
                <div class="col-xs-12 col-md-9 secondRight">
                    <!-- 分院新闻 -->
                    <div class="surveyCont">
                        <div class="secondTop">
                            <div class="secondTop-name">
                                <img src="/assets/index/images/newsIcon_00.png"/>
                                {{ getOneCategory(7,'title') }}
                            </div>
                        </div>
                        <ul class="newBranch">
                            @if (getArticlesBYCate(7,4)->isNotEmpty())
                                @foreach (getArticlesBYCate(7,4) as $article)
                                    <li>
                                        <a href="{{ $article->link }}" target="_blank">
                                            <div class="ce-img newBranch-img">
                                                {{--                                                <span style="background-image: url({{ $article->cover_path }});"></span>--}}
                                            </div>
                                            <div class="newBranch-cont" style="padding-left: 0">
                                                <div class="newBranch-time">
                                                    <span>{{ $article->created_at->format('d') }}</span>
                                                    {{ $article->created_at->format('Y/m') }}
                                                </div>
                                                <div class="newBranch-text">
                                                    <div class="ce-nowrap newBranch-name">
                                                        {{ $article->title }}
                                                    </div>
                                                    <div class="ce-nowrap-multi newBranch-tips">
                                                        {{ $article->description }}
                                                    </div>
                                                </div>
                                            </div>
                                        </a>
                                    </li>
                                @endforeach
                            @endif
                        </ul>
                        <div class="secondMore">
                            <a href="{{ getOneCategory(7,'link') }}" target="_blank">查看更多&gt;</a>
                        </div>
                    </div>

                    <!-- 媒体报道 -->
                    <div class="surveyCont">
                        <div class="secondTop">
                            <div class="secondTop-name">
                                <img src="/assets/index/images/newsIcon_00.png"/>
                                {{ getOneCategory(17,'title') }}
                            </div>
                        </div>
                        <ul class="newBranch">
                            @if (getArticlesBYCate(17,4)->isNotEmpty())
                                @foreach (getArticlesBYCate(17,4) as $article)
                                    <li>
                                        <a href="{{ $article->link }}" target="_blank">
                                            <div class="ce-img newBranch-img">
                                                {{--                                                <span style="background-image: url({{ $article->cover_path }});"></span>--}}
                                            </div>
                                            <div class="newBranch-cont" style="padding-left: 0">
                                                <div class="newBranch-time">
                                                    <span>{{ $article->created_at->format('d') }}</span>
                                                    {{ $article->created_at->format('Y/m') }}
                                                </div>
                                                <div class="newBranch-text">
                                                    <div class="ce-nowrap newBranch-name">
                                                        {{ $article->title }}
                                                    </div>
                                                    <div class="ce-nowrap-multi newBranch-tips">
                                                        {{ $article->description }}
                                                    </div>
                                                </div>
                                            </div>
                                        </a>
                                    </li>
                                @endforeach
                            @endif
                        </ul>
                        <div class="secondMore">
                            <a href="{{ getOneCategory(17,'link') }}" target="_blank">查看更多&gt;</a>
                        </div>
                    </div>

                    <!-- 获得奖项 -->
                    <div class="surveyCont">
                        <div class="secondTop">
                            <div class="secondTop-name">
                                <img src="/assets/index/images/surveyIcon_01.png"/>
                                {{ getOneCategory(10,'title') }}
                            </div>
                        </div>
                        <div class="swiper-container newPrize-swiper">
                            <div class="swiper-wrapper">
                                @if (getArticlesBYCate(10,8)->isNotEmpty())
                                    @foreach (getArticlesBYCate(10,8) as $article)
                                        <div class="swiper-slide indexPrize-ul" data-href="{{ $article->link }}">
                                            <div class="ce-img indexPrize-img">
                                                <span style="background-image: url({{ $article->cover_path }});"></span>
                                            </div>
                                            <div class="ce-nowrap indexPrize-title">
                                                {{ $article->title }}
                                            </div>
                                        </div>
                                    @endforeach
                                @endif
                            </div>
                            <!-- Add Pagination -->
                            <div class="swiper-pagination newPrize-pagination"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection
@push('script')
    <script type="text/javascript">
        // 获得奖项
        var mySwiper = new Swiper('.newPrize-swiper', {
            pagination: '.newPrize-pagination',
            slidesPerView: 3,
            paginationClickable: true,
            spaceBetween: 30,
            autoplay: 2000
        });
    </script>
@endpush
