apply new image sizes

This commit is contained in:
Leo Germani 2018-07-19 11:18:52 -03:00
parent 2a44403571
commit ebd0197587
13 changed files with 14 additions and 19 deletions

View File

@ -117,12 +117,7 @@ if(!function_exists('tainacan_setup')) {
]); ]);
} }
/** add_image_size( 'tainacan-theme-list-post', 300, 200, true );
*
*/
add_image_size( 'collection-list-table', 40, 40 );
add_image_size( 'collection-list-grid', 250, 275 );
add_image_size( 'theme-list-post', 300, 200, true );
} }
} }

View File

@ -10,7 +10,7 @@
<a href="<?php the_permalink(); ?>"> <a href="<?php the_permalink(); ?>">
<div class="cd" style="background-image: url('<?php the_post_thumbnail_url('medium'); ?>')"></div> <div class="cd" style="background-image: url('<?php the_post_thumbnail_url('medium'); ?>')"></div>
<?php if ( has_post_thumbnail() ): ?> <?php if ( has_post_thumbnail() ): ?>
<?php the_post_thumbnail('medium'); ?> <?php the_post_thumbnail('tainacan-medium'); ?>
<?php else: ?> <?php else: ?>
<?php echo '<img alt="Thumbnail placeholder" src="'.get_stylesheet_directory_uri().'/assets/images/thumbnail_placeholder.png">'?> <?php echo '<img alt="Thumbnail placeholder" src="'.get_stylesheet_directory_uri().'/assets/images/thumbnail_placeholder.png">'?>
<?php endif; ?> <?php endif; ?>

View File

@ -9,7 +9,7 @@
<?php if ( tainacan_current_view_displays('thumbnail') ): ?> <?php if ( tainacan_current_view_displays('thumbnail') ): ?>
<a href="<?php the_permalink(); ?>"> <a href="<?php the_permalink(); ?>">
<?php if ( has_post_thumbnail() ): ?> <?php if ( has_post_thumbnail() ): ?>
<?php the_post_thumbnail('medium_large'); ?> <?php the_post_thumbnail('tainacan-medium-full'); ?>
<?php else: ?> <?php else: ?>
<?php echo '<img alt="Thumbnail placeholder" src="'.get_stylesheet_directory_uri().'/assets/images/thumbnail_placeholder.png">'?> <?php echo '<img alt="Thumbnail placeholder" src="'.get_stylesheet_directory_uri().'/assets/images/thumbnail_placeholder.png">'?>
<?php endif; ?> <?php endif; ?>

View File

@ -20,7 +20,7 @@
<?php if ( tainacan_current_view_displays('thumbnail') ): ?> <?php if ( tainacan_current_view_displays('thumbnail') ): ?>
<a href="<?php the_permalink(); ?>"> <a href="<?php the_permalink(); ?>">
<?php if ( has_post_thumbnail() ): ?> <?php if ( has_post_thumbnail() ): ?>
<?php the_post_thumbnail('medium_large'); ?> <?php the_post_thumbnail('tainacan-medium-full'); ?>
<?php else: ?> <?php else: ?>
<?php echo '<img alt="Thumbnail placeholder" src="'.get_stylesheet_directory_uri().'/assets/images/thumbnail_placeholder.png">'?> <?php echo '<img alt="Thumbnail placeholder" src="'.get_stylesheet_directory_uri().'/assets/images/thumbnail_placeholder.png">'?>
<?php endif; ?> <?php endif; ?>

View File

@ -12,7 +12,7 @@
<div class="mat"> <div class="mat">
<div class="art"> <div class="art">
<?php if ( has_post_thumbnail() ): ?> <?php if ( has_post_thumbnail() ): ?>
<?php the_post_thumbnail('medium_large'); ?> <?php the_post_thumbnail('tainacan-medium-full'); ?>
<?php else: ?> <?php else: ?>
<?php echo '<img alt="Thumbnail placeholder" src="'.get_stylesheet_directory_uri().'/assets/images/thumbnail_placeholder.png">'?> <?php echo '<img alt="Thumbnail placeholder" src="'.get_stylesheet_directory_uri().'/assets/images/thumbnail_placeholder.png">'?>
<?php endif; ?> <?php endif; ?>

View File

@ -14,7 +14,7 @@
<div class="mat"> <div class="mat">
<div class="art"> <div class="art">
<?php if ( has_post_thumbnail() ): ?> <?php if ( has_post_thumbnail() ): ?>
<?php the_post_thumbnail('medium_large'); ?> <?php the_post_thumbnail('tainacan-medium-full'); ?>
<?php else: ?> <?php else: ?>
<?php echo '<img alt="Thumbnail placeholder" src="'.get_stylesheet_directory_uri().'/assets/images/thumbnail_placeholder.png">'?> <?php echo '<img alt="Thumbnail placeholder" src="'.get_stylesheet_directory_uri().'/assets/images/thumbnail_placeholder.png">'?>
<?php endif; ?> <?php endif; ?>

View File

@ -13,7 +13,7 @@
<?php endif; ?> <?php endif; ?>
<?php if ( tainacan_current_view_displays('thumbnail') ): ?> <?php if ( tainacan_current_view_displays('thumbnail') ): ?>
<?php if ( has_post_thumbnail() ): ?> <?php if ( has_post_thumbnail() ): ?>
<?php the_post_thumbnail('medium'); ?> <?php the_post_thumbnail('tainacan-medium'); ?>
<?php else: ?> <?php else: ?>
<?php echo '<img alt="Thumbnail placeholder" src="'.get_stylesheet_directory_uri().'/assets/images/thumbnail_placeholder.png">'?> <?php echo '<img alt="Thumbnail placeholder" src="'.get_stylesheet_directory_uri().'/assets/images/thumbnail_placeholder.png">'?>
<?php endif; ?> <?php endif; ?>

View File

@ -9,7 +9,7 @@
<div class="card border-0"> <div class="card border-0">
<?php if ( tainacan_current_view_displays('thumbnail') ): ?> <?php if ( tainacan_current_view_displays('thumbnail') ): ?>
<?php if ( has_post_thumbnail() ): ?> <?php if ( has_post_thumbnail() ): ?>
<?php the_post_thumbnail('medium'); ?> <?php the_post_thumbnail('tainacan-medium-full'); ?>
<?php else: ?> <?php else: ?>
<?php echo '<img alt="Thumbnail placeholder" src="'.get_stylesheet_directory_uri().'/assets/images/thumbnail_placeholder.png">'?> <?php echo '<img alt="Thumbnail placeholder" src="'.get_stylesheet_directory_uri().'/assets/images/thumbnail_placeholder.png">'?>
<?php endif; ?> <?php endif; ?>

View File

@ -9,7 +9,7 @@
<?php if ( tainacan_current_view_displays('thumbnail') ): ?> <?php if ( tainacan_current_view_displays('thumbnail') ): ?>
<a href="<?php the_permalink(); ?>"> <a href="<?php the_permalink(); ?>">
<?php if ( has_post_thumbnail() ): ?> <?php if ( has_post_thumbnail() ): ?>
<?php the_post_thumbnail('medium_large'); ?> <?php the_post_thumbnail('tainacan-medium-full'); ?>
<?php else: ?> <?php else: ?>
<?php echo '<img alt="Thumbnail placeholder" src="'.get_stylesheet_directory_uri().'/assets/images/thumbnail_placeholder.png">'?> <?php echo '<img alt="Thumbnail placeholder" src="'.get_stylesheet_directory_uri().'/assets/images/thumbnail_placeholder.png">'?>
<?php endif; ?> <?php endif; ?>

View File

@ -11,7 +11,7 @@
<?php if ( tainacan_current_view_displays('thumbnail') ): ?> <?php if ( tainacan_current_view_displays('thumbnail') ): ?>
<a href="<?php the_permalink(); ?>"> <a href="<?php the_permalink(); ?>">
<?php if ( has_post_thumbnail() ): ?> <?php if ( has_post_thumbnail() ): ?>
<?php the_post_thumbnail('thumbnail', array('class' => 'mr-4')); ?> <?php the_post_thumbnail('tainacan-medium', array('class' => 'mr-4')); ?>
<?php else: ?> <?php else: ?>
<?php echo '<div class="mr-4"><img alt="Thumbnail placeholder" src="'.get_stylesheet_directory_uri().'/assets/images/thumbnail_placeholder.png"></div>'?> <?php echo '<div class="mr-4"><img alt="Thumbnail placeholder" src="'.get_stylesheet_directory_uri().'/assets/images/thumbnail_placeholder.png"></div>'?>
<?php endif; ?> <?php endif; ?>

View File

@ -1,7 +1,7 @@
<div class="row blog-post mb-3"> <div class="row blog-post mb-3">
<?php if ( has_post_thumbnail() && get_the_post_thumbnail_url(get_the_ID(),'theme-list-post') ) : ?> <?php if ( has_post_thumbnail() ) : ?>
<div class="col-xs-12 col-md-4 blog-thumbnail align-self-center text-center mb-4 mb-md-0"> <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(),'theme-list-post') ?>" class="img-fluid" alt=""></a> <a href="<?php the_permalink(); ?>"><img src="<?php echo get_the_post_thumbnail_url(get_the_ID(),'tainacan-theme-list-post') ?>" class="img-fluid" alt=""></a>
</div> </div>
<?php endif; ?> <?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"> <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">

View File

@ -8,7 +8,7 @@
<?php the_title(); ?> <?php the_title(); ?>
</p> </p>
<?php if ( has_post_thumbnail() && get_the_post_thumbnail_url(get_the_ID()) ) : ?> <?php if ( has_post_thumbnail() && get_the_post_thumbnail_url(get_the_ID()) ) : ?>
<img src="<?php echo get_the_post_thumbnail_url(get_the_ID(), 'collection-list-grid') ?>" class="img-fluid tainacan-list-collection--grid-img" alt=""> <img src="<?php echo get_the_post_thumbnail_url(get_the_ID(), 'tainacan-medium') ?>" class="img-fluid tainacan-list-collection--grid-img" alt="">
<?php else : ?> <?php else : ?>
<div class="image-placeholder"> <div class="image-placeholder">
<h4> <h4>

View File

@ -16,7 +16,7 @@
<tr class="tainacan-list-collection" onclick="location.href='<?php the_permalink(); ?>'"> <tr class="tainacan-list-collection" onclick="location.href='<?php the_permalink(); ?>'">
<td class="collection-miniature"> <td class="collection-miniature">
<?php if ( has_post_thumbnail() && get_the_post_thumbnail_url(get_the_ID()) ) : ?> <?php if ( has_post_thumbnail() && get_the_post_thumbnail_url(get_the_ID()) ) : ?>
<img src="<?php echo get_the_post_thumbnail_url(get_the_ID(), 'collection-list-table') ?>" class="img-fluid rounded-circle" alt=""> <img src="<?php echo get_the_post_thumbnail_url(get_the_ID(), 'tainacan-small') ?>" class="img-fluid rounded-circle" alt="">
<?php else : ?> <?php else : ?>
<div class="image-placeholder"> <div class="image-placeholder">
<h4> <h4>