_s: Formatting changes:

- Reduce element comments to either the element id or the first element
class.
- Tabs > Spaces.
- Improve adherence to formatting guidelines.
This commit is contained in:
obenland 2013-03-04 16:41:38 -08:00
parent c7f2b7a1ee
commit c4f2aa32ce
18 changed files with 301 additions and 307 deletions

View File

@ -41,7 +41,7 @@ get_header(); ?>
</div><!-- .entry-content -->
</article><!-- #post-0 .post .error404 .not-found -->
</div><!-- #content .site-content -->
</div><!-- #primary .content-area -->
</div><!-- #content -->
</div><!-- #primary -->
<?php get_footer(); ?>

View File

@ -88,8 +88,8 @@ get_header(); ?>
<?php endif; ?>
</div><!-- #content .site-content -->
</section><!-- #primary .content-area -->
</div><!-- #content -->
</section><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

View File

@ -52,7 +52,7 @@
*/
wp_list_comments( array( 'callback' => '_s_comment' ) );
?>
</ol><!-- .commentlist -->
</ol><!-- .comment-list -->
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
<nav id="comment-nav-below" class="navigation-comment" role="navigation">
@ -73,4 +73,4 @@
<?php comment_form(); ?>
</div><!-- #comments .comments-area -->
</div><!-- #comments -->

View File

@ -17,4 +17,4 @@
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', '_s' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php edit_post_link( __( 'Edit', '_s' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>' ); ?>
</article><!-- #post-<?php the_ID(); ?> -->
</article><!-- #post-## -->

View File

@ -56,4 +56,4 @@
<?php edit_post_link( __( 'Edit', '_s' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-meta -->
</article><!-- #post-<?php the_ID(); ?> -->
</article><!-- #post-## -->

View File

@ -58,4 +58,4 @@
<?php edit_post_link( __( 'Edit', '_s' ), '<span class="sep"> | </span><span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-meta -->
</article><!-- #post-<?php the_ID(); ?> -->
</article><!-- #post-## -->

View File

@ -9,7 +9,7 @@
*/
?>
</div><!-- #main .site-main -->
</div><!-- #main -->
<footer id="colophon" class="site-footer" role="contentinfo">
<div class="site-info">
@ -18,8 +18,8 @@
<span class="sep"> | </span>
<?php printf( __( 'Theme: %1$s by %2$s.', '_s' ), '_s', '<a href="http://automattic.com/" rel="designer">Automattic</a>' ); ?>
</div><!-- .site-info -->
</footer><!-- #colophon .site-footer -->
</div><!-- #page .hfeed .site -->
</footer><!-- #colophon -->
</div><!-- #page -->
<?php wp_footer(); ?>

View File

@ -138,7 +138,7 @@ add_action( 'widgets_init', '_s_widgets_init' );
function _s_scripts() {
wp_enqueue_style( 'style', get_stylesheet_uri() );
wp_enqueue_script( 'navigation', get_template_directory_uri() . '/js/navigation.js', null, '20120206', true );
wp_enqueue_script( 'navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true );
wp_enqueue_script( 'skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );

View File

@ -36,7 +36,7 @@
<div class="assistive-text skip-link"><a href="#content" title="<?php esc_attr_e( 'Skip to content', '_s' ); ?>"><?php _e( 'Skip to content', '_s' ); ?></a></div>
<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
</nav><!-- .site-navigation .main-navigation -->
</header><!-- #masthead .site-header -->
</nav><!-- .site-navigation -->
</header><!-- #masthead -->
<div id="main" class="site-main">

View File

@ -112,12 +112,12 @@ get_header();
<?php
// If comments are open or we have at least one comment, load up the comment template
if ( comments_open() || '0' != get_comments_number() )
comments_template( '', true );
comments_template();
?>
<?php endwhile; // end of the loop. ?>
</div><!-- #content .site-content -->
</div><!-- #primary .content-area .image-attachment -->
</div><!-- #content -->
</div><!-- #primary -->
<?php get_footer(); ?>

View File

@ -40,8 +40,8 @@ get_header(); ?>
<?php endif; ?>
</div><!-- #content .site-content -->
</div><!-- #primary .content-area -->
</div><!-- #content -->
</div><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

View File

@ -1,25 +1,19 @@
( function() {
var is_webkit = navigator.userAgent.toLowerCase().indexOf('webkit') > -1;
var is_opera = navigator.userAgent.toLowerCase().indexOf('opera') > -1;
var is_ie = navigator.userAgent.toLowerCase().indexOf('msie') > -1;
var is_webkit = navigator.userAgent.toLowerCase().indexOf( 'webkit' ) > -1,
is_opera = navigator.userAgent.toLowerCase().indexOf( 'opera' ) > -1,
is_ie = navigator.userAgent.toLowerCase().indexOf( 'msie' ) > -1;
if((is_webkit || is_opera || is_ie ) && typeof(document.getElementById) !== 'undefined' ) {
if ( ( is_webkit || is_opera || is_ie ) && 'undefined' !== typeof( document.getElementById ) ) {
var eventMethod = ( window.addEventListener ) ? 'addEventListener' : 'attachEvent';
window[eventMethod]("hashchange", function(event) {
window[ eventMethod ]( 'hashchange', function() {
var element = document.getElementById( location.hash.substring( 1 ) );
if ( element ) {
if (!/^(?:a|select|input|button|textarea)$/i.test(element.tagName)) {
if ( ! /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) )
element.tabIndex = -1;
}
element.focus();
}
}, false );
}
})();

View File

@ -23,13 +23,13 @@ get_header(); ?>
<?php
// If comments are open or we have at least one comment, load up the comment template
if ( comments_open() || '0' != get_comments_number() )
comments_template( '', true );
comments_template();
?>
<?php endwhile; // end of the loop. ?>
</div><!-- #content .site-content -->
</div><!-- #primary .content-area -->
</div><!-- #content -->
</div><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

View File

@ -32,8 +32,8 @@ get_header(); ?>
<?php endif; ?>
</div><!-- #content .site-content -->
</section><!-- #primary .content-area -->
</div><!-- #content -->
</section><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

View File

@ -31,4 +31,4 @@
</aside>
<?php endif; // end sidebar widget area ?>
</div><!-- #secondary .widget-area -->
</div><!-- #secondary -->

View File

@ -20,13 +20,13 @@ get_header(); ?>
<?php
// If comments are open or we have at least one comment, load up the comment template
if ( comments_open() || '0' != get_comments_number() )
comments_template( '', true );
comments_template();
?>
<?php endwhile; // end of the loop. ?>
</div><!-- #content .site-content -->
</div><!-- #primary .content-area -->
</div><!-- #content -->
</div><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

View File

@ -237,7 +237,7 @@ input[type="submit"] {
font-size: 1.2rem;
line-height: 1;
padding: .6em 1em .4em;
text-shadow: 0 1px 0 rgba(255,255,255,.8);
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}
button:hover,
html input[type="button"]:hover,
@ -268,8 +268,8 @@ input[type="radio"] {
}
input[type="search"] {
-webkit-appearance: textfield; /* Addresses appearance set to searchfield in S5, Chrome */
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box; /* Addresses box sizing set to border-box in S5, Chrome (include -moz to future-proof) */
-moz-box-sizing: content-box;
box-sizing: content-box;
}
input[type="search"]::-webkit-search-decoration { /* Corrects inner padding displayed oddly in S5, Chrome on OSX */
@ -370,8 +370,8 @@ a:active {
text-decoration: none;
}
.navigation-main ul ul {
-moz-box-shadow: 0 3px 3px rgba(0,0,0,0.2);
-webkit-box-shadow: 0 3px 3px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 3px 3px rgba(0, 0, 0, 0.2);
box-shadow: 0 3px 3px rgba(0, 0, 0, 0.2);
display: none;
float: left;