Fixes on thumbnail view mode for images that are too small to be cropped.
This commit is contained in:
parent
81f545396a
commit
fd1a8d6860
|
@ -21,8 +21,17 @@
|
|||
display: block;
|
||||
text-decoration: none !important;
|
||||
|
||||
.thumbnail-container {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #f6f6f6;
|
||||
height: 255px;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 255px;
|
||||
max-width: 255px;
|
||||
max-height: 255px;
|
||||
width: auto;
|
||||
height: auto;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
|
|
@ -9,7 +9,9 @@
|
|||
<?php the_title(); ?>
|
||||
</p>
|
||||
<?php if ( has_post_thumbnail() ) : ?>
|
||||
<?php the_post_thumbnail( 'tainacan-medium' ); ?>
|
||||
<div class="thumbnail-container">
|
||||
<?php the_post_thumbnail( 'tainacan-medium' ); ?>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<?php echo '<img alt="Thumbnail placeholder" src="' . get_template_directory_uri() . '/assets/images/thumbnail_placeholder.png">'?>
|
||||
<?php endif; ?>
|
||||
|
|
Loading…
Reference in New Issue