Replaces flex by grid layout on thumbnail view mode.

This commit is contained in:
mateuswetah 2018-09-27 14:44:11 -03:00
parent 91d72401db
commit cd9fe9c6d9
2 changed files with 19 additions and 14 deletions

View File

@ -1,6 +1,13 @@
.tainacan-grid-container {
min-height: 50vh;
padding: 30px 4.166666667%;
display: -ms-grid;
display: grid;
grid-template-columns: repeat(auto-fill, 285px);
grid-gap: 0px;
justify-content: space-evenly;
animation-name: item-appear;
animation-duration: 0.5s;
.row { justify-content: space-around }
.col { flex-grow: 0; }

View File

@ -2,23 +2,21 @@
<div class="tainacan-grid-container">
<div class="row no-gutters">
<?php while ( have_posts() ) : the_post(); ?>
<div class="col">
<a class="tainacan-grid-item" href="<?php the_permalink(); ?>">
<p class="metadata-title">
<?php the_title(); ?>
</p>
<?php if ( has_post_thumbnail() ) : ?>
<?php the_post_thumbnail( 'tainacan-medium' ); ?>
<?php else : ?>
<?php echo '<img alt="Thumbnail placeholder" src="' . get_template_directory_uri() . '/assets/images/thumbnail_placeholder.png">'?>
<?php endif; ?>
</a>
</div>
<a class="tainacan-grid-item" href="<?php the_permalink(); ?>">
<p class="metadata-title">
<?php the_title(); ?>
</p>
<?php if ( has_post_thumbnail() ) : ?>
<?php the_post_thumbnail( 'tainacan-medium' ); ?>
<?php else : ?>
<?php echo '<img alt="Thumbnail placeholder" src="' . get_template_directory_uri() . '/assets/images/thumbnail_placeholder.png">'?>
<?php endif; ?>
</a>
<?php endwhile; ?>
</div>
</div>
<?php else : ?>