Permalink
Browse files

Update image and script prefixes to always be "grid-mag".

  • Loading branch information...
gonzomir committed Oct 18, 2017
1 parent 68eadcd commit 0e61381657e5c0b8111dfae6d87620ec94d6500d
Showing with 21 additions and 21 deletions.
  1. +15 −15 functions.php
  2. +1 −1 inc/customizer.php
  3. +1 −1 template-parts/content-single.php
  4. +4 −4 template-parts/content.php
View
@@ -82,21 +82,21 @@ function grid_mag_setup() {
) );
// Add new custom image size, so later you could call it in the theme.
add_image_size( 'gridmag-image-large', 1680, 945, true ); // 16/9
add_image_size( 'gridmag-image-big', 960, 540, true ); // 16/6
add_image_size( 'gridmag-image-medium', 640, 360, true ); // 16/9
add_image_size( 'gridmag-image-small', 360, 202, true ); // 16/9
add_image_size( 'gridmag-image-tiny', 280, 158, true ); // 16/9
add_image_size( 'gridmag-wide-large', 1680, 630, true ); // 16/6
add_image_size( 'gridmag-wide-medium', 960, 360, true ); // 16/6
add_image_size( 'gridmag-wide-small', 640, 240, true ); // 16/6
add_image_size( 'gridmag-wide-tiny', 320, 120, true ); // 16/6
add_image_size( 'gridmag-card-large', 1680, 1260, true ); // 4/3
add_image_size( 'gridmag-card-medium', 960, 720, true ); // 4/3
add_image_size( 'gridmag-card-small', 640, 480, true ); // 4/3
add_image_size( 'gridmag-card-tiny', 320, 240, true ); // 4/3
add_image_size( 'grid-mag-image-large', 1680, 945, true ); // 16/9
add_image_size( 'grid-mag-image-big', 960, 540, true ); // 16/6
add_image_size( 'grid-mag-image-medium', 640, 360, true ); // 16/9
add_image_size( 'grid-mag-image-small', 360, 202, true ); // 16/9
add_image_size( 'grid-mag-image-tiny', 280, 158, true ); // 16/9
add_image_size( 'grid-mag-wide-large', 1680, 630, true ); // 16/6
add_image_size( 'grid-mag-wide-medium', 960, 360, true ); // 16/6
add_image_size( 'grid-mag-wide-small', 640, 240, true ); // 16/6
add_image_size( 'grid-mag-wide-tiny', 320, 120, true ); // 16/6
add_image_size( 'grid-mag-card-large', 1680, 1260, true ); // 4/3
add_image_size( 'grid-mag-card-medium', 960, 720, true ); // 4/3
add_image_size( 'grid-mag-card-small', 640, 480, true ); // 4/3
add_image_size( 'grid-mag-card-tiny', 320, 240, true ); // 4/3
}
endif;
View
@@ -21,6 +21,6 @@ function grid_mag_customize_register( $wp_customize ) {
* Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
*/
function grid_mag_customize_preview_js() {
wp_enqueue_script( 'grid_mag_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20151215', true );
wp_enqueue_script( 'grid-mag-customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20151215', true );
}
add_action( 'customize_preview_init', 'grid_mag_customize_preview_js' );
@@ -16,7 +16,7 @@
<?php if ( has_post_thumbnail() ) : ?>
<div class="post-thumbnail">
<?php
$thumbnail_size = 'gridmag-wide-medium';
$thumbnail_size = 'grid-mag-wide-medium';
$sizes = '(min-width: 60em) calc( 100vw - (2.5em + (100vw - 60em) / 5) * 2 ), (min-width: 40em) calc(100vw - (1.5em + (100vw - 40em) / 20) * 2), calc(100vw - 3em)';
?>
<?php the_post_thumbnail( $thumbnail_size, array( 'sizes' => $sizes ) ); ?>
@@ -31,20 +31,20 @@
<?php if ( has_post_thumbnail() ) : ?>
<a class="post-thumbnail" href="<?php the_permalink(); ?>">
<?php
$thumbnail_size = 'gridmag-image-big';
$thumbnail_size = 'grid-mag-image-big';
$sizes = '(min-width: 60em) calc( (100vw - (2.5em + (100vw - 60em) / 5) * 2) * 2 / 3 - .75em ), (min-width: 40em) calc(100vw - (1.5em + (100vw - 40em) / 20) * 2), calc(100vw - 3em)';
if ( is_home() && is_front_page() ) {
if ( $wp_query->current_post > 0 ) {
$thumbnail_size = 'gridmag-card-tiny';
$thumbnail_size = 'grid-mag-card-tiny';
$sizes = '(min-width: 60em) calc( (100vw - (2.5em + (100vw - 60em) / 5) * 2 - 3em) / 3 ), (min-width: 40em) calc( (100vw - (1.5em + (100vw - 40em) / 20) * 2 - 1.5em) / 2 ), calc(100vw - 3em)';
}
else {
$thumbnail_size = 'gridmag-card-small';
$thumbnail_size = 'grid-mag-card-small';
$sizes = '(min-width: 60em) calc( (100vw - (2.5em + (100vw - 60em) / 5) * 2 - 3em) / 3 * 2 + 1.5em ), (min-width: 40em) calc( 100vw - (1.5em + (100vw - 40em) / 20) * 2 ), calc(100vw - 3em)';
}
}
if ( is_single() ) {
$thumbnail_size = 'gridmag-wide-medium';
$thumbnail_size = 'grid-mag-wide-medium';
$sizes = '(min-width: 60em) calc( 100vw - (2.5em + (100vw - 60em) / 5) * 2) ), (min-width: 40em) calc(100vw - (1.5em + (100vw - 40em) / 20) * 2), calc(100vw - 3em)';
}
?>

0 comments on commit 0e61381

Please sign in to comment.