
<?php if ( ! (count($lastFeaturestop)==0)): ?>

<section class="headline hide-phone">
    <div class="global-container container" style="padding-top:0 !important;">
        <?php if($cat== true): ?>
            <div class="clearfix">
                <h1 style="float:left;margin:5px 0"><?php echo e(trans('index.'.$category->name_slug) == 'index.'.$category->name_slug ? $category->name :  trans('index.'.$category->name_slug)); ?>  <small style="color:#e1e1e1">|</small></h1>

                <?php foreach(\App\Categories::where('type', $category->id)->orderBy('name')->groupBy('name')->get() as $cat): ?>

                    <a style="float:left;font-size:16px;margin-left:10px;margin-top:18px;color:#999;" data-type="<?php echo e($cat->name_slug); ?>" href="/<?php echo e($cat->name_slug); ?>"> <?php echo e($cat->name); ?></a>

                <?php endforeach; ?>
            </div>
        <?php endif; ?>
        <div style="margin-left:-4px; margin-right:-3px;">
        <?php foreach($lastFeaturestop->slice(0,4) as $key => $item): ?>
        <article class="headline__blocks <?php if( $key == 0 ): ?> headline__blocks--large  <?php elseif( $key == 1 ): ?> headline__blocks--tall <?php else: ?> headline__blocks--small <?php endif; ?>">
            <div class="headline__blocks__image" style="background-image: url(<?php echo e(makepreview($item->thumb, 'b', 'posts')); ?>)"></div>
            <a class="headline__blocks__link" href="<?php echo e(makeposturl($item)); ?>" title="<?php echo e($item->title); ?>" ></a>
            <header class="headline__blocks__header">
                <h2 class="headline__blocks__header__title <?php if( $key == 0 ): ?> headline__blocks__header__title--large  <?php elseif($key == 1): ?> headline__blocks__header__title--tall <?php else: ?> headline__blocks__header__title--small <?php endif; ?>"><?php echo e($item->title); ?></h2>
                <ul class="headline__blocks__header__other">
                    <li class="headline__blocks__header__other__author"><?php echo e($item->user->username); ?></li>
                    <li class="headline__blocks__header__other__date"><i class="material-icons"></i> <time datetime="<?php echo e($item->created_at->toW3cString()); ?>"><?php echo e($item->created_at->diffForHumans()); ?></time></li>
                </ul>
            </header>
        </article>
        <?php endforeach; ?>
         <div class="clear"></div>
        </div>
   </div>
</section>
<section class="headline visible-phone">
    <div class="slider" id="headline-slider" data-pagination="true" data-navigation="false">
        <div class="slider__list">
            <?php foreach($lastFeaturestop->slice(0,4) as $key => $item): ?>
                <article class="slider__item headline__blocks headline__blocks--phone">
                    <div class="headline__blocks__image" style="background-image: url(<?php echo e(makepreview($item->thumb, 'b', 'posts')); ?>)"></div>
                    <a class="headline__blocks__link" href="<?php echo e(makeposturl($item)); ?>" title="<?php echo e($item->title); ?>" ></a>
                    <header class="headline__blocks__header">
                        <h2 class="headline__blocks__header__title headline__blocks__header__title--phone"><?php echo e($item->title); ?></h2>
                        <ul class="headline__blocks__header__other">
                            <li class="headline__blocks__header__other__author"><?php echo e($item->user->username); ?></li>
                            <li class="headline__blocks__header__other__date"><i class="material-icons">&#xE192;</i> <time datetime="<?php echo e($item->created_at->toAtomString()); ?>"><?php echo e($item->created_at->diffForHumans()); ?></time></li>
                        </ul>
                    </header>
                </article>
            <?php endforeach; ?>
        </div>
    </div>
</section>
<?php endif; ?>
