feat: ajout support miniatures

This commit is contained in:
Kazhnuz 2023-03-12 17:24:01 +01:00
parent 7817f3999a
commit 5c087201ed
3 changed files with 16 additions and 4 deletions

View file

@ -4,7 +4,17 @@
<article class="card card-preview card-primary">
<a href="<?php the_permalink(); ?>" class="preview-link">
<div class="preview-item">
<div class="preview-content" aria-hidden="true"><?php the_excerpt(); ?></div>
<?php if(!has_post_thumbnail( $post->ID )) {
?>
<div class="preview-content" aria-hidden="true"><?php the_excerpt(); ?></div>
<?php
} else {
?>
<div class="preview-content" aria-hidden="true"><p class="p-img"><img class="preview-img" src="<?php echo get_the_post_thumbnail_url(); ?>" /></p></div>
<?php
}
?>
<div class="preview-overlay">
<h1 class="card-header"><?php the_title(); ?></h1>
<div class="preview-metadata">

View file

@ -138,8 +138,9 @@ $preview-height: 8*$lineheight;
text-align:center;
margin:auto;
padding:auto;
display: block;
display: flex;
width:100%;
height: $preview-height;
}
}
}

View file

@ -1877,8 +1877,9 @@ ul.breadcrumb, ol.breadcrumb, .breadcrumb {
text-align: center;
margin: auto;
padding: auto;
display: block;
width: 100%; }
display: flex;
width: 100%;
height: 12rem; }
.preview-metadata {
color: #fdf6e3;