Fixes on thumbnail view mode for images that are too small to be cropped.

This commit is contained in:
mateuswetah 2018-10-01 16:49:04 -03:00
parent 81f545396a
commit fd1a8d6860
2 changed files with 13 additions and 2 deletions

View File

@ -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;
}

View File

@ -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; ?>