From 792c8c34066379d0838ffbe967fbc530de53d258 Mon Sep 17 00:00:00 2001 From: Michelle Langston Date: Thu, 23 Feb 2012 19:31:05 +0000 Subject: [PATCH 1/9] _s: Remove duplicate .entry-meta class. git-svn-id: https://wpcom-themes.svn.automattic.com/_s/@9000 d957f892-c61d-0410-b221-f235e6eecf30 --- style.css | 3 --- 1 file changed, 3 deletions(-) diff --git a/style.css b/style.css index 188c2e8c..2388de48 100644 --- a/style.css +++ b/style.css @@ -415,9 +415,6 @@ a:active { .sticky { } -.entry-meta { - clear: both; -} .hentry { margin: 0 0 1.5em; } From fc97fbd34deb63b93ae89694dc5652da0d90357d Mon Sep 17 00:00:00 2001 From: Ian Stewart Date: Wed, 29 Feb 2012 15:43:18 +0000 Subject: [PATCH 2/9] Merge branch 'master' of github.com:Automattic/_s git-svn-id: https://wpcom-themes.svn.automattic.com/_s/@9022 d957f892-c61d-0410-b221-f235e6eecf30 --- inc/tweaks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/tweaks.php b/inc/tweaks.php index 1900ef39..03e8de91 100644 --- a/inc/tweaks.php +++ b/inc/tweaks.php @@ -25,7 +25,7 @@ add_filter( 'wp_page_menu_args', '_s_page_menu_args' ); * @since _s 1.0 */ function _s_body_classes( $classes ) { - // Adds a class of single-author to blogs with only 1 published author + // Adds a class of group-blog to blogs with more than 1 published author if ( is_multi_author() ) { $classes[] = 'group-blog'; } From 8298c23e74048e3b0eb96825f6d53fbf04b06203 Mon Sep 17 00:00:00 2001 From: Lance Willett Date: Wed, 29 Feb 2012 18:53:02 +0000 Subject: [PATCH 3/9] _s: rework nav JS file a bit * Remove top-level browser width variable, only needed in one internal function * Add timeout so that the resize action doesn't constantly trigger, instead give it a short delay to anticipate the user finishing the window size change * Better comments * Incorporate mattwiebe fix for calling jQuery objects incorrectly, see http://core.trac.wordpress.org/ticket/20131 git-svn-id: https://wpcom-themes.svn.automattic.com/_s/@9026 d957f892-c61d-0410-b221-f235e6eecf30 --- js/small-menu.js | 52 ++++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/js/small-menu.js b/js/small-menu.js index d0e5a3cb..28b34306 100644 --- a/js/small-menu.js +++ b/js/small-menu.js @@ -1,31 +1,39 @@ +/** + * Handles toggling the main navigation menu for small screens. + */ jQuery( document ).ready( function( $ ) { - var $browserWidth = $( window ).width(); - var $masthead = $( '#masthead' ); + var $masthead = $( '#masthead' ), + timeout = false; $.fn.smallMenu = function() { - $( $masthead ).find( '.site-navigation' ).removeClass( 'main-navigation' ).addClass( 'main-small-navigation' ); - $( $masthead ).find( '.site-navigation h1' ).removeClass( 'assistive-text' ).addClass( 'menu-toggle' ); + $masthead.find( '.site-navigation' ).removeClass( 'main-navigation' ).addClass( 'main-small-navigation' ); + $masthead.find( '.site-navigation h1' ).removeClass( 'assistive-text' ).addClass( 'menu-toggle' ); - $( '.menu-toggle' ).click( function () { - $( $masthead ).find( '.menu' ).toggle(); + $( '.menu-toggle' ).click( function() { + $masthead.find( '.menu' ).toggle(); $( this ).toggleClass( 'toggled-on' ); - }); - } + } ); + }; - $(window).resize(function() { - var $browserWidth = $( window ).width(); - - if ( $browserWidth < 600 ) { - $.fn.smallMenu(); - } else { - $( $masthead ).find( '.site-navigation' ).removeClass( 'main-small-navigation' ).addClass( 'main-navigation' ); - $( $masthead ).find( '.site-navigation h1' ).removeClass( 'menu-toggle' ).addClass( 'assistive-text' ); - $( $masthead ).find( '.menu' ).removeAttr( 'style' ); - } - }); - - if ( $browserWidth < 600 ) { + // Check viewport width on first load. + if ( $( window ).width() < 600 ) $.fn.smallMenu(); - } + // Check viewport width when user resizes the browser window. + $( window ).resize( function() { + var browserWidth = $( window ).width(); + + if ( false !== timeout ) + clearTimeout( timeout ); + + timeout = setTimeout( function() { + if ( browserWidth < 600 ) { + $.fn.smallMenu(); + } else { + $masthead.find( '.site-navigation' ).removeClass( 'main-small-navigation' ).addClass( 'main-navigation' ); + $masthead.find( '.site-navigation h1' ).removeClass( 'menu-toggle' ).addClass( 'assistive-text' ); + $masthead.find( '.menu' ).removeAttr( 'style' ); + } + }, 200 ); + } ); } ); \ No newline at end of file From 10314c8cb42fe34fabe04f51f3b07da583976eb5 Mon Sep 17 00:00:00 2001 From: Michael Fields Date: Tue, 6 Mar 2012 14:03:39 +0000 Subject: [PATCH 4/9] _s: Script dependancies need to be given as an array. Remove unneeded jQuery enqueue. git-svn-id: https://wpcom-themes.svn.automattic.com/_s/@9086 d957f892-c61d-0410-b221-f235e6eecf30 --- functions.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/functions.php b/functions.php index cf3e149c..b7fda767 100644 --- a/functions.php +++ b/functions.php @@ -104,9 +104,7 @@ function _s_scripts() { wp_enqueue_style( 'style', get_stylesheet_uri() ); - wp_enqueue_script( 'jquery' ); - - wp_enqueue_script( 'small-menu', get_template_directory_uri() . '/js/small-menu.js', 'jquery', '20120206', true ); + wp_enqueue_script( 'small-menu', get_template_directory_uri() . '/js/small-menu.js', array( 'jquery' ), '20120206', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); From 34c55ff465294edfa6b05e519d1077333ac471fe Mon Sep 17 00:00:00 2001 From: Michael Fields Date: Tue, 6 Mar 2012 14:40:49 +0000 Subject: [PATCH 5/9] _s: Move post meta separators inside conditionals ensuring that separators will not be orphaned. Use consistent 'edit link' whitespace in image.php as well. git-svn-id: https://wpcom-themes.svn.automattic.com/_s/@9087 d957f892-c61d-0410-b221-f235e6eecf30 --- content.php | 7 +++---- image.php | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/content.php b/content.php index 5a68e4fd..1b60b5e3 100644 --- a/content.php +++ b/content.php @@ -37,7 +37,6 @@ - | + | - | - | + - ', '' ); ?> + | ', '' ); ?> diff --git a/image.php b/image.php index ed7901c6..6b2dbd86 100644 --- a/image.php +++ b/image.php @@ -31,7 +31,7 @@ get_header(); get_the_title( $post->post_parent ) ); ?> - | ', '' ); ?> + | ', '' ); ?>