<?php echo $header; ?>
<div class="container isl-iblogs iblogs-category <?php echo $css_class; ?> th-isl-<?php echo $theme; ?> <?php echo $theme == 'journal2' ? 'j-container' : ''; ?>" <?php echo $theme == 'journal2' ? 'id="container"' : ''; ?>>
  <ul class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
      <li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
    <?php } ?>
  </ul>

  <div class="row">
    <?php echo $column_left; ?>

    <?php if ($column_left && $column_right) { ?>
      <?php $class = 'col-sm-6'?>
    <?php } elseif ($column_left || $column_right) { ?>
      <?php $class = 'col-sm-9'?>
    <?php } else { ?>
      <?php $class = 'col-sm-12'?>
    <?php }?>

    <div id="content" class="<?php echo $class; ?>">
      <?php echo $content_top; ?>

      <div class="iblogs-content">
        <h1 class="page-title <?php echo $theme == 'journal2' ? 'heading-title' : ''; ?>">
          <?php echo $heading_title; ?>
          <?php if ($heading_feed) { ?>
            <a href="<?php echo $heading_feed; ?>" target="_blank" title="<?php echo $text_rss_feed; ?>" class="iblogs-feed-icon"><i class="fa fa-rss"></i></a>
          <?php } ?>
        </h1>

        <?php if ($category_thumb || $category_content) { ?>
          <div class="iblogs-category-content">
            <div class="row">
              <?php if ($category_id && $category_thumb) { ?>
                <div class="col-sm-3">
                  <img src="<?php echo $category_thumb; ?>" alt="<?php echo $heading_title; ?>" title="<?php echo $heading_title; ?>" class="img-thumbnail" />
                </div>
              <?php } ?>
              <?php if ($category_content) { ?>
                <div class="col-sm-9">
                  <?php echo $category_content; ?>
                </div>
              <?php } ?>
            </div>
          </div>
        <?php } ?>

        <?php if ($layout == 'leading_list') { ?>

          <?php if ($posts_lead) { ?>
            <?php foreach ($posts_lead as $post) { ?>
              <div class="post-item post-list">
                <a href="<?php echo $post['url_more']; ?>"><h2 class="post-title"><?php echo $post['title']; ?></h2></a>
                <div class="post-meta"><?php echo $post['info_format']; ?></div>
                <div class="post-image">
                  <a href="<?php echo $post['url_more']; ?>"><img src="<?php echo $post['image'] ?>" title="<?php echo $post['title']; ?>" alt="<?php echo $post['title']; ?>" class="img-responsive"></a>
                </div>
                <div class="post-excerpt"><?php echo $post['excerpt']; ?></div>
                <div class="post-more"><a href="<?php echo $post['url_more']; ?>"><?php echo $text_read_more; ?></a></div>
              </div>
            <?php } ?>
          <?php } ?>

          <?php if ($posts_grid) { ?>
            <?php foreach ($posts_grid as $posts) { ?>
              <div class="row post-row">
                <?php foreach ($posts as $post) { ?>
                  <div class="col-sm-6">
                    <div class="post-item">
                      <a href="<?php echo $post['url_more']; ?>"><h2 class="post-title"><?php echo $post['title']; ?></h2></a>
                      <div class="post-meta"><?php echo $post['info_format']; ?></div>
                      <div class="post-image">
                        <a href="<?php echo $post['url_more']; ?>"><img src="<?php echo $post['image'] ?>" title="<?php echo $post['title']; ?>" alt="<?php echo $post['title']; ?>" class="img-responsive"></a>
                      </div>
                      <div class="post-excerpt">
                        <?php echo $post['excerpt']; ?>
                        <a href="<?php echo $post['url_more']; ?>"><?php echo $text_read_more; ?></a>
                      </div>
                    </div>
                  </div>
                <?php } ?>
              </div>
            <?php } ?>
          <?php } ?>

        <?php } elseif ($layout == 'list') { ?>

          <?php foreach ($posts as $post) { ?>
            <div class="post-item post-list">
              <a href="<?php echo $post['url_more']; ?>"><h2 class="post-title"><?php echo $post['title']; ?></h2></a>
              <div class="post-meta"><?php echo $post['info_format']; ?></div>
              <div class="post-image">
                <a href="<?php echo $post['url_more']; ?>"><img src="<?php echo $post['image'] ?>" title="<?php echo $post['title']; ?>" alt="<?php echo $post['title']; ?>" class="img-responsive"></a>
              </div>
              <div class="post-excerpt"><?php echo $post['excerpt']; ?></div>
              <div class="post-more"><a href="<?php echo $post['url_more']; ?>"><?php echo $text_read_more; ?></a></div>
            </div>
          <?php } ?>

        <?php } else { ?>

          <?php foreach ($posts_grid as $posts) { ?>
            <div class="row post-row s">
              <?php foreach ($posts as $post) { ?>
                <div class="col-sm-6">
                  <div class="post-item">
                    <a href="<?php echo $post['url_more']; ?>"><h2 class="post-title"><?php echo $post['title']; ?></h2></a>
                    <div class="post-meta"><?php echo $post['info_format']; ?></div>
                    <div class="post-image">
                      <a href="<?php echo $post['url_more']; ?>"><img src="<?php echo $post['image'] ?>" title="<?php echo $post['title']; ?>" alt="<?php echo $post['title']; ?>" class="img-responsive"></a>
                    </div>
                    <div class="post-excerpt">
                      <?php echo $post['excerpt']; ?>
                      <a href="<?php echo $post['url_more']; ?>"><?php echo $text_read_more; ?></a>
                    </div>
                  </div>
                </div>
              <?php } ?>
            </div>
          <?php } ?>
        <?php } ?>

        <?php if (!$posts) { ?>
          <p><?php echo $text_no_post; ?><p>
        <?php } ?>
      </div> <!-- /.iblogs-content -->

      <div class="row iblogs-pagination">
        <div class="col-sm-6 text-left"><?php echo $pagination; ?></div>
        <div class="col-sm-6 text-right"><?php echo $pagination_info; ?></div>
      </div>

<?php if (!empty($custom_css)) { ?>
<style>
  <?php echo $custom_css; ?>
</style>
<?php } ?>

      <?php echo $content_bottom; ?>
    </div>

    <?php echo $column_right; ?></div>
</div>
<?php echo $footer; ?>
