homegrade_theme_production/template-components/card-thematique.php
2023-08-03 10:31:09 +02:00

22 lines
1.2 KiB
PHP

<?php
// $thematique est un post type object term de la taxonomie thematiques
$thematique = $args['thematique'];
$taxonomy_picture = get_field('taxonomy_pictures', $thematique);
$color = getThematiqueFamilySlug($thematique->slug);
?>
<div class="card-thematique card-<?php echo $thematique->slug ?>" data-taxonomy="<?php echo $thematique->slug ?>">
<img class="card-thematique__thumbnail" src="<?php echo $taxonomy_picture['illustration_s']['sizes']['medium'] ?>" alt="">
<h3 class="card-thematique__title text-<?php echo getThematiqueFamilySlug($thematique->slug) ?>"><?php echo $thematique->name ?></h3>
<p class="card-thematique__description"><?php echo $thematique->description ?></p>
<a class="card-thematique__cta hover:text-<?php echo getThematiqueFamilySlug($thematique->slug) ?>" href="<?php echo get_term_link($thematique) ?> ">
<?php echo __("En savoir plus ", "homegrade-theme__texte-fonctionnel") ?>
<span class="sr-only"><?php echo __("sur ", "homegrade-theme__texte-fonctionnel") ?><?php echo $thematique->slug ?></span>
<div class="cta_arrow_button">
<img src='<?php echo get_template_directory_uri() ?>/resources/img/graphic-assets/arrow-right-circle.svg' alt=''>
</div>
</a>
</div>