<?php
/**
 * Template part for displaying posts
 *
 * @link https://codex.wordpress.org/Template_Hierarchy
 *
 * @package Edumodo
 */
    // enavle social shear
	$social_enable   = edumodo_get_theme_mod('edumodo_single_blog_social_share', 'on');
?>

<article id="post-<?php the_ID(); ?>" <?php post_class('main-post single-post'); ?>>

	<?php if(has_post_thumbnail()): ?>
		<div class="image-content">
			<?php the_post_thumbnail();?>
		</div>
	<?php endif;  ?> 

	<div class="entry-content">
		<header class="entry-header">
			<?php if(is_sticky() && ! has_post_thumbnail()): ?>
				<div class="sticky-post">		
		              <div class="post-round">
		                  <span>
		                  		<i class="glyph-icon flaticon-star"></i>
		                  </span>
		              </div>
				</div>
		     <?php endif; ?>
		</header>
		<?php if ( 'post' === get_post_type() ) : ?>
			<div class="entry-meta">
				<ul>
					<li><i class="fa fa-user"></i><?php echo get_the_author();?></li>
					<li><i class="fa fa-calendar"></i><?php echo get_the_date(); ?></li>
					<li>
						<?php if ( 'post' === get_post_type() ) {
						$categories_list = get_the_category_list(esc_html__(', ', 'edumodo'));
							if ($categories_list) {
								printf('<span class="cat-links"><i class="fa fa-tags"></i>' . esc_html__('%1$s', 'edumodo') . '</span>', $categories_list);
							}
						} 
						?>
					</li>
				</ul>
			</div>
		<?php endif; ?>
		<h2 class="entry-title">
			<?php the_title(); ?>
		</h2>
        <?php the_content(); 
	        wp_link_pages( array(
	            'before'      => '<div class="page-links">' . esc_html__( 'Pages:', 'edumodo' ),
	            'after'       => '</div>',
	            'next_or_number'   => 'number',
	            'link_before' => '<span class="page-number">',
	            'link_after'  => '</span>',
	        ) );
        ?>

		<footer class="entry-footer-body">
			<div class="post-meta pull-left"> 
				<?php if(has_tag()):?>
					<!-- Post tag -->
					<span class="post-tags-title"><?php esc_html_e( 'Tags:', 'edumodo' ); ?></span>
					<span class="post-tags"><?php the_tags('', ' ', '<br />'); ?></span>
				<?php endif;?>
			</div>
			<div class="pull-right">
				<?php echo edumodo_social_share(); ?>
			</div>
		</footer> <!-- .entry-footer-body -->
	</div>
</article><!-- #post-## -->