Fix list post and revised

This commit is contained in:
Fabiano 2018-07-18 16:55:09 -03:00
parent bc51debe05
commit 44a0457009
2 changed files with 18 additions and 10 deletions

View File

@ -7,21 +7,29 @@
}
.blog-post{
.blog-thumbnail{
padding-right: 0;
margin-right: 4.16666666667%;
@media screen {
@media (min-width: 992px){
flex: 0 0 29.333333%;
}
}
/* img{
box-shadow: 0 4px 9px 0 #00000061, 0 5px 15px 0 #00000059;
} */
img{
width: 300px;
height: 193px;
}
}
.blog-content{
&.blog-flex{
@media screen {
@media (min-width: 768px) {
flex: 0 0 61.666667%;
max-width: 61.666667%;
}
@media (min-width: 992px){
flex: 0 0 70.666667%;
max-width: 70.666667%;
flex: 0 0 65.666667%;
max-width: 65.666667%;
padding-left: 0;
}
}
}

View File

@ -1,14 +1,14 @@
<div class="row blog-post mb-4">
<?php if ( has_post_thumbnail() && get_the_post_thumbnail_url(get_the_ID()) ) : ?>
<div class="row blog-post mb-3">
<?php if ( has_post_thumbnail() && get_the_post_thumbnail_url(get_the_ID(),'theme-list-post') ) : ?>
<div class="col-xs-12 col-md-4 blog-thumbnail align-self-center text-center mb-4 mb-md-0">
<a href="<?php the_permalink(); ?>"><img src="<?php echo get_the_post_thumbnail_url(get_the_ID(),'medium') ?>" class="img-fluid" alt=""></a>
<a href="<?php the_permalink(); ?>"><img src="<?php echo get_the_post_thumbnail_url(get_the_ID(),'theme-list-post') ?>" class="img-fluid" alt=""></a>
</div>
<?php endif; ?>
<div class="col-xs-12 blog-content <?php if ( has_post_thumbnail() ) :?>col-md-8 blog-flex<?php else : ?>col-md-12<?php endif; ?>">
<div class="col-xs-12 blog-content <?php if ( has_post_thumbnail() ) :?>col-md-8 blog-flex<?php else : ?>col-md-12<?php endif; ?> align-self-center">
<h3 class="mb-3">
<a href="<?php the_permalink(); ?>" class="font-weight-bold"><?php the_title(); ?></a>
</h3>
<?php echo '<p class="text-black">'.wp_trim_words( get_the_content(), 63, '...' ).'</p>'; ?>
<?php echo '<p class="text-black">'.wp_trim_words( get_the_excerpt(), 28, '...').'</p>'; ?>
<time><?php the_time('j M Y \\a\\t g:i'); echo ', '; _e('for');?></time> <?php echo ' '; the_author_posts_link(); ?>
<a href="<?php the_permalink(); ?>" class="readmore float-right"><?php _e('Read more...'); ?></a>
</div>