<?php
/**
 * This template displays single post content for the portfolio CPT.
 *
 * @package Organic Startup
 * @since Organic Startup 1.0
 */

get_header(); ?>

<?php if ( wp_is_mobile() ) { ?>
	<?php $thumb = ( '' != get_the_post_thumbnail() ) ? wp_get_attachment_image_src( get_post_thumbnail_id(), 'startup-featured-medium' ) : false; ?>
<?php } else { ?>
	<?php $thumb = ( '' != get_the_post_thumbnail() ) ? wp_get_attachment_image_src( get_post_thumbnail_id(), 'startup-featured-large' ) : false; ?>
<?php } ?>

<!-- BEGIN .post class -->
<div <?php post_class(); ?> id="post-<?php the_ID(); ?>">

	<?php if ( has_post_thumbnail() ) { ?>

		<div class="feature-img banner-img" style="background-image: url(<?php echo esc_url( $thumb[0] ); ?>);">

			<!-- BEGIN .portfolio-nav -->
			<div class="portfolio-nav">
				<div class="previous-post"><?php previous_post_link( '%link', '<i class="fas fa-angle-left"></i> <span>Previous Post</span>' ); ?></div>
				<div class="next-post"><?php next_post_link( '%link', '<i class="fas fa-angle-right"></i> <span>Next Post</span>' ); ?></div>
			<!-- END .portfolio-nav -->
			</div>

			<?php if ( wp_is_mobile() ) { ?>
				<?php the_post_thumbnail( 'startup-featured-medium' ); ?>
			<?php } else { ?>
				<?php the_post_thumbnail( 'startup-featured-large' ); ?>
			<?php } ?>

		</div>

	<?php } ?>

	<!-- BEGIN .row -->
	<div class="row">

		<!-- BEGIN .content -->
		<div class="content">

			<!-- BEGIN .sixteen columns -->
			<div class="sixteen columns">

				<!-- BEGIN .post-area no-sidebar -->
				<div class="post-area no-sidebar">

					<?php get_template_part( 'jetpack/loop', 'project' ); ?>

				<!-- END .post-area no-sidebar -->
				</div>

			<!-- END .sixteen columns -->
			</div>

		<!-- END .content -->
		</div>

	<!-- END .row -->
	</div>

<!-- END .post class -->
</div>

<?php get_footer(); ?>
