<?php
/**
Template Name: Landing Page
 *
 * This template is used to display a landing, or coming soon page.
 *
 * @package Organic Startup
 * @since Organic Startup 1.0
 */

get_header(); ?>

<?php $thumb = ( '' !== get_the_post_thumbnail() ) ? wp_get_attachment_image_src( get_post_thumbnail_id(), 'giving-featured-large' ) : false; ?>

<!-- BEGIN .post class -->
<div <?php post_class( 'landing-page' ); ?> id="page-<?php the_ID(); ?>" <?php if ( ! empty( $thumb ) ) { ?>
	style="background-image: url(<?php echo esc_url( $thumb[0] ); ?>);" <?php } ?>>

	<!-- BEGIN .absolute-center -->
	<div class="absolute-center">

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

			<!-- BEGIN .post-area -->
			<div class="post-area full-width">

				<?php the_custom_logo(); ?>

				<h1 class="site-title">
					<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php echo wp_kses_post( get_bloginfo( 'name' ) ); ?></a>
				</h1>

				<h2 class="site-description">
					<?php echo wp_kses_post( get_bloginfo( 'description' ) ); ?>
				</h2>

				<?php
				if ( have_posts() ) :
					while ( have_posts() ) :
						the_post();
						?>

						<?php $has_content = get_the_content(); ?>

						<?php if ( '' !== $has_content ) { ?>

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

							<?php the_content( __( 'Read More', 'organic-startup' ) ); ?>

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

					<?php } ?>

				<?php endwhile; ?>
				<?php endif; ?>

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

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

	<!-- END .absolute-center -->
	</div>

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

<?php get_footer(); ?>
