

<?php $__env->startSection('page-title', $category->category); ?>

<?php $__env->startSection('content'); ?>

<section class="page-header">
  <div class="page-header__bg" style="background-image: url(<?php echo e(asset('assets/images/header.jpg')); ?>);"></div>
  <div class="container">
    <h2><?php echo e($category->category); ?> </h2>
    <ul class="thm-breadcrumb list-unstyled">
        <li class="text-white"><a href="<?php echo e(url('/')); ?>">Inicio</a></li>
    </ul>
  </div>
</section>

<?php if(Auth::user()): ?>
  <div class="row">
    <div class="container py-2">
      <div class="col text-right">
        <a href="<?php echo e(url('create')); ?>" class="thm-btn">
          <i class="fas fa-plus"></i>  
          Crear nuevo
        </a>
      </div>
    </div>
  </div>
<?php endif; ?>


<div class="blog-page">
  <div class="container">
    <div class="row">

    <?php if(count($contents)): ?>
    <?php foreach($contents as $content): ?>

    <div class="col-sm-12 col-md-6 col-lg-4">
      <div class="blog-card">
        <div class="blog-card__image">
          <div class="blog-card__date"><?php echo e(date('d M', strtotime($content->publish_up))); ?></div><!-- /.blog-card__date -->
          <img src="<?php echo e(asset('assets/img/optimized/image-'.$content->images)); ?>" alt="<?php echo e($content->title); ?>">
          <a href="<?php echo e(url($content->category.'/blog/'.$content->slug)); ?>"></a>
        </div>
        <div class="blog-card__content">
          <div class="blog-card__meta">
            <a href="#"><i class="far fa-user-circle"></i>
              <?php if($content->created_by_alias): ?> <?php echo e($content->created_by_alias); ?> <?php else: ?> <?php echo e($content->author); ?> <?php endif; ?>  
            </a>
          </div>
          <h3>
            <a href="<?php echo e(url($category->slug.'/blog/'.$content->slug)); ?>">
              <!-- <?php echo e($content->title); ?> -->
              <?php echo e(str_limit($content->title, $limit = 50, $end = '...')); ?>

            </a>
          </h3>
        </div>
      </div>
    </div>

    <?php endforeach; ?>
    <?php else: ?>
      <?php echo $__env->make('partials.noData', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
    <?php endif; ?>


    </div>
  </div>
</div>

<?php  $paginates=$contents;  ?>

  <div class="container list-unstyled d-flex justify-content-center py-4">
    <?php echo e($paginates->links()); ?>

  </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.web', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>