Compare commits

..

2 Commits

Author SHA1 Message Date
Nonimart
165721e03a FEATURE Adapting revue-grid to use reusable post-card component
All checks were successful
continuous-integration/drone/push Build is passing
2026-03-23 15:28:53 +01:00
Nonimart
3c3e8615f3 FEATURE ADapting api to use reusable post-card component 2026-03-23 15:28:28 +01:00
2 changed files with 26 additions and 15 deletions

View File

@ -219,12 +219,19 @@ function build_revues($request)
if ($revues->have_posts()) :
while ($revues->have_posts()) : $revues->the_post();
get_template_part('template-parts/revues/card-revue', null, array(
'date' => get_the_date(),
'image' => get_the_post_thumbnail_url(),
'link' => get_the_permalink(),
// get_template_part('template-parts/revues/card-revue', null, array(
// 'date' => get_the_date(),
// 'image' => get_the_post_thumbnail_url(),
// 'link' => get_the_permalink(),
// 'ID' => get_the_ID(),
// 'ThumbnailFocalPosition' => safe_get_thumbnail_focal_point_css(),
// ));
get_template_part('template-parts/components/cards/post-card', null, array(
'ID' => get_the_ID(),
'ThumbnailFocalPosition' => safe_get_thumbnail_focal_point_css(),
'showTags' => false,
'has_thumbnail_overlay' => true,
));
endwhile;
else :

View File

@ -66,24 +66,28 @@ $thematiques = get_terms(array(
<option value="date_asc"><?php _e('Numéros anciens en premier', 'dynamiques'); ?></option>
<option value="title_asc"><?php _e('Par ordre alphabétique', 'dynamiques'); ?></option>
</select>
</div>
<ul class="post-grid__list">
<?php if ($revues->have_posts()) : ?>
<?php while ($revues->have_posts()) : $revues->the_post(); ?>
<?php get_template_part('template-parts/revues/card-revue', null, array(
'date' => get_the_date(),
'image' => get_the_post_thumbnail_url(),
'link' => get_the_permalink(),
<?php
//CODE TO DELETE BEACAUSE CARD HAS BEEN UPDATED WITH CARHOP POOST_CARD MODEL
// get_template_part('template-parts/revues/card-revue', null, array(
// 'date' => get_the_date(),
// 'image' => get_the_post_thumbnail_url(),
// 'link' => get_the_permalink(),
// 'ID' => get_the_ID(),
// 'ThumbnailFocalPosition' => safe_get_thumbnail_focal_point_css(),
// ));
?>
<?php get_template_part('template-parts/components/cards/post-card', null, array(
'ID' => get_the_ID(),
'ThumbnailFocalPosition' => safe_get_thumbnail_focal_point_css(),
'showTags' => false,
'has_thumbnail_overlay' => true,
)); ?>
<?php endwhile; ?>
<?php endif; ?>