refining card news with dates and proportions sizes
This commit is contained in:
parent
8093021764
commit
412e71633f
|
|
@ -23,7 +23,7 @@
|
|||
/* @apply h-full ; */
|
||||
}
|
||||
&__heading {
|
||||
@apply flex flex-col-reverse;
|
||||
@apply flex flex-col !mb-6;
|
||||
}
|
||||
|
||||
&__tag {
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
}
|
||||
|
||||
&__title {
|
||||
@apply text-2xl font-bold mb-4 text-secondary;
|
||||
line-height: 1.1;
|
||||
@apply text-lg font-bold text-secondary mb-1;
|
||||
line-height: 1.2;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,28 +1,33 @@
|
|||
<?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;
|
||||
$thematique = $args['thematique'] ?? null;
|
||||
$mainThematique = getMainThematique($thematique) ?? null;
|
||||
$post_ID = $args['post_ID'];
|
||||
$card_variant = $args['card_variant'];
|
||||
$post_thumbnail = $args['post_thumbnail'];
|
||||
$post_title = $args['post_title'];
|
||||
$post_date = $args['post_date'] ?? null;
|
||||
$news_type = $args['news_type'] ?? null;
|
||||
$thematique = $args['thematique'] ?? null;
|
||||
$mainThematique = getMainThematique($thematique) ?? 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; ?>
|
||||
<?php if ($thematique) : ?>
|
||||
|
||||
<p class="card-news__thematique-tag card-news__thematique-tag--<?php echo $mainThematique->slug ?>"><?php echo $thematique->name ?></p>
|
||||
<?php endif; ?>
|
||||
<h3 class="card-news__title"><?php echo $post_title ?></h3>
|
||||
<?php if ($post_date) : ?>
|
||||
<p class="card-news__post-date card-news__post-date"><?php echo $post_date ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<a href="<?php echo get_the_permalink($post_ID) ?>" class="cta cta--read-more cta--with-arrow-button cta--streched ">
|
||||
<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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user