forked from mirror/_s
_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:
parent
c7f2b7a1ee
commit
c4f2aa32ce
4
404.php
4
404.php
|
@ -41,7 +41,7 @@ get_header(); ?>
|
||||||
</div><!-- .entry-content -->
|
</div><!-- .entry-content -->
|
||||||
</article><!-- #post-0 .post .error404 .not-found -->
|
</article><!-- #post-0 .post .error404 .not-found -->
|
||||||
|
|
||||||
</div><!-- #content .site-content -->
|
</div><!-- #content -->
|
||||||
</div><!-- #primary .content-area -->
|
</div><!-- #primary -->
|
||||||
|
|
||||||
<?php get_footer(); ?>
|
<?php get_footer(); ?>
|
|
@ -88,8 +88,8 @@ get_header(); ?>
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
</div><!-- #content .site-content -->
|
</div><!-- #content -->
|
||||||
</section><!-- #primary .content-area -->
|
</section><!-- #primary -->
|
||||||
|
|
||||||
<?php get_sidebar(); ?>
|
<?php get_sidebar(); ?>
|
||||||
<?php get_footer(); ?>
|
<?php get_footer(); ?>
|
|
@ -52,7 +52,7 @@
|
||||||
*/
|
*/
|
||||||
wp_list_comments( array( 'callback' => '_s_comment' ) );
|
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 ?>
|
<?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">
|
<nav id="comment-nav-below" class="navigation-comment" role="navigation">
|
||||||
|
@ -73,4 +73,4 @@
|
||||||
|
|
||||||
<?php comment_form(); ?>
|
<?php comment_form(); ?>
|
||||||
|
|
||||||
</div><!-- #comments .comments-area -->
|
</div><!-- #comments -->
|
||||||
|
|
|
@ -17,4 +17,4 @@
|
||||||
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', '_s' ), 'after' => '</div>' ) ); ?>
|
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', '_s' ), 'after' => '</div>' ) ); ?>
|
||||||
</div><!-- .entry-content -->
|
</div><!-- .entry-content -->
|
||||||
<?php edit_post_link( __( 'Edit', '_s' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>' ); ?>
|
<?php edit_post_link( __( 'Edit', '_s' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>' ); ?>
|
||||||
</article><!-- #post-<?php the_ID(); ?> -->
|
</article><!-- #post-## -->
|
||||||
|
|
|
@ -56,4 +56,4 @@
|
||||||
|
|
||||||
<?php edit_post_link( __( 'Edit', '_s' ), '<span class="edit-link">', '</span>' ); ?>
|
<?php edit_post_link( __( 'Edit', '_s' ), '<span class="edit-link">', '</span>' ); ?>
|
||||||
</footer><!-- .entry-meta -->
|
</footer><!-- .entry-meta -->
|
||||||
</article><!-- #post-<?php the_ID(); ?> -->
|
</article><!-- #post-## -->
|
||||||
|
|
|
@ -58,4 +58,4 @@
|
||||||
|
|
||||||
<?php edit_post_link( __( 'Edit', '_s' ), '<span class="sep"> | </span><span class="edit-link">', '</span>' ); ?>
|
<?php edit_post_link( __( 'Edit', '_s' ), '<span class="sep"> | </span><span class="edit-link">', '</span>' ); ?>
|
||||||
</footer><!-- .entry-meta -->
|
</footer><!-- .entry-meta -->
|
||||||
</article><!-- #post-<?php the_ID(); ?> -->
|
</article><!-- #post-## -->
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</div><!-- #main .site-main -->
|
</div><!-- #main -->
|
||||||
|
|
||||||
<footer id="colophon" class="site-footer" role="contentinfo">
|
<footer id="colophon" class="site-footer" role="contentinfo">
|
||||||
<div class="site-info">
|
<div class="site-info">
|
||||||
|
@ -18,8 +18,8 @@
|
||||||
<span class="sep"> | </span>
|
<span class="sep"> | </span>
|
||||||
<?php printf( __( 'Theme: %1$s by %2$s.', '_s' ), '_s', '<a href="http://automattic.com/" rel="designer">Automattic</a>' ); ?>
|
<?php printf( __( 'Theme: %1$s by %2$s.', '_s' ), '_s', '<a href="http://automattic.com/" rel="designer">Automattic</a>' ); ?>
|
||||||
</div><!-- .site-info -->
|
</div><!-- .site-info -->
|
||||||
</footer><!-- #colophon .site-footer -->
|
</footer><!-- #colophon -->
|
||||||
</div><!-- #page .hfeed .site -->
|
</div><!-- #page -->
|
||||||
|
|
||||||
<?php wp_footer(); ?>
|
<?php wp_footer(); ?>
|
||||||
|
|
||||||
|
|
|
@ -138,9 +138,9 @@ add_action( 'widgets_init', '_s_widgets_init' );
|
||||||
function _s_scripts() {
|
function _s_scripts() {
|
||||||
wp_enqueue_style( 'style', get_stylesheet_uri() );
|
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 );
|
wp_enqueue_script( 'skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );
|
||||||
|
|
||||||
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
|
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
|
||||||
wp_enqueue_script( 'comment-reply' );
|
wp_enqueue_script( 'comment-reply' );
|
||||||
|
|
|
@ -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>
|
<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' ) ); ?>
|
<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
|
||||||
</nav><!-- .site-navigation .main-navigation -->
|
</nav><!-- .site-navigation -->
|
||||||
</header><!-- #masthead .site-header -->
|
</header><!-- #masthead -->
|
||||||
|
|
||||||
<div id="main" class="site-main">
|
<div id="main" class="site-main">
|
||||||
|
|
|
@ -112,12 +112,12 @@ get_header();
|
||||||
<?php
|
<?php
|
||||||
// If comments are open or we have at least one comment, load up the comment template
|
// If comments are open or we have at least one comment, load up the comment template
|
||||||
if ( comments_open() || '0' != get_comments_number() )
|
if ( comments_open() || '0' != get_comments_number() )
|
||||||
comments_template( '', true );
|
comments_template();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php endwhile; // end of the loop. ?>
|
<?php endwhile; // end of the loop. ?>
|
||||||
|
|
||||||
</div><!-- #content .site-content -->
|
</div><!-- #content -->
|
||||||
</div><!-- #primary .content-area .image-attachment -->
|
</div><!-- #primary -->
|
||||||
|
|
||||||
<?php get_footer(); ?>
|
<?php get_footer(); ?>
|
|
@ -40,8 +40,8 @@ get_header(); ?>
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
</div><!-- #content .site-content -->
|
</div><!-- #content -->
|
||||||
</div><!-- #primary .content-area -->
|
</div><!-- #primary -->
|
||||||
|
|
||||||
<?php get_sidebar(); ?>
|
<?php get_sidebar(); ?>
|
||||||
<?php get_footer(); ?>
|
<?php get_footer(); ?>
|
|
@ -1,25 +1,19 @@
|
||||||
( function() {
|
( function() {
|
||||||
var is_webkit = navigator.userAgent.toLowerCase().indexOf('webkit') > -1;
|
var is_webkit = navigator.userAgent.toLowerCase().indexOf( 'webkit' ) > -1,
|
||||||
var is_opera = navigator.userAgent.toLowerCase().indexOf('opera') > -1;
|
is_opera = navigator.userAgent.toLowerCase().indexOf( 'opera' ) > -1,
|
||||||
var is_ie = navigator.userAgent.toLowerCase().indexOf('msie') > -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' ;
|
var eventMethod = ( window.addEventListener ) ? 'addEventListener' : 'attachEvent';
|
||||||
window[eventMethod]("hashchange", function(event) {
|
window[ eventMethod ]( 'hashchange', function() {
|
||||||
|
var element = document.getElementById( location.hash.substring( 1 ) );
|
||||||
|
|
||||||
var element = document.getElementById(location.hash.substring(1));
|
if ( element ) {
|
||||||
|
if ( ! /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) )
|
||||||
if (element) {
|
|
||||||
|
|
||||||
if (!/^(?:a|select|input|button|textarea)$/i.test(element.tagName)) {
|
|
||||||
element.tabIndex = -1;
|
element.tabIndex = -1;
|
||||||
}
|
|
||||||
|
|
||||||
element.focus();
|
element.focus();
|
||||||
}
|
}
|
||||||
|
}, false );
|
||||||
}, false);
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|
6
page.php
6
page.php
|
@ -23,13 +23,13 @@ get_header(); ?>
|
||||||
<?php
|
<?php
|
||||||
// If comments are open or we have at least one comment, load up the comment template
|
// If comments are open or we have at least one comment, load up the comment template
|
||||||
if ( comments_open() || '0' != get_comments_number() )
|
if ( comments_open() || '0' != get_comments_number() )
|
||||||
comments_template( '', true );
|
comments_template();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php endwhile; // end of the loop. ?>
|
<?php endwhile; // end of the loop. ?>
|
||||||
|
|
||||||
</div><!-- #content .site-content -->
|
</div><!-- #content -->
|
||||||
</div><!-- #primary .content-area -->
|
</div><!-- #primary -->
|
||||||
|
|
||||||
<?php get_sidebar(); ?>
|
<?php get_sidebar(); ?>
|
||||||
<?php get_footer(); ?>
|
<?php get_footer(); ?>
|
||||||
|
|
|
@ -32,8 +32,8 @@ get_header(); ?>
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
</div><!-- #content .site-content -->
|
</div><!-- #content -->
|
||||||
</section><!-- #primary .content-area -->
|
</section><!-- #primary -->
|
||||||
|
|
||||||
<?php get_sidebar(); ?>
|
<?php get_sidebar(); ?>
|
||||||
<?php get_footer(); ?>
|
<?php get_footer(); ?>
|
|
@ -31,4 +31,4 @@
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
<?php endif; // end sidebar widget area ?>
|
<?php endif; // end sidebar widget area ?>
|
||||||
</div><!-- #secondary .widget-area -->
|
</div><!-- #secondary -->
|
||||||
|
|
|
@ -20,13 +20,13 @@ get_header(); ?>
|
||||||
<?php
|
<?php
|
||||||
// If comments are open or we have at least one comment, load up the comment template
|
// If comments are open or we have at least one comment, load up the comment template
|
||||||
if ( comments_open() || '0' != get_comments_number() )
|
if ( comments_open() || '0' != get_comments_number() )
|
||||||
comments_template( '', true );
|
comments_template();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php endwhile; // end of the loop. ?>
|
<?php endwhile; // end of the loop. ?>
|
||||||
|
|
||||||
</div><!-- #content .site-content -->
|
</div><!-- #content -->
|
||||||
</div><!-- #primary .content-area -->
|
</div><!-- #primary -->
|
||||||
|
|
||||||
<?php get_sidebar(); ?>
|
<?php get_sidebar(); ?>
|
||||||
<?php get_footer(); ?>
|
<?php get_footer(); ?>
|
30
style.css
30
style.css
|
@ -227,26 +227,26 @@ input[type="submit"] {
|
||||||
border-color: #ccc #ccc #bbb #ccc;
|
border-color: #ccc #ccc #bbb #ccc;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
background: #e6e6e6;
|
background: #e6e6e6;
|
||||||
-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), inset 0 15px 17px rgba(255,255,255,0.5), inset 0 -5px 12px rgba(0,0,0,0.05);
|
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 15px 17px rgba(255, 255, 255, 0.5), inset 0 -5px 12px rgba(0, 0, 0, 0.05);
|
||||||
-moz-box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), inset 0 15px 17px rgba(255,255,255,0.5), inset 0 -5px 12px rgba(0,0,0,0.05);
|
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 15px 17px rgba(255, 255, 255, 0.5), inset 0 -5px 12px rgba(0, 0, 0, 0.05);
|
||||||
box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), inset 0 15px 17px rgba(255,255,255,0.5), inset 0 -5px 12px rgba(0,0,0,0.05);
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 15px 17px rgba(255, 255, 255, 0.5), inset 0 -5px 12px rgba(0, 0, 0, 0.05);
|
||||||
color: rgba(0,0,0,.8);
|
color: rgba(0, 0, 0, .8);
|
||||||
cursor: pointer; /* Improves usability and consistency of cursor style between image-type 'input' and others */
|
cursor: pointer; /* Improves usability and consistency of cursor style between image-type 'input' and others */
|
||||||
-webkit-appearance: button; /* Corrects inability to style clickable 'input' types in iOS */
|
-webkit-appearance: button; /* Corrects inability to style clickable 'input' types in iOS */
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
padding: .6em 1em .4em;
|
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,
|
button:hover,
|
||||||
html input[type="button"]:hover,
|
html input[type="button"]:hover,
|
||||||
input[type="reset"]:hover,
|
input[type="reset"]:hover,
|
||||||
input[type="submit"]:hover {
|
input[type="submit"]:hover {
|
||||||
border-color: #ccc #bbb #aaa #bbb;
|
border-color: #ccc #bbb #aaa #bbb;
|
||||||
-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), inset 0 15px 17px rgba(255,255,255,0.8), inset 0 -5px 12px rgba(0,0,0,0.02);
|
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 15px 17px rgba(255, 255, 255, 0.8), inset 0 -5px 12px rgba(0, 0, 0, 0.02);
|
||||||
-moz-box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), inset 0 15px 17px rgba(255,255,255,0.8), inset 0 -5px 12px rgba(0,0,0,0.02);
|
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 15px 17px rgba(255, 255, 255, 0.8), inset 0 -5px 12px rgba(0, 0, 0, 0.02);
|
||||||
box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), inset 0 15px 17px rgba(255,255,255,0.8), inset 0 -5px 12px rgba(0,0,0,0.02);
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 15px 17px rgba(255, 255, 255, 0.8), inset 0 -5px 12px rgba(0, 0, 0, 0.02);
|
||||||
}
|
}
|
||||||
button:focus,
|
button:focus,
|
||||||
html input[type="button"]:focus,
|
html input[type="button"]:focus,
|
||||||
|
@ -257,9 +257,9 @@ html input[type="button"]:active,
|
||||||
input[type="reset"]:active,
|
input[type="reset"]:active,
|
||||||
input[type="submit"]:active {
|
input[type="submit"]:active {
|
||||||
border-color: #aaa #bbb #bbb #bbb;
|
border-color: #aaa #bbb #bbb #bbb;
|
||||||
-webkit-box-shadow: inset 0 -1px 0 rgba(255,255,255,0.5), inset 0 2px 5px rgba(0,0,0,0.15);
|
-webkit-box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.5), inset 0 2px 5px rgba(0, 0, 0, 0.15);
|
||||||
-moz-box-shadow: inset 0 -1px 0 rgba(255,255,255,0.5), inset 0 2px 5px rgba(0,0,0,0.15);
|
-moz-box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.5), inset 0 2px 5px rgba(0, 0, 0, 0.15);
|
||||||
box-shadow: inset 0 -1px 0 rgba(255,255,255,0.5), inset 0 2px 5px rgba(0,0,0,0.15);
|
box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.5), inset 0 2px 5px rgba(0, 0, 0, 0.15);
|
||||||
}
|
}
|
||||||
input[type="checkbox"],
|
input[type="checkbox"],
|
||||||
input[type="radio"] {
|
input[type="radio"] {
|
||||||
|
@ -268,8 +268,8 @@ input[type="radio"] {
|
||||||
}
|
}
|
||||||
input[type="search"] {
|
input[type="search"] {
|
||||||
-webkit-appearance: textfield; /* Addresses appearance set to searchfield in S5, Chrome */
|
-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) */
|
-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;
|
box-sizing: content-box;
|
||||||
}
|
}
|
||||||
input[type="search"]::-webkit-search-decoration { /* Corrects inner padding displayed oddly in S5, Chrome on OSX */
|
input[type="search"]::-webkit-search-decoration { /* Corrects inner padding displayed oddly in S5, Chrome on OSX */
|
||||||
|
@ -370,9 +370,9 @@ a:active {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
.navigation-main ul ul {
|
.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);
|
||||||
-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);
|
box-shadow: 0 3px 3px rgba(0, 0, 0, 0.2);
|
||||||
display: none;
|
display: none;
|
||||||
float: left;
|
float: left;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
Reference in New Issue