<?php
/**
 * The blog post content
 */

global $post;

$restorator_pf = get_post_format();
if (empty( $restorator_pf )) $restorator_pf = 'image';
$restorator_post_excerpt = (restorator_smarty_modifier_truncate(get_the_excerpt(), $excerpt_count));
$restorator_comment_count = get_comments_number('0', '1', '%');
?>
			
		<?php if ( $columns != 'col1' ) { ?>
			<div class="post-content-wrapper clearfix">
				<div class="post_format_content">
					<div class="post_likes"><?php echo restorator_likes(); ?></div>
					<?php get_template_part( 'templates/blog/post-format/post', $restorator_pf ); ?>
				</div>
				<?php if( $restorator_pf != 'quote' && $restorator_pf != 'link' ) { ?>
					<div class="post-descr-wrap clearfix">
						<div class="post-meta">
							<span class="post-meta-date"><i><?php the_time('j F, Y'); ?></i></span>
						</div>
						<h2 class="post-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__('Permalink to %s', 'restorator'), the_title_attribute('echo=0') ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
						<div class="post-content clearfix">
							<p><?php echo esc_html( $restorator_post_excerpt ); ?></p>
						</div>
						<div class="post_bottom_inf clearfix">
							<div class="post-meta-author pull-left"><a href="<?php echo get_author_posts_url(get_the_author_meta('ID')) ?>"><?php echo get_avatar( get_the_author_meta('user_email'), '50', '' ) ?><span><i><?php echo esc_attr__('by', 'restorator') ?></i> <?php echo get_the_author_meta('display_name') ?></span></a></div>
							<a class="cstheme_comment_count pull-right" href="<?php comments_link(); ?>"><i class="icon Evatheme-Icon-Fonts-thin-0274_chat_message_comment_bubble"></i><?php echo esc_html( $restorator_comment_count ); ?></a>
						</div>
					</div>
				<?php } ?>
			</div>
		
		<?php } else { ?>
			
			<div class="post-content-wrapper clearfix">
				<div class="post_format_content">
					<div class="post_likes"><?php echo restorator_likes(); ?></div>
					<?php get_template_part( 'templates/blog/post-format/post', $restorator_pf ); ?>
				</div>
				<?php if( $restorator_pf != 'quote' && $restorator_pf != 'link' ) { ?>
					<div class="post-descr-wrap clearfix">
						<h2 class="post-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__('Permalink to %s', 'restorator'), the_title_attribute('echo=0') ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
						<div class="post-meta">
							<span class="post-meta-author"><?php echo esc_attr__('by','restorator'); ?><a href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?>"><?php echo get_the_author_meta('display_name'); ?></a></span>
							<span class="post_meta_category"><?php echo esc_attr__('in','restorator'); ?><?php the_category(', '); ?></span>
							<span class="post-meta-date"><?php echo esc_attr__('posted','restorator'); ?><i><?php the_time('j F, Y'); ?></i></span>
						</div>
						<div class="post-content clearfix">
							<p><?php echo esc_html( $restorator_post_excerpt ); ?></p>
						</div>
						<div class="post_bottom_inf clearfix">
							<div class="pull-left">
								<a class="post_content_readmore btn btn-default" href="<?php echo get_permalink(); ?>"><?php echo esc_html__( 'Read More', 'restorator' ); ?></a>
								<?php echo restorator_comment_count(); ?>
							</div>
							<div class="pull-right">
								<div class="post-meta-author"><a href="<?php echo get_author_posts_url(get_the_author_meta('ID')) ?>"><?php echo get_avatar( get_the_author_meta('user_email'), '30', '' ) ?><span><i><?php echo esc_attr__('by', 'restorator') ?></i> <?php echo get_the_author_meta('display_name') ?></span></a></div>
							</div>
						</div>
					</div>
				<?php } ?>
			</div>
			
		<?php } ?>