<?php 
 /**
 * Single
 *
 * @package passport
 * @subpackage passport
 * @since Passport v.1.0.
 * 
**/
    get_header();

    global $passport_post_content_column;
    global $passport_post_sidebar_position;
    global $passport_post_sidebar_width;

    $passport_post_content_column	    = get_theme_mod( 'passport_post_main_content', 'main_content' );
	$passport_post_sidebar_position	    = get_theme_mod( 'passport_post_sidebar_position', 'left' );
	$passport_post_sidebar_width		= get_theme_mod( 'passport_post_sidebar_width', 'sidebar_25' );

    $author_section		    = get_theme_mod( 'passport_hide_author_section', 'false' );
    $related_posts_section  = get_theme_mod( 'passport_hide_related_posts_section', 'false' );
 ?>
<?php if( have_posts() ) : ?>
	<?php while ( have_posts() ) : the_post(); ?>	
		<div id="primary" class="container">
			<div id="wrapper" class="content-column fix-width clearfix">
				<?php 
					if( 'main_content' == $passport_post_content_column ) : ?>
						<!-- Beginning of Full Width -->
						<div id="content" class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
							<div class="row">
								<div class="post-item">
									<?php
										$format = get_post_format();
									    get_template_part( 'partials/format', $format );
									?>
								</div>
									<?php wp_link_pages( $defaults ); ?>
								<nav>
									<ul class="pager clearfix">
										<li class="previous"><?php previous_post_link( '%link' ); ?></li>
										<li class="next"><?php next_post_link( '%link' ); ?> </li>
									</ul>
								</nav>
								<?php if( empty( $author_section ) ) : ?>
									<div id="author" class="author-post clearfix">
										<?php echo passport_author_section(); ?>	
									</div>
								<?php endif; ?>
								<?php if( empty( $related_posts_section ) ) : ?>
									<div id="related-posts" class="related-posts  clearfix">
										<?php echo passport_related_posts(); ?>
									</div>
								<?php endif; ?>
								<?php comments_template( '/comments.php' ); ?>
							</div>
						</div><!-- #content -->
					<?php endif; ?><!-- End of Full Width -->
					
					<!-- Right sidebar -->
					<?php if( 'sidebar' == $passport_post_content_column )  : ?>
						<?php if( 'right' == $passport_post_sidebar_position ) : ?>						
							<?php if( 'sidebar_25' == $passport_post_sidebar_width ) : ?>
								<div id="content" class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
							<?php elseif( 'sidebar_33' == $passport_post_sidebar_width ) : ?>
								<div id="content" class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
							<?php endif; ?><!--End of sidebar width loop -->
									<div class="row">
										<div class="post-item">
											<?php
												$format = get_post_format();
												get_template_part( 'partials/format', $format );
											?>
										</div>
										<?php wp_link_pages( $defaults ); ?>
										<nav>
											<ul class="pager clearfix">
												<li class="previous"><?php previous_post_link( '%link' ); ?></li>
												<li class="next"><?php next_post_link( '%link' ); ?> </li>
											</ul>
										</nav>
										<?php if( empty( $author_section ) ) : ?>
										    <div id="author" class="author-post clearfix">
											    <?php echo passport_author_section(); ?>
										    </div><!-- #author" -->
										<?php endif; ?>
										<?php if( empty( $related_posts_section ) ) : ?>
											<div id="related-posts" class="related-posts  clearfix">
												<?php echo passport_related_posts(); ?>
											</div><!-- #related-posts" -->
										<?php endif; ?>
											<?php comments_template( '/comments.php' ); ?>
									</div>
							<?php if( 'sidebar_25' == $passport_post_sidebar_width ) : ?>
								</div><!-- #content -->
							<?php elseif( 'sidebar_33' == $passport_post_sidebar_width ) : ?>
								</div><!-- #content -->
							<?php endif; ?><!--End of sidebar width loop -->
							<?php if( 'sidebar_25' == $passport_post_sidebar_width ) : ?>
								<div id="sidebar" class="col-xs-12 col-sm-6 col-md-3 col-lg-3">
							<?php elseif( 'sidebar_33' == $passport_post_sidebar_width) : ?>
								<div id="sidebar" class="col-xs-12 col-sm-6 col-md-4 col-lg-4">
							<?php endif; ?><!--End of sidebar width loop -->
									<div class="row">
										<div class="right-sidebar">
											<?php get_sidebar(); ?>
										</div>
									</div>
							<?php if( 'sidebar_25' == $passport_post_sidebar_width ) : ?>
								</div><!-- #sidebar -->
							<?php elseif( 'sidebar_33' == $passport_post_sidebar_width) : ?>
								</div><!-- #sidebar -->
							<?php endif; ?><!--End of sidebar width loop -->
						<?php endif; ?><!-- End of Right Sidebar -->

						<!-- Left sidebar -->
						<?php if ( 'left' == $passport_post_sidebar_position ) : ?>
							<?php if( 'sidebar_25' == $passport_post_sidebar_width ) : ?>
								<div id="sidebar" class="col-xs-12 col-sm-6 col-md-3 col-lg-3">
							<?php elseif( 'sidebar_33' == $passport_post_sidebar_width) : ?>
								<div id="sidebar" class="col-xs-12 col-sm-6 col-md-4 col-lg-4">
							<?php endif; ?><!--End of loop -->
									<div class="row">
										<div class="left-sidebar">
											<?php get_sidebar(); ?>
										</div>
									</div>
							<?php if( 'sidebar_25' == $passport_post_sidebar_width ) : ?>
								</div><!-- #sidebar -->
							<?php elseif( 'sidebar_33' == $passport_post_sidebar_width) : ?>
								</div><!-- #sidebar -->
							<?php endif; ?><!--End of loop -->
							<?php if( 'sidebar_25' == $passport_post_sidebar_width ) : ?>
								<div id="content" class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
							<?php elseif( 'sidebar_33' == $passport_post_sidebar_width) : ?>
								<div id="content" class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
							<?php endif; ?><!--End of sidebar width loop -->
								<div class="row">
									<div class="post-item">
										<?php
											$format = get_post_format();
											get_template_part( 'partials/format', $format );
										?>
									</div>
									<?php wp_link_pages( $defaults ); ?>
									<nav>
										<ul class="pager clearfix">
											<li class="previous"><?php previous_post_link( '%link' ); ?></li>
											<li class="next"><?php next_post_link( '%link' ); ?> </li>
										</ul>
									</nav>
									<?php if( empty( $author_section ) ) : ?>
									    <div id="author" class="author-post clearfix">
										    <?php echo passport_author_section(); ?>
									    </div><!-- #author -->
									<?php endif; ?>
									<?php if( empty( $related_posts_section ) ) : ?>
										<div id="related-posts" class="related-posts clearfix">
											<?php echo passport_related_posts(); ?>
										</div><!-- #related-posts" -->
									<?php endif; ?>
										<?php comments_template( '/comments.php' ); ?>
								</div>
							<?php if( 'sidebar_25' == $passport_post_sidebar_width ) : ?>
								</div><!-- #content -->
							<?php elseif( 'sidebar_33' == $passport_post_sidebar_width) : ?>
								</div><!-- #content -->
							<?php endif; ?><!--End of sidebar width loop -->
						<?php endif; ?><!-- End of Left Sidebar -->
					<?php endif; ?><!-- End of Loop -->
				</div>
			</div>
		<?php endwhile; ?><!-- End of While Loop --> 
	<?php endif; ?><!-- End of have_posts() --> 

<?php get_footer();