introducing page-card component

This commit is contained in:
Antoine M 2023-11-29 17:52:35 +01:00
parent 2a21890c01
commit d27b867e78
2 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,10 @@
.page-card {
@apply p-6 shadowed my-4 bg-white rounded-2xl;
&__title {
@apply !text-2xl font-bold text-secondary;
}
&__cta {
@apply hidden;
}
}

View File

@ -0,0 +1,18 @@
<?php
echo '<pre>';
print_r($args);
echo '</pre>';
?>
<div class="page-card">
<h2 class="page-card__title"><?php echo $args['title'] ?></h2>
<p class="page-card__excerpt"><?php echo $args['excerpt'] ?></p>
<a href=" <?php echo $args['permalink'] ?>" class="page-card__cta 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 $args['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>