<?php $bauen_options = get_option('bauen');?>
<?php 
/*Template Name:Coming Soon Page Template*/
 get_header();
 ?>    
 
	<?php
	global $bauen_image, $bauen_page_back;
	if (has_post_thumbnail( $post->ID ) ):
	$bauen_image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), '' );
	$bauen_page_back ='style=background-image:url('.$bauen_image[0].');';
	endif;
	?>  		
	<!-- Comming soon -->
	<section class="comming section-padding counter-widget" <?php echo esc_attr($bauen_page_back);?> data-countDate="<?php echo esc_attr(get_post_meta($post->ID,'bauen_coming_soon_countdown',true)); ?>">
		<div class="v-middle">
			<div class="container">			
				<div class="row text-center mb-45">
					<div class="col-md-12">
                        <h6>
						<?php if (( get_post_meta($post->ID,'bauen_coming_soon_page_subtitle_opt',true))):?>
							<?php echo esc_html(get_post_meta($post->ID,'bauen_coming_soon_page_subtitle_opt',true)); ?>
						<?php else : ?>
							<?php esc_html_e('Our website is under construction','bauen');?>
						<?php endif;?>
						</h6>					
						<h2>
						<?php if (( get_post_meta($post->ID,'bauen_coming_soon_page_title_opt',true))):?>
						    <?php echo esc_html(get_post_meta($post->ID,'bauen_coming_soon_page_title_opt',true)); ?>
						<?php else : ?>
						    <?php the_title();?>
						<?php endif;?>
						</h2> 
					</div>
				</div>
				<?php if(get_post_meta($post->ID,'bauen_coming_soon_countdown',true)):?>
				<div class="row text-center mb-45 countdown">
					<div class="col-6 offset-md-2 col-md-2 cs-countdown-item">
						<div class="item">
							<div class="down">
							   <h3 class="days rot"><?php esc_html_e('00','bauen');?></h3> 
							</div>
							<div class="item-info">
								<h6>
								<?php if (( get_post_meta($post->ID,'bauen_coming_soon_page_days_opt',true))):?>
								    <?php echo esc_html(get_post_meta($post->ID,'bauen_coming_soon_page_days_opt',true)); ?>
								<?php else : ?>
								    <?php esc_html_e('Days','bauen');?>
								<?php endif;?>
								</h6> 
							</div>
						</div>
					</div>
					<div class="col-6 col-md-2 cs-countdown-item">
						<div class="item">
							<div class="down">
								<h3 class="hours rot"><?php esc_html_e('00','bauen');?></h3> 
							</div>
							<div class="item-info">
								<h6>
								<?php if (( get_post_meta($post->ID,'bauen_coming_soon_page_hours_opt',true))):?>
								    <?php echo esc_html(get_post_meta($post->ID,'bauen_coming_soon_page_hours_opt',true)); ?>
								<?php else : ?>
								    <?php esc_html_e('Hours','bauen');?>
								<?php endif;?>
								</h6> 
							</div>
						</div>
					</div>
					<div class="col-6 col-md-2 cs-countdown-item">
						<div class="item">
							<div class="down">
								<h3 class="minutes rot2"><?php esc_html_e('00','bauen');?></h3> 
							</div>
							<div class="item-info">
								<h6>
								<?php if (( get_post_meta($post->ID,'bauen_coming_soon_page_minutes_opt',true))):?>
								    <?php echo esc_html(get_post_meta($post->ID,'bauen_coming_soon_page_minutes_opt',true)); ?>
								<?php else : ?>
								    <?php esc_html_e('Minutes','bauen');?>
								<?php endif;?>
								</h6>
							</div>
						</div>
					</div>
					<div class="col-6 col-md-2 cs-countdown-item">
						<div class="item">
							<div class="down">
								<h3 class="seconds rot2"><?php esc_html_e('00','bauen');?></h3> 
							</div>
							<div class="item-info">
								<h6>
								<?php if (( get_post_meta($post->ID,'bauen_coming_soon_page_seconds_opt',true))):?>
								    <?php echo esc_html(get_post_meta($post->ID,'bauen_coming_soon_page_seconds_opt',true)); ?>
								<?php else : ?>
								    <?php esc_html_e('Seconds','bauen');?>
								<?php endif;?>
								</h6> 
							</div>
						</div>
					</div>
				</div>
				<?php endif;?>	
				<?php if (( get_post_meta($post->ID,'bauen_coming_soon_page_subscribe_shortcode_opt',true))):?>
				<div class="row text-center">
					<div class="offset-md-3 col-md-6">
						<?php echo do_shortcode(get_post_meta($post->ID,'bauen_coming_soon_page_subscribe_shortcode_opt',true)) ?>
					</div>
				</div>
				<?php endif;?>
			</div>
		</div>
	</section>
	
	<?php wp_enqueue_style('bauen-style-multipage-light');?>
	<?php wp_enqueue_script('bauen-coming-soon-script');?>
	<?php wp_enqueue_script('bauen-custom');?>	
 
<?php get_footer(); ?>