@extends('layouts.app')

@section('title', $parent->title)

@section('content')
    <!-- 面包屑导航 -->
    @include('category.navigation')

    <!-- 内容 -->
    <div class="container">
        <div class="row">
            <!-- 左侧导航部分 -->
        @include('category.left')
        <!-- 右侧内容部分 -->
            <div class="col-xs-12 col-md-9">
                <div class="levelRight">
                    <!-- start 科研动态 -->
                    <div class="srRrends briefMargin">
                        <div class="srTitle">
                            <div class="srTitle-name">
                                <img src="/assets/index/images/srIcon/srTitle_1.png"/>
                                {{ getOneCategory(17,'title') }}
                                <div class="party-title-more" data-href="{{ getOneCategory(17,'link') }}">更多&gt;&gt;
                                </div>
                            </div>
                        </div>
                        <ul class="srRrends-list">
                            @if (getArticlesBYCate(17,3)->isNotEmpty())
                                @foreach (getArticlesBYCate(17,3) as $info)
                                    <li data-href="{{ $info->link }}" class="publicHover">
                                        <div class="ce-img srRrends-list-img">
                                            <!-- 图片为4:3 -->
                                            <span style="background-image: url({{ $info->cover_url }});"></span>
                                        </div>
                                        <div class="srRrends-list-cont">
                                            <div class="srRrends-list-time">
                                                <span>{{ $info->created_at->format('d') }}</span>
                                                {{ $info->created_at->format('Y年m月') }}
                                            </div>
                                            <div class="srRrends-list-text">
                                                <div class="ce-nowrap-multi srRrends-list-name">
                                                    {{ $info->title }}
                                                </div>
                                                <div class="ce-nowrap-multi srRrends-list-tips">
                                                    {{ $info->description }}
                                                </div>
                                            </div>
                                        </div>
                                    </li>
                                @endforeach
                            @endif
                        </ul>
                    </div>
                    <!-- end 科研动态 -->

                    <!-- start 特色品牌建设 -->
                    <div class="srBuild briefMargin">
                        <div class="srTitle">
                            <div class="srTitle-name">
                                <img src="/assets/index/images/srIcon/srTitle_2.png"/>
                                {{ getOneCategory(18,'title') }}
                            </div>
                        </div>
                        <div class="srBuild-cont">
                            <div id="myTabContent" class="tab-content srBuildContent">
                                <!-- 第一页列表 1~5 -->
                                @if (getArticlesBYCate(18,10)->isNotEmpty())
                                    @foreach (getArticlesBYCate(18,10)->chunk(5) as $articles)
                                        <div role="tabpanel"
                                             class="tab-pane fade in @if($loop->iteration==1) active @endif"
                                             id="srBuildTab0{{ $loop->iteration }}">
                                            <div class="row">
                                                @foreach($articles as $article)
                                                    @if($loop->iteration==1)
                                                        <div class="col-md-4 col-xs-12 srBuildFrist-padding">
                                                            <div class="ce-img srBuildFrist-back"
                                                                 style="background-image: url({{ $article->cover_url }});">
                                                                <div class="srBuildFrist-cont"
                                                                     data-href="{{ $article->link }}">
                                                                    <img class="srBuildFrist-logo"
                                                                         src="/assets/index/images/srIcon/srBuildLogo.png"/>
                                                                    <div class="ce-nowrap srBuildFrist-name">
                                                                        {{ $article->title }}
                                                                    </div>
                                                                    <div class="ce-nowrap-multi srBuildFrist-text">
                                                                        {{ $article->description }}
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    @endif
                                                    @if($loop->iteration==2)
                                                        <div class="col-md-8 col-xs-12">
                                                            <div class="row">
                                                                @endif

                                                                @if($loop->iteration>1)
                                                                    <div class="col-md-6 col-xs-12 srBuildFrist-padding">
                                                                        <div class="ce-img srBuildOther-back"
                                                                             style="background-image: url({{ $article->cover_url }});">
                                                                            <img class="srBuildOther-logo"
                                                                                 src="/assets/index/images/srIcon/srBuildLogo.png"/>
                                                                            <div class="srBuildOther-cont"
                                                                                 data-href="{{ $article->link }}">
                                                                                <div class="ce-nowrap srBuildOther-name">
                                                                                    {{ $article->title }}
                                                                                </div>
                                                                                <div class="ce-nowrap-multi srBuildOther-text">
                                                                                    {{ $article->description }}
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                @endif

                                                                @if($loop->last)
                                                            </div>
                                                        </div>
                                                    @endif
                                                @endforeach
                                            </div>
                                        </div>
                                    @endforeach
                                @endif
                            </div>

                            <!-- 切换按钮 -->
                            <div class="srBuildTab">
                                <ul id="myTabs" class="srBuildTab-ul" role="tablist">
                                    <li role="presentation" class="active">
                                        <a href="#srBuildTab01" id="srBuildTab-01" role="tab"
                                           data-toggle="tab">
                                            <img src="/assets/index/images/srIcon/srBuildRow-left.png"/>
                                        </a>
                                    </li>
                                    <li role="presentation" class="">
                                        <a href="#srBuildTab02" id="srBuildTab-02" role="tab"
                                           data-toggle="tab">
                                            <img src="/assets/index/images/srIcon/srBuildRow-right.png"/>
                                        </a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- end 特色品牌建设 -->

                <!-- start 科研成果 -->
                <div class="srGain">
                    <div class="srTitle">
                        <div class="srTitle-name">
                            <img src="/assets/index/images/srIcon/srTitle_3.png"/>
                            {{ getOneCategory(19,'title') }}

                        </div>
                    </div>
                    <div class="row">
                        @if(getCateChild(19)->isNotEmpty())
                            @foreach(getCateChild(19) as $cate)
                                <div class="col-xs-12 col-md-4">
                                    <div class="srGain-list"
                                         style="background-image: url(/assets/index/images/srIcon/srGain_back.png);">
                                        <div class="srGain-list-name">
                                            <img src="{{ $cate->logo_url }}"/>
                                            {{ $cate->title }}
                                            <span>{{ $cate->alias }}</span>
                                        </div>
                                        <div class="srGain-list-more" data-href="{{ $cate->link }}">
                                            MORE+
                                        </div>
                                    </div>
                                </div>
                            @endforeach
                        @endif
                    </div>
                </div>
                <!-- end 科研成果 -->

                <!-- start 合作与交流 -->
                <div class="srCooperation briefMargin">
                    <div class="srTitle">
                        <div class="srTitle-name">
                            <img src="/assets/index/images/srIcon/srTitle_4.png"/>
                            {{ getOneCategory(26,'title') }}
                        </div>
                    </div>
                    <!-- 概况部分 -->
                    <div class="srSurvey">
                        <div class="row">
                            <div class="col-xs-12 col-md-6">
                                <div class="ce-img srCooperation-back">
                                    <span style="background-image: url(/assets/index/images/facade.jpg);"></span>
                                    <img class="srCooperation-img"
                                         src="/assets/index/images/srIcon/srCooperation_img.png"/>
                                </div>
                            </div>
                            <div class="col-xs-12 col-md-6">
                                <div class="srCooperation-name">概况</div>
                                <div class="ce-nowrap-multi srCooperation-text">
                                    {{ getOneCategory(26,'description') }}
                                </div>
                                <div class="srCooperation-more" data-href="{{ getOneCategory(26,'link') }}">
                                    了解更多
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- 动态部分 -->
                    <div class="srCooperationNew">
                        <div class="srCooperationNew-top"><span>动态</span></div>
                        <div class="row">
                            <div class="col-xs-12 col-md-6">
                                @if (getArticlesBYCate(26,1)->isNotEmpty())
                                    @foreach (getArticlesBYCate(26,1) as $info)
                                        @if($loop->iteration==1)
                                            <div class="srCooperationNew-left" data-href="{{ $info->link }}">
                                                <div class="ce-img srCooperationNew-img">
                                                    <!-- 图片为2:1 -->
                                                    <span style="background-image: url({{ $info->cover_url }});"></span>
                                                </div>
                                                <div class="ce-nowrap-multi srCooperationNew-name">
                                                    {{ $info->title }}
                                                </div>
                                                <div class="ce-nowrap-multi srCooperationNew-text">
                                                    {{ $info->description }}
                                                </div>
                                            </div>
                                        @endif
                                    @endforeach
                                @endif

                            </div>
                            <div class="col-xs-12 col-md-6">
                                <ul class="srCooperationNew-right">
                                    @if (getArticlesBYCate(26,7)->isNotEmpty())
                                        @foreach (getArticlesBYCate(26,7) as $info)
                                            <li data-href="" class="publicHover">
                                                <div class="ce-nowrap srCooperationNew-title">{{ $info->title }}</div>
                                                <div class="srCooperationNew-time">{{ $info->created_at->format('Y-m-d')}}</div>
                                            </li>
                                        @endforeach
                                    @endif
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- end 合作与交流 -->

                <!-- start 政府决策服务 -->
                <div class="srServe">
                    <div class="srTitle">
                        <div class="srTitle-name">
                            <img src="/assets/index/images/srIcon/srTitle_5.png"/>
                            {{ getOneCategory(27,'title') }}
                        </div>
                        <div class="srTitle-more" data-href="{{ getOneCategory(27,'link') }}">
                            查看更多&nbsp; &gt;
                        </div>
                    </div>
                    <div class="row">
                        @if (getArticlesBYCate(27,4)->isNotEmpty())
                            @foreach (getArticlesBYCate(27,4) as $info)
                                <div class="col-xs-12 col-md-6">
                                    <div data-href="{{ $info->link }}" class="srServe-list">
                                        <div class="ce-img srServe-list-img">
                                            <span style="background-image: url({{ $info->cover_url }});"></span>
                                        </div>
                                        <div class="srServe-list-cont">
                                            <div class="ce-nowrap srServe-list-name">{{ $info->title }}</div>
                                            <div class="srServe-list-time">{{ $info->created_at->format('Y-m-d') }}</div>
                                        </div>
                                    </div>
                                </div>
                            @endforeach
                        @endif
                    </div>
                </div>
                <!-- end 政府决策服务 -->

                <!-- start 科学传播 -->
                <div class="srSpread briefMargin">
                    <div class="srTitle">
                        <div class="srTitle-name">
                            <img src="/assets/index/images/srIcon/srTitle_6.png"/>
                            {{ getOneCategory(28,'title') }}
                        </div>
                    </div>
                </div>
                <!-- end 科学传播 -->
                <div class="row">
                    <div class="col-xs-12 col-md-7">
                        <div class="srSpread-video">
                            <div class="srSpread-video-title"
                                 style="background-image: url(/assets/index/images/srIcon/srSpread_back_01.png);">
                                <div class="srSpread-video-name">{{ getOneCategory(29,'title') }}</div>
                                <div class="srSpread-video-more" data-href="{{ getOneCategory(29,'link') }}">
                                    查看更多&gt;&gt;
                                </div>
                            </div>
                            <div class="srSpread-video-cont">
                                <div class="srSpread-video-paly">
                                    @if(getVideoByCate(29))
                                        <video width="100%" height="100%" controls=""
                                               src="{{ getVideoByCate(29,'link_url') }}"
                                               poster="{{ getVideoByCate(29,'cover_url') }}"
                                               style="object-fit: fill;">
                                        </video>
{{--                                        <img class="srSpread-video-icon"--}}
{{--                                             src="/assets/index/images/srIcon/srSpread_icon.png"/>--}}
                                    @endif

                                </div>
                                <div class="srSpread-video-cont-title">
                                    {{ getVideoByCate(29,'title') }}
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-xs-12 col-md-5">
                        <div class="srSpread-atlas">
                            <div class="srSpread-atlas-title"
                                 style="background-image: url(/assets/index/images/srIcon/srSpread_back_00.png);">
                                {{ getOneCategory(30,'title') }}
                            </div>
                            <ul class="srSpread-atlas-list">

                                @if (getArticlesBYCate(30,2)->isNotEmpty())
                                    @foreach (getArticlesBYCate(30,2) as $info)
                                        <li data-href="{{ $info->link }}">
                                            <div class="ce-img srSpread-atlas-img">
                                                <!-- 图片为2:1 -->
                                                <span style="background-image: url({{ $info->cover_url }});"></span>
                                            </div>
                                            <div class="srSpread-atlas-name">{{ $info->title }}</div>
                                        </li>
                                    @endforeach
                                @endif
                            </ul>
                            <div class="srSpread-atlas-more" data-href="{{ getOneCategory(30,'link') }}">
                                <span>查看更多&gt;</span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection

