@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="partyActivity">
                        <div class="party-title">
                            <span>{{ getOneCategory(60,'title') }}</span>
                            <div class="party-title-more" data-href="{{ getOneCategory(60,'link') }}">更多&gt;&gt;</div>
                        </div>
                        <div class="row">
                            @if (getArticlesBYCate(60,3)->isNotEmpty())
                                @foreach (getArticlesBYCate(60,3) as $info)
                                    <div class="col-xs-12 col-md-12">
                                        <div class="partyActivity-label">
                                            <div class="ce-img partyActivity-img">
                                                <!-- 图片比例4:3 -->
                                                <span style="background-image: url({{ $info->cover_url }});"></span>
                                            </div>
                                            <div class="partyActivity-cont">
                                                <div class="ce-nowrap partyActivity-cont-name">{{ $info->title }}</div>
                                                <div class="partyActivity-cont-time">{{ $info->created_at->toDateString() }}</div>
                                                <div class="ce-nowrap-multi partyActivity-cont-text">
                                                    {{ $info->description }}
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                @endforeach
                            @endif
                        </div>
                    </div>
                    <!-- end 党团活动 -->

                    <!-- start 精神文明建设 -->
                    <div class="partyBuild briefMargin">
                        <div class="party-title">
                            <span>{{ getOneCategory(61,'title') }}</span>
                            <div class="party-title-more" data-href="{{ getOneCategory(61,'link') }}">更多&gt;&gt;</div>
                        </div>
                        <div class="row">
                            @if (getArticlesBYCate(61,3)->isNotEmpty())
                                @foreach (getArticlesBYCate(61,3) as $info)
                                    @if($loop->iteration==1)
                                        <div class="col-xs-12 col-md-5">
                                            <div class="publicHover partyBuild-left">
                                                <div class="ce-img partyBuild-left-img">
                                                    <!-- 图片比例4:3 -->
                                                    <span style="background-image: url({{ $info->cover_url }});"></span>
                                                </div>
                                                <div class="partyBuild-left-cont">
                                                    <div class="partyBuild-left-time">
                                                        {{ dateLocalMonth($info->created_at->format('m')) }}
                                                        <span>{{ $info->created_at->format('d') }}</span>
                                                    </div>
                                                    <div class="ce-nowrap partyBuild-left-name">{{ $info->title }}</div>
                                                    <div class="ce-nowrap-multi partyBuild-left-text">
                                                        {{ $info->description }}
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    @endif

                                @endforeach
                            @endif
                            <div class="col-xs-12 col-md-7">
                                <div class="partyBuild-right">
                                    @if (getArticlesBYCate(61,3)->isNotEmpty())
                                        @foreach (getArticlesBYCate(61,3) as $info)
                                            @if($loop->iteration>1)
                                                <div class="publicHover partyBuild-label">
                                                    <div class="ce-nowrap-multi partyBuild-right-time">
                                                        {{ dateLocalMonth($info->created_at->format('m')) }}
                                                        <span>{{ $info->created_at->format('d') }}</span>
                                                    </div>
                                                    <div class="ce-nowrap-multi partyBuild-right-name">
                                                        {{ $info->title }}
                                                    </div>
                                                </div>
                                            @endif
                                        @endforeach
                                    @endif
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- end 精神文明建设 -->

                    <!-- start 党建风采视频 -->
                    <div class="partyVideo">
                        <div class="party-title">
                            <span>{{ getOneCategory(62,'title') }}</span>
                            <div class="party-title-more" data-href="{{ getOneCategory(62,'link') }}">更多&gt;&gt;</div>
                        </div>
                        <div class="partyVideo-cont">
                            <div class="row">
                                <div class="col-xs-12 col-md-8 partyVideo-padding">
                                    <div class="partyVideo-video">
                                        <video width="100%" height="100%" controls=""
                                               src="{{ getVideoByCate(62,'link_url') }}"
                                               poster="{{ getVideoByCate(62,'cover_url') }}"
                                               style="object-fit: fill;">

                                        </video>
                                    </div>
                                </div>
                                <div class="col-xs-12 col-md-4 partyVideo-padding">
                                    <div class="partyVideo-text"
                                         style="background-image: url(/assets/index/images/partyVide_back.jpg);">
                                        <span>{{ getOneCategory(62,'title') }}</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- end 党建风采视频 -->
                </div>
            </div>
        </div>
    </div>
@endsection

