<!-- Content -->
  <div class="container pt-4 pb-4">
    <div class="row">
      <div class="col-md-9">
        <?php if ($WHERE_AM_I == 'home'): ?>
        <div class="col-md-12 pb-4">
        <!-- Card -->
         <?php
          $featured = array_slice($content, 0, 1);
          $content = array_slice($content, 1);
          foreach ($featured as $page):
        ?>
        <div class="card border-0">
          <img src="<?php echo ($page->coverImage()?$page->coverImage():Theme::src('img/noimage.png')) ?>" class="card-img-top" alt="<?php echo $page->title(); ?>">
          <div style="position:absolute;left:12;top:0;">
            <span class="badge bg-danger text-light ms-2 mt-2 fs-6 text"><?php echo $page->category(); ?></span>
          </div>
          <div class="card-body">
            <h4 class="card-title fw-bold"><a class="text-dark text-decoration-none" href="<?php echo $page->permalink(); ?>"><?php echo $page->title(); ?></a></h4>
            <p class="card-text text-dark"><?php echo (empty($page->description())?'Complete the description of the article for a correct work of the theme':$page->description()) ?></p>
            <p class="card-text text-black-50"><small><?php echo $page->date(); ?> - <?php echo $page->user('nickname'); ?></small></p>
          </div>
        </div>
        <?php endforeach ?>
        </div>
        <!--/ Card -->
        <?php endif; ?>
        <!-- 2nd Card -->
        <div class="row">
        <p class="lead pb-1 text-dark fw-bold"><?php ($WHERE_AM_I=='search'?$language->p('Search'):$language->p('All Article')) ?></p>
        <?php if (empty($content)) { $language->p('No pages found'); } ?>
        <?php foreach ($content as $page): ?>
        <div class="col-md-6 mb-4">
        <div class="card h-100 border-0">
          <img src="<?php echo ($page->coverImage()?$page->coverImage():Theme::src('img/noimage.png')) ?>" class="card-img-top" alt="<?php echo $page->title(); ?>">
          <div style="position:absolute;left:12;top:0;">
            <span class="badge bg-danger text-light ms-2 mt-2 "><?php echo $page->category(); ?></span>
          </div>
          <div class="card-body">
            <p class="card-title fw-bold"><a class="text-dark text-decoration-none" href="<?php echo $page->permalink(); ?>"><?php echo $page->title(); ?></a></p>
            <p class="card-text text-black-50"><small><?php echo $page->date(); ?> - <?php echo $page->user('nickname'); ?></small></p>
          </div>
        </div>
        </div>
        <?php endforeach ?>
        </div>
        <!--/ 2nd Card -->

        <div class="col-md-12 pt-2 mb-4">
          <!-- Navigation -->
          <?php if (Paginator::numberOfPages()>1): ?>
            <?php if (Paginator::showPrev()): ?>
              <a href="<?php echo Paginator::previousPageUrl() ?>" type="button" class="btn btn-danger rounded-pill btn-sm px-4 me-md-2 fw-bold" role="button">Previous</a>
            <?php endif ?>
            <?php if (Paginator::showNext()): ?>
              <a href="<?php echo Paginator::nextPageUrl() ?>" type="button" class="btn btn-danger rounded-pill btn-sm px-4 me-md-2 fw-bold" role="button">Next</a>
            <?php endif ?>
          <?php endif ?>
        </div>
      </div>
      <div class="col-md-3">
        <?php include('sidebar.php'); ?>
      </div>
    </div>
  </div>
<!--/ Content -->
