<?php
if(!isset($limit)){
    $limit = 8;
}
?>
<div class="ub-list-items">
    <div class="row">
        @foreach(\Module\News\Util\NewsUtil::listLatest($limit) as $record)
            <div class="col-md-3 col-6">
                <div class="item-e ub-bg-white margin-top">
                    <a class="cover" href="{{$__msRoot}}news/{{$record['id']}}"
                       style="background-image: url({{\ModStart\Core\Assets\AssetsUtil::fix($record['cover'])}});"></a>
                    <a class="title ub-text-cent er" href="{{$__msRoot}}news/{{$record['id']}}">{{$record['title']}}</a>
                    <div class="summary">{{$record['summary']}}</div>
                </div>
            </div>
        @endforeach
    </div>
</div>
