<?php
$chapterBlockIndex = $args["chapterBlockIndex"];
?>

<div class="chapter_index">
	<div class="chapter_index__titling">
		<div class="icon">
			<img src="<?php echo get_template_directory_uri() . '/resources/img/graphic-assets/icon-feather-menu.svg' ?>" alt="">
		</div>
		<h2 class="chapter_index__title"> <?php echo __("Dans ce conseil", "homegrade-theme__texte-fonctionnel") ?> </h2>
	</div>
	<ul class="chapter_index__list">
		<div class="chapter_index__position-indicator"></div>
		<?php foreach ($chapterBlockIndex  as $chapter) : ?>
			<li class="chapter_index__link"><a href="<?php echo $chapter['anchor'] ?>"><?php echo $chapter['title'] ?></a></li>
		<?php endforeach; ?>
	</ul>
</div>