<?php
/**
 * Template for the post teasers
 *
 * @author jason.xie@victheme.com
 */
?>
<?php $class = 'multiple clearfix scroll-animated'; ?>
<?php if (is_sticky()) : ?>
  <?php $class .= ' sticky'; ?>
<?php endif; ?>
<article id="post-<?php the_ID(); ?>" <?php post_class($class); ?>
         data-animation="animated in bounceIn startblank fast">

  <?php if (VTCore_Zeus_Utility::getShow('teaser', 'title')) : ?>
    <header>
      <h1 class="post-title element-title title-large">
        <a href="<?php the_permalink(); ?>" rel="bookmark">
          <?php the_title(); ?>
        </a>
      </h1>
    </header>
  <?php endif; ?>

  <?php if (has_post_thumbnail() && !post_password_required() && VTCore_Zeus_Utility::getShow('teaser', 'image')) : ?>

    <a class="teaser-hover" href="<?php echo esc_url(get_post_permalink($post->ID)); ?>">
      <figure
        class="post-thumbnail vertical-center animated in fadeInRight startblank scroll-animated"
        data-animation="animated in fadeInRight startblank"
        data-aspect="true"
        data-vertical-force="true">

        <?php echo wp_kses_post(get_the_post_thumbnail($post->ID, 'large')); ?>

        <div class="mask">
          <div class="vertical-target">
            <i class="fa fa-search"></i>
            <i class="fa fa-link"></i>
          </div>
        </div>
      </figure>
    </a>
  <?php endif; ?>

  <?php if (VTCore_Zeus_Utility::getShow('teaser', 'byline')) : ?>
    <div class="post-byline">
      <time class="meta meta-time"><i class="fa fa-clock-o"></i>
        <?php echo wp_kses_post(get_the_date()); ?>
      </time>

    <span class="meta meta-author" role="author"><i class="fa fa-user"></i>
      <?php echo wp_kses_post(get_the_author_link()); ?>
    </span>

      <?php $category = get_the_category(); ?>
      <?php if (!empty($category)) : ?>
        <span class="meta meta-category"><i
            class="fa fa-tag fa-flip-horizontal"></i>
          <?php echo the_category(', '); ?>
      </span>
      <?php endif; ?>

      <?php if (comments_open()) : ?>
        <span class="meta meta-comment text-pink"><i class="fa fa-comments"></i>
          <?php comments_number(__('No Comment', BASE_THEME), __('1 Comment', BASE_THEME), '% ' . __('Comments', BASE_THEME)); ?>
      </span>
      <?php endif; ?>
    </div>
  <?php endif; ?>

  <?php if (VTCore_Zeus_Utility::getShow('teaser', 'excerpt')) : ?>
    <section class="post-excerpt">
      <?php the_excerpt(); ?>
    </section>
  <?php endif; ?>

  <?php if (VTCore_Zeus_Utility::getShow('teaser', 'readmore')) : ?>
    <footer class="clearfix">
      <a class="more-link pull-right" href="<?php echo esc_url(get_permalink()); ?>">
        <?php echo __('Read More', BASE_THEME); ?>
      </a>
    </footer>
  <?php endif; ?>

</article>
