<?php /* Template Name: Parcours rénovateur */
get_header();

$parcoursSteps = new WP_Query(array(
	'post_type' => 'parcours',
	'posts_per_page' => -1,
	'order' => 'ASC',
	'status' => 'publish',
	'post_parent'    => '0',
));


?>

<div class="homegrade-page-container homegrade-page-container--parcours-renovateur-index">

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

			<nav class=" breadcrumbs_navigation" aria-label="<?php echo __("Vous êtes ici", "homegrade-theme__texte-fonctionnel") ?>">
				<?php
				$currentPage = get_post();
				$parentPage = $currentPage->post_parent !== 0 ? get_post($currentPage->post_parent) : null;
				$grandParentPage = $parentPage && $parentPage->post_parent ? get_post($parentPage->post_parent) : null;

				?>
				<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>
					<?php if ($grandParentPage) : ?>
						<li><a href="<?php echo get_post_permalink($grandParentPage)  ?>"><?php echo $grandParentPage->post_title ?></a></li>
					<?php endif; ?>
					<?php if ($parentPage) : ?>
						<li><a href="<?php echo get_post_permalink($parentPage)  ?>"><?php echo $parentPage->post_title ?></a></li>
					<?php endif; ?>
					<?php if ($currentPage) : ?>
						<li><a href="<?php echo get_post_permalink($currentPage)  ?>" aria-current="location" aria-disabled="true"><?php echo $currentPage->post_title ?></a></li>
					<?php endif; ?>

				</ol>
			</nav>

			<?php
			$page_icon = get_field('page_icon', get_queried_object());
			$pageIcon = get_field('page_icon', get_queried_object_id()) ?? null;


			?>



			<?php
			the_content();
			?>
		<?php endwhile; ?>

	<?php endif; ?>


	<section class="homegrade-help card-large-content-container">
		<div class="card-large-content card-large-content--has-illustration">
			<img class="card-large-content__top-illustration" src='<?php echo get_template_directory_uri() ?>/resources/img/illustrations/illustration-homegrade-help.svg' alt=''>

			<div class="section_titling">
				<h2 class="section_titling__title"><?php echo __("Comment Homegrade peut vous aider ?", "homegrade-theme__texte-fonctionnel__faq-archive-questions") ?></h2>
				<p class="section_titling__subtitle"><?php echo __("Homegrade met à disposition des outils en ligne pour vous aider dans votre recherche", "homegrade-theme__texte-fonctionnel__faq-archive-questions") ?></p>
			</div>
			<div class="card-large-content__links-container">
				<!-- PUBLICATIONS -->
				<div class="card-large-content__link">
					<?php $publication_page_ID = apply_filters('wpml_object_id', 106, 'page', TRUE); ?>
					<img class="card-large-content__link__page_icon" src="<?php echo get_template_directory_uri() . '/resources/img/pictogrammes/pictogramme-outils.svg' ?>" alt="">
					<h3 class="card-large-content__link__title"><?php echo get_the_title($publication_page_ID) ?></h3>
					<p class="card-large-content__link__excerpt"><?php echo get_the_excerpt($publication_page_ID) ?></p>
					<a class="cta cta--button cta--shadowed" href="<?php echo get_permalink($publication_page_ID) ?>"><?php echo __("Accédez aux publications", "homegrade-theme__texte-fonctionnel__faq-archive-questions") ?></a>
				</div>
				<!-- CONSEILS -->
				<div class="card-large-content__link">
					<?php $conseils_page_ID = apply_filters('wpml_object_id', 102, 'page', TRUE); ?>
					<img class="card-large-content__link__page_icon" src="<?php echo get_template_directory_uri() . '/resources/img/pictogrammes/pictogramme-faq.svg' ?>" alt="">
					<h3 class="card-large-content__link__title"><?php echo get_the_title($conseils_page_ID)  ?></h3>
					<p class="card-large-content__link__excerpt"><?php echo  get_the_excerpt($conseils_page_ID) ?></p>
					<a class="cta cta--button cta--shadowed" href="<?php echo get_permalink($conseils_page_ID) ?>"><?php echo __("Accéder aux conseils ", "homegrade-theme__texte-fonctionnel__faq-archive-questions") ?></a>
				</div>
				<!-- SERVICE -->
				<div class="card-large-content__link">
					<?php $services_page_ID = apply_filters('wpml_object_id', 52, 'page', TRUE); ?>
					<img class="card-large-content__link__page_icon" src="<?php echo get_template_directory_uri() . '/resources/img/pictogrammes/pictogramme-services.svg' ?>" alt="">
					<h3 class="card-large-content__link__title"><?php echo get_the_title($services_page_ID)  ?></h3>
					<p class="card-large-content__link__excerpt"><?php echo  get_the_excerpt($services_page_ID) ?></p>
					<a class="cta cta--button cta--shadowed" href="<?php echo get_permalink($services_page_ID) ?>"><?php echo __("Accéder aux services", "homegrade-theme__texte-fonctionnel__faq-archive-questions") ?></a>
				</div>


			</div>



		</div>



	</section>
</div>

<?php get_footer();
