<?php
$block = $block_data[0];
$settings = $block_data[1];
?>
<?php if($block === 'title'): ?>

<h2 class="post-title element-title title-large">
  <?php echo !empty($settings[0]) && $settings[0]!='no_link' ? $this->getLinked($post, $post->title, $settings[0], 'link_title') : $post->title ?>
</h2>

<div class="post-byline clearfix">
  <span class="meta meta-time nopadding col-xs-12 col-sm-6 pull-left"><i class="fa fa-clock-o"></i>
  <?php echo get_the_date();?>
  </span>
</div>

<?php elseif($block === 'image' && !empty($post->thumbnail)): ?>
<figure class="post-thumbnail" data-aspect="true">
    <?php echo !empty($settings[0]) && $settings[0]!='no_link' ? $this->getLinked($post, $post->thumbnail, $settings[0], 'link_image') : $post->thumbnail ?>
</figure>
<?php elseif($block === 'text'): ?>
<section class="post-excerpt text-left">
    <?php echo !empty($settings[0]) && $settings[0]==='text' ?  $post->content : $post->excerpt; ?>
</section>
<?php elseif($block === 'link'): ?>
	<footer class="clearfix">
  	<a href="<?php echo $post->link ?>"
  	   class="btn btn-icon btn-primary more-link"
  	   title="<?php echo esc_attr(sprintf(__( 'Permalink to %s', "js_composer" ), $post->title_attribute)); ?>"<?php echo $this->link_target ?>>
      <i class="fa fa-chevron-right"></i>
  	  <?php echo __('Read More', BASE_THEME); ?>
  	</a>
	</footer>

<?php endif; ?>