<?php
/**
 * Template part for displaying single posts.
 *
 * @package daisy
 */
?>
<div class="post-block"> <!-- Post #1-->
	<div class="post-detail">
		<div class="meta-cat">
			<?php the_category(','); ?>
		</div>
		<?php
			$is_show_title = rs::getField('rst_show_title');
			if( !isset($is_show_title) || $is_show_title ) :
				if( rs::getField('rst_sub_title') == '' ) {
				?>	
					<h2><?php the_title(); ?></h2> <!-- Post Title-->
				<?php	
				}
				else {
				?>	
					<h2><?php echo rs::getField('rst_sub_title') ?></h2>
				<?php
				}
			endif;
		?>
		
		<div class="metas">
			<a class="meta-date" href="<?php echo get_day_link(get_post_time('Y'), get_post_time('m'), get_post_time('j')); ?>"><?php echo mysql2date('d F', $post->post_date) ?></a>
			<a class="meta-author" href="<?php echo get_author_posts_url( $post->post_author ); ?>"><?php the_author()?></a>
			<a class="meta-comment" href="<?php the_permalink(); ?>#comments"><?php comments_number('0 Comment', '1 Comment', '% Comments');?></a>
		</div>
	</div>
	<?php 
		$is_show_thumbnail = get_theme_mod('singe_hide_thumbnail');
		if( ! $is_show_thumbnail ) :
			get_template_part( 'thumbnail', get_post_format() );
		endif;
	?>
	<div class="rst-inner-content">
		<?php the_content() ?>
		<?php
			wp_link_pages( array(
				'before' => '<div class="page-links">' . __( '<span>Pages:</span>', 'rst' ),
				'after'  => '</div>',
			) );
		?>
	</div>
	<?php if( !get_theme_mod('share_facebook') || !get_theme_mod('share_twitter') || !get_theme_mod('share_google') || !get_theme_mod('share_linkedin') || !get_theme_mod('share_pinterest') || !get_theme_mod('singe_hide_tags') ) { ?>
	<div class="share-tag-box">
		<div class="row">
			<div class="col-md-6 text-left rb">
				<?php if( !get_theme_mod('share_facebook') || !get_theme_mod('share_twitter') || !get_theme_mod('share_google') || !get_theme_mod('share_linkedin') || !get_theme_mod('share_pinterest') ) { ?>
				<h4>Share This</h4>
				<?php get_template_part('content','share') ?>
				<?php } ?>
			</div>
			<div class="col-md-6 text-right">
				<?php if( wp_get_post_tags($post->ID) && !get_theme_mod('singe_hide_tags') ) { ?>
				<h4>Tags</h4>
				<ul class="list-inline tags">
					<?php the_tags( '<li>', '</li><li>', '</li>' ); 
					?>
				</ul>
				<?php } ?>
			</div>
		</div>
	</div>
	<?php } ?>
</div>
<?php
	$is_show_author = get_theme_mod('singe_hide_author');
	if( ! $is_show_author ) :
		get_template_part( 'content', 'author' );
	endif;
?>
<?php
	$is_show_recent_post = get_theme_mod('singe_hide_recent_post');
	if( ! $is_show_recent_post ) :
		get_template_part( 'content', 'recent-posts' );
	endif;
?>



