@extends('main')
@section('title', 'Новости')
@section('content')
    <div class="col-md-10 col-md-offset-1">
        <div class="emptyrow hidden-sm"></div>

        @foreach($news as $record)
            <div class="media" id="{{ $record['id'] }}">
                <div class="media-left media-top hidden-xs">
                    <a target="_blank" href="{{ $record['author_link'] }}">
                        <img width=100 class="media-object" src="{{ $record['img_src'] }}" alt="image"></a>
                    <span class="mday">{{ $record['day'] }}</span>/{{ $record['month'] }} {{ $record['time'] }}
                </div>
                <div class="media-body">
                    <div class="newsHeader"><h4 class="media-heading">
                            <a target="_blank" href="{{ $record['author_link'] }}">{{ $record['header'] }}</a></h4>
                    </div>
                    <div class="newsBody">
                        <div id="shortArticle">{!! $record['body1'] !!}</div>
                        <div id="longArticle{{ $record['id'] }}" class="collapse" aria-expanded="false">{!! $record['body2'] !!}</div>
                        <div class="newsFooter">
                            <a target="_blank" href="{{ $record['article_link'] }}">Читать Вконтакте</a>
                            <a class="readMode" data-toggle="collapse" href="#longArticle{{ $record['id'] }}">Показать
                                полностью....</a>
                        </div>
                    </div>
                </div>
                <hr>
            </div>
        @endforeach
        <div class="emptyrow hidden-xs"></div>
    </div>
@endsection

@section('breadcrump')
    <ol class="breadcrumb bread">
        <li><a href="/news" class="breadcrumb-item">Новости</a></li>
    </ol>
@endsection
