32 lines
1.0 KiB
PHP
32 lines
1.0 KiB
PHP
<?php
|
|
$post_ID = $args['post_ID'];
|
|
$card_variant = $args['card_variant'];
|
|
$post_thumbnail = $args['post_thumbnail'];
|
|
$post_title = $args['post_title'];
|
|
$news_type = $args['news_type'] ?? null;
|
|
|
|
?>
|
|
|
|
|
|
|
|
<div class="card-news <?php echo $card_variant ? 'card-news--' . $card_variant : '' ?> ">
|
|
|
|
<?php echo $post_thumbnail ?>
|
|
<div class="card-news__inner">
|
|
<div class="card-news__heading">
|
|
<h3 class="card-news__title"><?php echo $post_title ?></h3>
|
|
<?php if ($news_type) : ?>
|
|
<p class="card-news__tag"><?php echo $news_type[0]->name ?></p>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
<a href="<?php echo get_the_permalink($post_ID) ?>" class="cta cta--read-more cta--with-arrow-button cta--streched ">
|
|
<!-- cta-read-more -->
|
|
<span><?php echo __("Lire l'article", 'homegrade-theme__texte-fonctionnel') ?></span>
|
|
<span class="sr-only"><?php echo $post_title ?></span>
|
|
<img class="cta_arrow_button" src='<?php echo get_template_directory_uri() ?>/resources/img/graphic-assets/arrow-right-circle.svg' alt=''>
|
|
|
|
</a>
|
|
</div>
|
|
|
|
</div>
|