<?php
get_header();
$args = array(
	'meta_key' => '_wp_page_template',
	'meta_value' => "template-archive-jobs.php"
);
$relatedPageTemplatePage = get_pages($args) ? get_pages($args)[0] : null;
?>

<?php if (have_posts()) : ?>
	<?php while (have_posts()) : the_post(); ?>
		<div class="single-post-container single-post-container--jobs">

			<?php /* --------
				BREADCRUMB
			---------------*/ ?>
			<nav class="breadcrumbs_navigation" aria-label="<?php echo __("Vous êtes ici", "homegrade-theme__texte-fonctionnel") ?>">
				<ol>
					<li>
						<a href="<?php echo home_url() ?>" title="<?php echo __("Accueil", "homegrade-theme__texte-fonctionnel") ?>">
							<img src="<?php echo get_template_directory_uri() . "/resources/img/pictogrammes/icon_house_dark.svg" ?>" alt="">
						</a>
					</li>
					<li>
						<a href="<?php echo get_the_permalink($relatedPageTemplatePage) ?>">
							<?php echo __("Jobs", "homegrade-theme__texte-fonctionnel") ?>
						</a>
					</li>
					<li>
						<a href="<?php echo get_the_permalink(get_the_id()) ?>" aria-current='location'>
							<?php echo get_the_title(get_the_id()) ?>
						</a>
					</li>
				</ol>
			</nav>


			<div class="post-news-page-container">
				<?php /* --------
					HEADING BOX
			---------------*/ ?>
				<?php
				get_template_part("template-components/heading-box--job", null, array(
					"title" => get_the_title(),
					"thumbnail" => get_the_post_thumbnail(get_the_ID(), "full", array('class' => 'heading-box--jobs__thumbnail')),
					"modified" => get_the_modified_date(),
					"subtitle" => __("Offre d'emploi", "homegrade-theme__texte-fonctionnel"),

				));
				?>
				<article class="entry-content  single-news-editor-content">
					<?php
					the_content();
					?>
				</article>
			</div>

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






	<?php
	get_footer();
