<?php get_header(); ?>
<?php $muziq_jellythemes = muziq_jellythemes_theme_options();?>
<!-- INTRO -->
<section class="intro intro-mini full-width jIntro bg-blog" style="background-image:url(<?php echo esc_url($muziq_jellythemes['blog_header']['url']); ?>);">
	<div class="container">
		<div class="row">
			<div class="col-md-12">
				<div class="text-center">
					<h2 class="primary-title"><?php echo esc_html($muziq_jellythemes['blog_title']); ?></h2>
					<h3 class="subtitle-text"><?php echo esc_html($muziq_jellythemes['blog_subtitle']); ?></h3>
				</div>
			</div>
		</div>
	</div>
</section>
<section class="section blog list-posts <?php echo (isset($jellythemes['blog_inverse']) && $jellythemes['blog_inverse'] ? 'inverse-color' : ''); ?>">
    <div class="container">
    	<div class="row">
    		<div class="col-md-12">
		    	<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
		    		<article  <?php post_class('post-item'); ?>>
		    			<div class="row">
                            <?php if (has_post_thumbnail()): ?>
                                <div class="col-sm-6">
                                    <div class="photo-post" id="image-post<?php echo get_the_ID(); ?>">
                                        <?php the_post_thumbnail(); ?>
                                    </div>
                            <?php else: ?>
                                <div class="col-sm-1">
                            <?php endif ?>
		    					<p class="date">
		    						<span class="day"><?php echo get_the_date('d') ?></span>
		    						<span class="month"><?php echo get_the_date('M') ?></span>
		    					</p>
		    				</div>
                            <?php if (has_post_thumbnail()): ?>
		    				<div class="col-sm-6">
                            <?php else: ?>
                            <div class="col-sm-11">
                            <?php endif ?>
		    					<div class="voffset30"></div>
		    					<h4 class="title small"><span><?php esc_html_e('Posted by:', 'muziq-jellythemes'); ?></span> <?php the_author_link() ?> | <?php the_category(', '); ?></h4>
		    					<h3 class="title post"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
		    					<div><?php the_excerpt(); ?></div>
		    					<a href="<?php the_permalink(); ?>" class="btn rounded" id="new-<?php echo get_the_ID() ?>"><?php esc_html_e('Read more', 'muziq-jellythemes'); ?></a>
		    					<section class="section news-window">
		    						<div class="news-content"></div><!-- AJAX Dinamic Content -->
		    					</section>
		    				</div>
		    			</div>
		    		</article>
		    	<?php endwhile; ?>
    		</div>
    	</div>
    		<!-- PAGINATION -->
    		<section class="section paginationposts">
    			<div class="container">
    				<div class="row">
    					<div class="col-md-12">
    						<nav>
    							<?php muziq_jellythemes_pagination(); ?>
    						</nav>
    					</div>
    				</div>
    			</div>
    		</section>
    	<?php else: ?>
    		<div class="row">
	    		<div class="col-md-12 jt_col column_container">
	               <p class="title fz20 voffset150"><?php esc_html_e('There are no results for your query', 'muziq-jellythemes'); ?></p>
	            </div>
            </div>
    	<?php endif; ?>
    </div>
</section>
<?php get_footer(); ?>
