@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="scientific">
                    <div class="scientificTitle">
                        <img src="{{ asset('assets/index/images/scientificicon_01.png') }}"> {{ $cgCate->title }}
                        <a href=" {{ $cgCate->link }}" class="scientific-more">查看更多
                            <img src="{{ asset('assets/index/images/linkIcon.png') }}">
                        </a>
                    </div>
                    <ul class="gainList">
                        @if($cgArticles->isNotEmpty())
                            @foreach($cgArticles as $article)
                                <li>
                                    <a href="{{ $article->link }}">
                                        <div class="ce-img gainList-img">
                                            <span style="background-image: url({{ $article->cover_url }});"></span>
                                        </div>
                                        <div class="gainList-cont">
                                            <div class="gainList-time">
                                                <span>{{ $article->created_at->format('d') }}</span>/ {{ $article->created_at->format('Y-m') }}
                                            </div>
                                            <div class="nowrap gainList-name">{{ $article->title }}</div>
                                            <div class="ellipsis gainList-text">
                                                {{ $article->description }}
                                            </div>
                                            <div class="gainList-more">了解详情
                                                <img src="{{ asset('assets/index/images/gainListArrow.png') }}">
                                            </div>
                                        </div>
                                    </a>
                                </li>
                            @endforeach
                        @endif
                    </ul>
                </div>

                <!-- 获奖 -->
                <div class="scientific">
                    <div class="scientificTitle">
                        <img src="{{ asset('assets/index/images/scientificicon_02.png') }}"> {{ $hjCate->title }}
                        <a href=" {{ $hjCate->link }}" class="scientific-more">查看更多
                            <img src="{{ asset('assets/index/images/linkIcon.png') }}">
                        </a>
                    </div>
                    <ul class="awardList">
                        @if($hjArticles->isNotEmpty())
                            @foreach($hjArticles as $article)
                                <li>
                                    <a href="{{ $article->link }}">
                                        <div class="awardList-cont">
                                            <div class="awardList-time">
                                                <span>{{ $article->created_at->format('d') }}</span> {{ $article->created_at->format('Y-m') }}
                                            </div>
                                            <div class="awardList-title">
                                                <div class="nowrap awardList-name">{{ $article->title }}</div>
                                                <div class="ellipsis awardList-text">
                                                    {{ $article->description }}
                                                </div>
                                            </div>
                                        </div>
                                        <div class="ce-img awardList-img">
                                            <span style="background-image: url({{ asset('assets/index/temporary/img5.png') }});"></span>
                                        </div>
                                    </a>
                                </li>
                            @endforeach
                        @endif
                    </ul>
                </div>

                <!-- 专利论文 -->
                <div class="scientific">
                    <div class="scientificTitle">
                        <img src="{{ asset('assets/index/images/scientificicon_03.png') }}"> {{ $zlCate->title }}
                        <a href=" {{ $zlCate->link }}" class="scientific-more">查看更多
                            <img src="{{ asset('assets/index/images/linkIcon.png') }}">
                        </a>
                    </div>
                    <div class="patent">
                        @if($zlArticles->isNotEmpty())
                            @foreach($zlArticles as $article)
                                @if($loop->iteration==1)
                                    <div class="patentTop">
                                        <div class="patentTop-time">
                                            <span>{{ $article->created_at->format('d') }}</span> {{ $article->created_at->format('Y-m') }}
                                        </div>
                                        <div class="patentTop-cont">
                                            <div class="nowrap patentTop-name"> {{ $article->title }}</div>
                                            <div class="nowrap patentTop-text"> {{ $article->description }}</div>
                                        </div>
                                    </div>
                                @endif
                            @endforeach
                        @endif

                        <ul class="patentList">
                            @if($zlArticles->isNotEmpty())
                                @foreach($zlArticles as $article)
                                    @if($loop->iteration>1)
                                        <li>
                                            <a href="{{ $article->link }}">
                                                <div class="nowrap patentList-name"> {{ $article->title }}</div>
                                                <div class="patentList-time"> {{ $article->created_at->format('Y-m-d') }}</div>
                                            </a>
                                        </li>
                                    @endif
                                @endforeach
                            @endif

                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- end 内容 -->
@endsection

