<?php global $shapebootstrap_options; ?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    
    <header class="entry-header">
        <span class="post-format">
            <i class="fa fa-video-camera"></i>
        </span>

        <h2 class="entry-title">
            <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
            <?php if ( is_sticky() && is_home() && ! is_paged() ) { ?>
            <sup class="featured-post"><?php _e( 'Sticky', 'shapebootstrap' ) ?></sup>
            <?php } ?>
        </h2> <!-- //.entry-title -->

        <?php get_template_part( 'post-format/entry-meta' ); ?> 

    </header> <!--/.entry-header -->
	
    <div class="entry-video">
        
        <?php $video_source = rwmb_meta( 'thm_video_source' ); ?>
        <?php $video = rwmb_meta( 'thm_video' ); ?>

        <?php if($video_source == 1): ?>
            <?php echo rwmb_meta( 'thm_video' ); ?>
        <?php elseif ($video_source == 2): ?>
            <?php echo '<iframe width="100%" height="350" src="http://www.youtube.com/embed/'.esc_attr($video).'?rel=0&showinfo=0&modestbranding=1&hd=1&autohide=1&color=white" frameborder="0" allowfullscreen></iframe>'; ?>
        <?php elseif ($video_source == 3): ?>
            <?php echo '<iframe src="http://player.vimeo.com/video/'.esc_attr($video).'?title=0&amp;byline=0&amp;portrait=0&amp;color=ffffff" width="100%" height="350" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'; ?>
        <?php endif; ?>

    </div>


    <div class="entry-summary">
        <?php if ( is_single() ) {
            the_content();
        } else {
            the_excerpt();  
        } 
        wp_link_pages( array(
            'before'      => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'shapebootstrap' ) . '</span>',
            'after'       => '</div>',
            'link_before' => '<span>',
            'link_after'  => '</span>',
        ) );

        ?>
    </div> <!-- //.entry-summary -->
    
    <?php
     if (isset($shapebootstrap_options['blog-social']) && $shapebootstrap_options['blog-social'] ){
        if(is_single()) {
            get_template_part( 'post-format/social-buttons' );
        } else {
            get_template_part( 'post-format/social-buttons' ); 
        } 
    }
    ?>

</article> <!--/#post -->