<?php
/*
 * Template Name: Careers Single
 * @package WordPress
 */
get_header(); ?>
<div class='container-fluid page-header'>
	<div class='row'>
		<?php if (has_post_thumbnail()){
			the_post_thumbnail('full',array('class'=>'img-responsive full-width'));
		}
        else{
        ?>
            <img class="img-responsive full-width" src="<?php echo get_home_url(); ?>/wp-content/uploads/2018/01/build-a-future.jpg">
        <?php
        }
        ?>
		<h1 class="large"><?php the_title(); ?></h1>
	</div>
</div>	
<div class='container'>
	<div class='row'>
		<div class='col-xs-12 col-sm-12 col-md-12 col-lg-12 page-wrap'>
			<main id="main" class="site-main" role="main">
				<div class="select-department">
					<?php 
					$terms = wp_get_post_terms( get_the_ID(), 'department');
					$term = $terms[0];
					?>
					<h5>Department - <?php echo $term->name ?></h5>

				</div>
                <h2 class="designation"><?php the_title() ?></h2>
                <p class="job-date"><?php echo get_the_date(); ?></p>
				<?php
				while ( have_posts() ) : the_post();
					get_template_part( 'template-parts/content', 'job' );

				endwhile;
				?>
			</main><!-- .site-main -->
		</div>
	</div>
</div>
<div class="job-form-wrapper">
	<div class="container">
    	<div class="row">
        	<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
            	<?php echo do_shortcode( '[contact-form-7 id="4" title="Contact form 1"]') ?>
            </div>
        </div>
    </div>
</div>

<?php get_footer(); ?>