feat: ajout support miniatures
This commit is contained in:
parent
7817f3999a
commit
5c087201ed
3 changed files with 16 additions and 4 deletions
|
@ -4,7 +4,17 @@
|
|||
<article class="card card-preview card-primary">
|
||||
<a href="<?php the_permalink(); ?>" class="preview-link">
|
||||
<div class="preview-item">
|
||||
|
||||
<?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">
|
||||
|
|
|
@ -138,8 +138,9 @@ $preview-height: 8*$lineheight;
|
|||
text-align:center;
|
||||
margin:auto;
|
||||
padding:auto;
|
||||
display: block;
|
||||
display: flex;
|
||||
width:100%;
|
||||
height: $preview-height;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Reference in a new issue