@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="publicTitle">
                        <img src="{{ asset('assets/index/images/secondIcon_01.png') }}">{{ $category->title }}
                    </div>
                    <div class="learnTop">
                        <div class="ce-img learnTop-img">
                            <span style="background-image: url({{ $nghjxhArticle->cover_url }});"></span>
                        </div>
                        <div class="learnTop-cont">
                            <div class="learnTop-title">
                                <span>{{ $nghjxhArticle->title }}</span>
                                <a href="{{ $nghjxhArticle->link }}" class="learnTop-more"><span>查看更多</span></a>
                            </div>
                            <div class="learnTop-text">
                                {{ $nghjxhArticle->description }}
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 活动新闻列表 -->
                <div class="scientific">
                    <div class="learnNews">
                        <div class="learnNews-left"
                             style="background-image: url({{ asset('assets/index/images/learnNews_back.png') }});">
                            <div class="learnNews-left-name">{{ $xhdtCate->title }}</div>
                            <div class="learnNews-left-text">{{ $xhdtCate->description }}</div>
                            <a href="{{ $xhdtCate->link }}" class="learnNews-left-btn">
                                <span>+</span>
                                <div class="learnNews-left-more">查看更多 &gt;&gt;</div>
                            </a>
                        </div>
                        <div class="learnNews-right">
                            @if ($xhdtArticles->isNotEmpty())
                                <ul class="learnList">
                                    @foreach ($xhdtArticles as $relation)
                                        <li>
                                            <a href="{{ $relation->link }}">
                                                <div class="ce-img learnList-img">
                                                    <span style="background-image: url({{ $relation->cover_url }});"></span>
                                                </div>
                                                <div class="learnList-cont">
                                                    <div class="nowrap learnList-name">{{ $relation->title }}</div>
                                                    <div class="learnList-time">
                                                        发布时间：{{ $relation->created_at->format('Y-m-d') }}</div>
                                                    <div class="ellipsis learnList-text">
                                                        {{ $relation->description }}
                                                    </div>
                                                    <div class="learnList-more">了解详情 &gt;</div>
                                                </div>
                                            </a>
                                        </li>
                                    @endforeach
                                </ul>
                            @endif
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- end 内容 -->
@endsection
