Twenty Fourteen: second pass at matching code standards achieved with Twenty Thirteen development. See #24858, props obenland.

Built from https://develop.svn.wordpress.org/trunk@25023


git-svn-id: http://core.svn.wordpress.org/trunk@25014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Lance Willett 2013-08-15 03:13:44 +00:00
parent 8f3abb856a
commit a872d95778
17 changed files with 264 additions and 491 deletions

View File

@ -49,7 +49,7 @@ get_header(); ?>
twentyfourteen_get_template_part();
endwhile;
twentyfourteen_content_nav( 'nav-below' );
twentyfourteen_paging_nav();
else :
get_template_part( 'no-results', 'archive' );

View File

@ -56,7 +56,7 @@ if ( post_password_required() )
<?php endif; // Check for comment navigation. ?>
<?php if ( ! comments_open() ) : ?>
<p class="nocomments"><?php _e( 'Comments are closed.', 'twentyfourteen' ); ?></p>
<p class="no-comments"><?php _e( 'Comments are closed.', 'twentyfourteen' ); ?></p>
<?php endif; ?>
<?php endif; // have_comments() ?>

View File

@ -3,37 +3,31 @@
* @package WordPress
* @subpackage Twenty_Fourteen
*/
$format = get_post_format();
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix' ); ?>>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php
if ( 'gallery' == $format ) :
$images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC' ) );
if ( has_post_format( 'gallery' ) ) :
$images = get_children( array( 'post_parent' => get_the_ID(), 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC' ) );
if ( $images ) :
$image = array_shift( $images ); ?>
$image = array_shift( $images );
?>
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyfourteen' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="<?php the_ID(); ?>" class="attachment-featured-thumbnail">
<?php echo wp_get_attachment_image( $image->ID, 'featured-thumbnail-large' ); ?>
</a><?php
</a>
<?php
endif;
endif;
?>
<header class="entry-header">
<?php
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( __( ', ', 'twentyfourteen' ) );
if ( $categories_list && twentyfourteen_categorized_blog() && 'post' == get_post_type() ) :
?>
<?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
<div class="entry-meta">
<span class="cat-links"><?php echo $categories_list; ?></span>
</div>
<span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
</div><!-- .entry-meta -->
<?php endif; ?>
<?php
/* Show title only if it exists */
the_title( '<h1 class="entry-title"><a href="' . get_permalink() . '" rel="bookmark">', '</a></h1>' );
?>
<?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); ?>
<div class="entry-meta">
<span class="post-format">

View File

@ -3,7 +3,6 @@
* @package WordPress
* @subpackage Twenty_Fourteen
*/
has_post_format()
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
@ -27,7 +26,7 @@ has_post_format()
?>
<div class="entry-meta">
<?php if ( has_post_format() ) : ?>
<?php if ( has_post_format( array( 'status', 'chat', 'aside', 'link', 'quote', 'audio' ) ) ) : ?>
<span class="post-format">
<a class="entry-format" href="<?php echo esc_url( get_post_format_link( get_post_format() ) ); ?>" title="<?php echo esc_attr( sprintf( __( 'All %s posts', 'twentyfourteen' ), get_post_format_string( get_post_format() ) ) ); ?>"><?php echo get_post_format_string( get_post_format() ); ?></a>
</span>

View File

@ -1,3 +1,14 @@
<?php
/**
* The template for displaying featured content.
*
* @todo: Add support for featured content.
*
* @package WordPress
* @subpackage Twenty_Fourteen
*/
?>
<div class="featured-content-wrapper">
<div id="featured-content" class="featured-content">

View File

@ -28,8 +28,7 @@ get_header(); ?>
comments_template();
endwhile;
twentyfourteen_content_nav( 'nav-below' );
twentyfourteen_paging_nav();
else :
get_template_part( 'no-results', 'index' );

View File

@ -1,74 +1,81 @@
<?php
/**
* Twenty Fourteen functions and definitions
* Twenty Fourteen functions and definitions.
*
* Sets up the theme and provides some helper functions, which are used in the
* theme as custom template tags. Others are attached to action and filter
* hooks in WordPress to change core functionality.
*
* When using a child theme (see http://codex.wordpress.org/Theme_Development
* and http://codex.wordpress.org/Child_Themes), you can override certain
* functions (those wrapped in a function_exists() call) by defining them first
* in your child theme's functions.php file. The child theme's functions.php
* file is included before the parent theme's file, so the child theme
* functions would be used.
*
* Functions that are not pluggable (not wrapped in function_exists()) are
* instead attached to a filter or action hook.
*
* For more information on hooks, actions, and filters,
* see http://codex.wordpress.org/Plugin_API
*
* @package WordPress
* @subpackage Twenty_Fourteen
*/
/**
* Set the content width based on the theme's design and stylesheet.
*
* Sets up the content width value based on the theme's design.
* @see twentyfourteen_content_width() for template-specific adjustments.
*/
if ( ! isset( $content_width ) )
$content_width = 474; /* pixels */
function twentyfourteen_set_content_width() {
global $content_width;
if ( is_page_template( 'full-width-page.php' ) || is_attachment() )
$content_width = 895;
}
add_action( 'template_redirect', 'twentyfourteen_set_content_width' );
$content_width = 474;
if ( ! function_exists( 'twentyfourteen_setup' ) ) :
/**
* Sets up theme defaults and registers support for various WordPress features.
*
* Note that this function is hooked into the after_setup_theme hook, which runs
* before the init hook. The init hook is too late for some features, such as indicating
* support post thumbnails.
* Note that this function is hooked into the after_setup_theme hook, which
* runs before the init hook. The init hook is too late for some features, such
* as indicating support post thumbnails.
*/
function twentyfourteen_setup() {
/**
* Make theme available for translation
* Translations can be filed in the /languages/ directory
* If you're building a theme based on Twenty Fourteen, use a find and replace
* to change 'twentyfourteen' to the name of your theme in all the template files
/*
* Makes Twenty Fourteen available for translation.
*
* Translations can be added to the /languages/ directory.
* If you're building a theme based on Twenty Fourteen, use a find and
* replace to change 'twentyfourteen' to the name of your theme in all
* template files.
*/
load_theme_textdomain( 'twentyfourteen', get_template_directory() . '/languages' );
/**
* Add default posts and comments RSS feed links to head
*/
// Adds RSS feed links to <head> for posts and comments.
add_theme_support( 'automatic-feed-links' );
/**
* Enable support for Post Thumbnails
*/
// Enable support for Post Thumbnails.
add_theme_support( 'post-thumbnails', array( 'post' ) );
/**
* Adding several sizes for Post Thumbnails
*/
// Adding several sizes for Post Thumbnails.
add_image_size( 'featured-thumbnail-large', 672, 0 );
add_image_size( 'featured-thumbnail-featured', 672, 336, true );
add_image_size( 'featured-thumbnail-formatted', 306, 0 );
/**
* This theme uses wp_nav_menu() in one location.
*/
// This theme uses wp_nav_menu() in two locations.
register_nav_menus( array(
'primary' => __( 'Top primary menu', 'twentyfourteen' ),
'secondary' => __( 'Secondary menu in left sidebar', 'twentyfourteen' )
'primary' => __( 'Top primary menu', 'twentyfourteen' ),
'secondary' => __( 'Secondary menu in left sidebar', 'twentyfourteen' ),
) );
/**
* Enable support for Post Formats
/*
* Enable support for Post Formats.
* See http://codex.wordpress.org/Post_Formats
*/
add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', 'gallery' ) );
add_theme_support( 'post-formats', array(
'aside', 'image', 'video', 'quote', 'link', 'gallery'
) );
/**
/*
* This theme allows users to set a custom background.
*/
add_theme_support( 'custom-background', apply_filters( 'twentyfourteen_custom_background_args', array(
@ -79,8 +86,18 @@ endif; // twentyfourteen_setup
add_action( 'after_setup_theme', 'twentyfourteen_setup' );
/**
* Getter function for Featured Content Plugin.
* Adjusts content_width value for full width and attachment templates.
*
* @return void
*/
function twentyfourteen_content_width() {
if ( is_page_template( 'full-width-page.php' ) || is_attachment() )
$GLOBALS['content_width'] = 895;
}
add_action( 'template_redirect', 'twentyfourteen_content_width' );
/**
* Getter function for Featured Content Plugin.
*/
function twentyfourteen_get_featured_posts() {
return apply_filters( 'twentyfourteen_get_featured_posts', false );
@ -90,20 +107,20 @@ function twentyfourteen_get_featured_posts() {
* A helper conditional function that returns a boolean value
* So that we can use a condition like
* if ( twentyfourteen_has_featured_posts( 1 ) )
*
*/
function twentyfourteen_has_featured_posts( $minimum = 1 ) {
if ( is_paged() )
return false;
$featured_posts = apply_filters( 'twentyfourteen_get_featured_posts', array() );
$featured_posts = apply_filters( 'twentyfourteen_get_featured_posts', array() );
return is_array( $featured_posts ) && count( $featured_posts ) > absint( $minimum );
}
/**
* Register widgetized area and update sidebar with default widgets
* Registers two widget areas.
*
* @return void
*/
function twentyfourteen_widgets_init() {
register_sidebar( array(
@ -170,6 +187,7 @@ add_action( 'widgets_init', 'twentyfourteen_widgets_init' );
/**
* Register Google fonts for Twenty Fourteen.
*
* @return void
*/
function twentyfourteen_fonts() {
/* translators: If there are characters in your language that are not supported
@ -180,8 +198,9 @@ function twentyfourteen_fonts() {
add_action( 'init', 'twentyfourteen_fonts' );
/**
* Enqueue scripts and styles
* Enqueues scripts and styles for front end.
*
* @return void
*/
function twentyfourteen_scripts() {
wp_enqueue_style( 'twentyfourteen-style', get_stylesheet_uri() );
@ -201,21 +220,18 @@ add_action( 'wp_enqueue_scripts', 'twentyfourteen_scripts' );
/**
* Enqueue Google fonts style to admin screen for custom header display.
*
* @return void
*/
function twentyfourteen_admin_fonts() {
wp_enqueue_style( 'twentyfourteen-lato' );
}
add_action( 'admin_print_scripts-appearance_page_custom-header', 'twentyfourteen_admin_fonts' );
/**
* Implement the Custom Header feature
*
*/
require( get_template_directory() . '/inc/custom-header.php' );
/**
* Sets the post excerpt length to 40 words.
*
* @param int $length
* @return int
*/
function twentyfourteen_excerpt_length( $length ) {
return 20;
@ -225,13 +241,18 @@ add_filter( 'excerpt_length', 'twentyfourteen_excerpt_length' );
/**
* Returns a "Continue Reading" link for excerpts
*
* @return string
*/
function twentyfourteen_continue_reading_link() {
return ' <a href="'. esc_url( get_permalink() ) . '" class="more-link">' . __( 'Read More <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ) . '</a>';
}
/**
* Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and twentyeleven_continue_reading_link().
* Replaces "[...]" (appended to automatically generated excerpts) with an
* ellipsis and twentyeleven_continue_reading_link().
*
* @param string $more
* @return string
*/
function twentyfourteen_auto_excerpt_more( $more ) {
return ' &hellip;' . twentyfourteen_continue_reading_link();
@ -244,6 +265,8 @@ add_filter( 'excerpt_more', 'twentyfourteen_auto_excerpt_more' );
* To override this link in a child theme, remove the filter and add your own
* function tied to the get_the_excerpt filter hook.
*
* @param string $output
* @return string
*/
function twentyfourteen_custom_excerpt_more( $output ) {
if ( has_excerpt() && ! is_attachment() ) {
@ -257,8 +280,6 @@ if ( ! function_exists( 'twentyfourteen_the_attached_image' ) ) :
/**
* Prints the attached image with a link to the next attached image.
*
* @since Twenty Thirteen 1.0
*
* @return void
*/
function twentyfourteen_the_attached_image() {
@ -280,7 +301,7 @@ function twentyfourteen_the_attached_image() {
'post_type' => 'attachment',
'post_mime_type' => 'image',
'order' => 'ASC',
'orderby' => 'menu_order ID'
'orderby' => 'menu_order ID',
) );
// If there is more than 1 attachment in a gallery...
@ -427,8 +448,14 @@ function twentyfourteen_pre_get_posts( $query ) {
add_action( 'pre_get_posts', 'twentyfourteen_pre_get_posts' );
/**
* Adds custom classes to the array of body classes.
* Extends the default WordPress body classes.
*
* Adds body classes to denote:
* 1. Single or multiple authors.
* 2. Index views.
*
* @param array $classes A list of existing body class values.
* @return array The filtered body class list.
*/
function twentyfourteen_body_classes( $classes ) {
// Adds a class of group-blog to blogs with more than 1 published author
@ -444,31 +471,41 @@ function twentyfourteen_body_classes( $classes ) {
add_filter( 'body_class', 'twentyfourteen_body_classes' );
/**
* Filters wp_title to print a neat <title> tag based on what is being viewed.
* Creates a nicely formatted and more specific title element text for output
* in head of document, based on current view.
*
* @param string $title Default title text for current view.
* @param string $sep Optional separator.
* @return string The filtered title.
*/
function twentyfourteen_wp_title( $title, $sep ) {
global $page, $paged;
global $paged, $page;
if ( is_feed() )
return $title;
// Add the blog name
// Add the site name.
$title .= get_bloginfo( 'name' );
// Add the blog description for the home/front page.
// Add the site description for the home/front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) )
$title .= " $sep $site_description";
$title = "$title $sep $site_description";
// Add a page number if necessary:
// Add a page number if necessary.
if ( $paged >= 2 || $page >= 2 )
$title .= " $sep " . sprintf( __( 'Page %s', 'twentyfourteen' ), max( $paged, $page ) );
$title = "$title $sep " . sprintf( __( 'Page %s', 'twentyfourteen' ), max( $paged, $page ) );
return $title;
}
add_filter( 'wp_title', 'twentyfourteen_wp_title', 10, 2 );
/**
* Implement the Custom Header feature
*
*/
require get_template_directory() . '/inc/custom-header.php';
/**
* Custom template tags for this theme.
*/

View File

@ -69,7 +69,7 @@ get_header();
</footer><!-- .entry-meta -->
</article><!-- #post-## -->
<nav id="image-navigation" class="site-navigation">
<nav id="image-navigation" class="navigation image-navigation">
<?php previous_image_link( false, __( '<div class="previous-image">Previous Image</div>', 'twentyfourteen' ) ); ?>
<?php next_image_link( false, __( '<div class="next-image">Next Image</div>', 'twentyfourteen' ) ); ?>
</nav><!-- #image-navigation -->

View File

@ -2,76 +2,87 @@
/**
* Custom template tags for this theme.
*
* Eventually, some of the functionality here could be replaced by core features
*
* @package WordPress
* @subpackage Twenty_Fourteen
*/
if ( ! function_exists( 'twentyfourteen_content_nav' ) ) :
if ( ! function_exists( 'twentyfourteen_paging_nav' ) ) :
/**
* Display navigation to next/previous pages when applicable
* Displays navigation to next/previous set of posts when applicable.
*
* @return void
*/
function twentyfourteen_content_nav( $nav_id ) {
global $wp_query, $post;
// Don't print empty markup on single pages if there's nowhere to navigate.
if ( is_single() ) {
$previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true );
$next = get_adjacent_post( false, '', false );
if ( ! $next && ! $previous )
return;
}
// Don't print empty markup in archives if there's only one page.
if ( $wp_query->max_num_pages < 2 && ( is_home() || is_archive() || is_search() ) )
function twentyfourteen_paging_nav() {
// Don't print empty markup if there's only one page.
if ( $GLOBALS['wp_query']->max_num_pages < 2 )
return;
$nav_class = 'site-navigation paging-navigation';
if ( is_single() )
$nav_class = 'site-navigation post-navigation';
$paged = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1;
$pagenum_link = html_entity_decode( get_pagenum_link() );
$query_args = array();
$url_parts = explode( '?', $pagenum_link );
if ( isset( $url_parts[1] ) )
wp_parse_str( $url_parts[1], $query_args );
$pagenum_link = remove_query_arg( array_keys( $query_args ), $pagenum_link );
$pagenum_link = trailingslashit( $pagenum_link ) . '%_%';
$format = $GLOBALS['wp_rewrite']->using_index_permalinks() && ! strpos( $pagenum_link, 'index.php' ) ? 'index.php/' : '';
$format .= $GLOBALS['wp_rewrite']->using_permalinks() ? user_trailingslashit( 'page/%#%', 'paged' ) : '?paged=%#%';
$links = paginate_links( array(
'base' => $pagenum_link,
'format' => $format,
'total' => $GLOBALS['wp_query']->max_num_pages,
'current' => $paged,
'mid_size' => 1,
'add_args' => array_map( 'urlencode', $query_args ),
'prev_text' => __( '&larr; Previous', 'twentyfourteen' ),
'next_text' => __( 'Next &rarr;', 'twentyfourteen' ),
) );
if ( $links ) :
?>
<nav role="navigation" id="<?php echo $nav_id; ?>" class="<?php echo $nav_class; ?>">
<h1 class="screen-reader-text"><?php _e( 'Post navigation', 'twentyfourteen' ); ?></h1>
<?php if ( is_single() ) : // navigation links for single posts ?>
<?php previous_post_link( '%link', __( '<div class="nav-previous"><span class="meta-nav">Previous Post</span>%title</div>', 'twentyfourteen' ) ); ?>
<?php next_post_link( '%link', __( '<div class="nav-next"><span class="meta-nav">Next Post</span>%title</div>', 'twentyfourteen' ) ); ?>
<?php elseif ( $wp_query->max_num_pages > 1 && ( is_home() || is_archive() || is_search() ) ) : // navigation links for home, archive, and search pages ?>
<nav class="navigation paging-navigation" role="navigation">
<h1 class="screen-reader-text"><?php _e( 'Posts navigation', 'twentyfourteen' ); ?></h1>
<div class="pagination loop-pagination">
<?php
/* Get the current page. */
$current = ( get_query_var( 'paged' ) ? absint( get_query_var( 'paged' ) ) : 1 );
<?php echo $links; ?>
</div><!-- .pagination -->
</nav><!-- .navigation -->
<?php
endif;
}
endif;
/* Get the max number of pages. */
$max_num_pages = intval( $wp_query->max_num_pages );
if ( ! function_exists( 'twentyfourteen_post_nav' ) ) :
/**
* Displays navigation to next/previous post when applicable.
*
* @return void
*/
function twentyfourteen_post_nav() {
// Don't print empty markup if there's nowhere to navigate.
$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );
$next = get_adjacent_post( false, '', false );
/* Set up arguments for the paginate_links() function. */
$args = array(
'base' => add_query_arg( 'paged', '%#%' ),
'format' => '',
'total' => $max_num_pages,
'current' => $current,
'prev_text' => __( '&larr; Previous', 'twentyfourteen' ),
'next_text' => __( 'Next &rarr;', 'twentyfourteen' ),
'mid_size' => 1
);
if ( ! $next && ! $previous )
return;
echo paginate_links( $args )
?>
</div>
<?php endif; ?>
</nav><!-- #<?php echo $nav_id; ?> -->
?>
<nav class="navigation post-navigation" role="navigation">
<h1 class="screen-reader-text"><?php _e( 'Post navigation', 'twentyfourteen' ); ?></h1>
<div class="nav-links">
<?php
previous_post_link( '%link', __( '<span class="meta-nav">Previous Post</span>%title', 'twentyfourteen' ) );
next_post_link( '%link', __( '<span class="meta-nav">Next Post</span>%title', 'twentyfourteen' ) );
?>
</div><!-- .nav-links -->
</nav><!-- .navigation -->
<?php
}
endif; // twentyfourteen_content_nav
endif;
if ( ! function_exists( 'twentyfourteen_comment' ) ) :
/**
@ -130,6 +141,7 @@ if ( ! function_exists( 'twentyfourteen_posted_on' ) ) :
/**
* Prints HTML with meta information for the current post-date/time and author.
*
* @return void
*/
function twentyfourteen_posted_on() {
if ( is_sticky() && is_home() && ! is_paged() )
@ -150,6 +162,7 @@ endif;
/**
* Returns true if a blog has more than 1 category
*
* @return boolean
*/
function twentyfourteen_categorized_blog() {
if ( false === ( $all_the_cool_cats = get_transient( 'all_the_cool_cats' ) ) ) {

View File

@ -24,7 +24,7 @@ get_header(); ?>
twentyfourteen_get_template_part();
endwhile;
twentyfourteen_content_nav( 'nav-below' );
twentyfourteen_paging_nav();
else :
get_template_part( 'no-results', 'index' );

View File

@ -28,8 +28,8 @@ get_header(); ?>
endwhile;
?>
</div><!-- #content .site-content -->
</div><!-- #primary .content-area -->
</div><!-- #content -->
</div><!-- #primary -->
<?php
get_sidebar( 'content' );

View File

@ -25,7 +25,8 @@ ul, ol {
margin: 0 2.2rem 2.4rem 0;
}
ul ul, ol ol, ul ol, ol ul {
li > ul,
li > ol {
margin-right: 20px;
margin-right: 2.0rem;
margin-left: auto;
@ -295,7 +296,7 @@ img.alignleft,
left: auto;
}
.comment-meta,
.comment-metadata,
.comment-content {
padding-right: 36px;
padding-right: 3.6rem;
@ -308,7 +309,7 @@ img.alignleft,
margin: 0 2.2rem 2.4rem 0;
}
.commentlist .children {
.comment-list .children {
margin-right: 20px;
margin-right: 2.0rem;
margin-left: auto;
@ -324,10 +325,8 @@ img.alignleft,
/* =Widgets
----------------------------------------------- */
.widget ul ul,
.widget ol ol,
.widget ul ol,
.widget ol ul {
.widget li > ul,
.widget li > ol {
margin: 0 10px 0 0;
margin: 0 1.0rem 0 0;
}
@ -339,12 +338,6 @@ img.alignleft,
margin-left: auto;
}
/* Authors Widget */
.widget_authors img {
margin: 0 0 9px 5px;
margin: 0 0 0.9rem 0.5rem;
}
/* Caledar widget*/
.widget_calendar #wp-calendar caption {
text-align: right;
@ -400,7 +393,7 @@ img.alignleft,
#primary span.entry-date a:before,
#primary .byline a:before,
#primary .comments-link a:before,
#primary .edit-link a:before,
.entry-comment .edit-link a:before,
.attachment span.entry-date:before,
#primary .full-size-link a:before,
#primary .parent-post-link a:before {
@ -446,12 +439,12 @@ img.alignleft,
margin: -0.1rem 0 0 0.2rem;
}
#primary .edit-link a:before {
.entry-comment .edit-link a:before {
margin: -1px 0 0 2px;
margin: -0.1rem 0 0 0.2rem;
}
.page #primary .edit-link a:before {
.page .entry-comment .edit-link a:before {
margin: 5px 0 0 2px;
margin: 0.5rem 0 0 0.2rem;
}
@ -503,10 +496,10 @@ img.alignleft,
.nocomments,
#comments #respond,
.comments-area article,
.commentlist li.trackback,
.commentlist li.pingback,
.post-navigation .nav-previous,
.post-navigation .nav-next {
.comment-list li.trackback,
.comment-list li.pingback,
.post-navigation [rel="prev"],
.post-navigation [rel="next"] {
padding-left: 9.12778904%;
padding-right: 9.12778904%;
}
@ -522,8 +515,8 @@ img.alignleft,
.full-width .comments-title,
.full-width #comments #respond,
.full-width .comments-area article,
.full-width .commentlist li.trackback,
.full-width .commentlist li.pingback {
.full-width .comment-list li.trackback,
.full-width .comment-list li.pingback {
padding-left: 6.04307432%;
padding-right: 6.04307432%;
}
@ -567,10 +560,10 @@ img.alignleft,
.nocomments,
#comments #respond,
.comments-area article,
.commentlist li.trackback,
.commentlist li.pingback,
.post-navigation .nav-previous,
.post-navigation .nav-next {
.comment-list li.trackback,
.comment-list li.pingback,
.post-navigation [rel="prev"],
.post-navigation [rel="next"] {
padding-left: 12.39493534%;
padding-right: 17.06896551%;
}
@ -579,8 +572,8 @@ img.alignleft,
padding-left: 13.8900862%;
}
.commentlist,
.full-width .commentlist {
.comment-list,
.full-width .comment-list {
margin-right: -70px;
margin-right: -7.0rem;
margin-left: auto;
@ -602,8 +595,8 @@ img.alignleft,
.full-width .comments-title,
.full-width #comments #respond,
.full-width .comments-area article,
.full-width .commentlist li.trackback,
.full-width .commentlist li.pingback {
.full-width .comment-list li.trackback,
.full-width .comment-list li.pingback {
padding-left: 11.30926724%;
padding-right: 11.30926724%;
}
@ -700,16 +693,16 @@ img.alignleft,
.nocomments,
#comments #respond,
.comments-area article,
.commentlist li.trackback,
.commentlist li.pingback,
.post-navigation .nav-previous,
.post-navigation .nav-next {
.comment-list li.trackback,
.comment-list li.pingback,
.post-navigation [rel="prev"],
.post-navigation [rel="next"] {
padding-left: 9.87001616%;
padding-right: 9.19765166%;
}
.commentlist,
.full-width .commentlist {
.comment-list,
.full-width .comment-list {
margin-right: 0;
margin-left: auto;
}
@ -725,8 +718,8 @@ img.alignleft,
.full-width .comments-title,
.full-width #comments #respond,
.full-width .comments-area article,
.full-width .commentlist li.trackback,
.full-width .commentlist li.pingback {
.full-width .comment-list li.trackback,
.full-width .comment-list li.pingback {
padding-left: 5.882236%;
padding-right: 5.882236%;
}
@ -771,10 +764,10 @@ img.alignleft,
.nocomments,
#comments #respond,
.comments-area article,
.commentlist li.trackback,
.commentlist li.pingback,
.post-navigation .nav-previous,
.post-navigation .nav-next {
.comment-list li.trackback,
.comment-list li.pingback,
.post-navigation [rel="prev"],
.post-navigation [rel="next"] {
padding-left: 12.44146986%;
padding-right: 16.77524429%;
}
@ -783,8 +776,8 @@ img.alignleft,
padding-left: 13.73697916%;
}
.commentlist,
.full-width .commentlist {
.comment-list,
.full-width .comment-list {
margin-right: -70px;
margin-right: -7.0rem;
margin-left: auto;
@ -811,8 +804,8 @@ img.alignleft,
.full-width .comments-title,
.full-width #comments #respond,
.full-width .comments-area article,
.full-width .commentlist li.trackback,
.full-width .commentlist li.pingback {
.full-width .comment-list li.trackback,
.full-width .comment-list li.pingback {
padding-left: 11.21868265%;
padding-right: 11.21868265%;
}
@ -852,8 +845,8 @@ img.alignleft,
.full-width .comments-title,
.full-width #comments #respond,
.full-width .comments-area article,
.full-width .commentlist li.trackback,
.full-width .commentlist li.pingback {
.full-width .comment-list li.trackback,
.full-width .comment-list li.pingback {
padding-left: 0;
}
}

View File

@ -23,8 +23,7 @@ get_header(); ?>
twentyfourteen_get_template_part();
endwhile;
twentyfourteen_content_nav( 'nav-below' );
twentyfourteen_paging_nav();
else :
get_template_part( 'no-results', 'search' );

View File

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

View File

@ -1,6 +1,6 @@
<?php
/**
* The Sidebar containing the main widget areas.
* The Sidebar containing the main widget area.
*
* @package WordPress
* @subpackage Twenty_Fourteen
@ -20,12 +20,12 @@
<?php wp_nav_menu( array( 'theme_location' => 'secondary' ) ); ?>
</nav>
<?php endif; ?>
</div>
</div><!-- #secondary-top -->
<div id="secondary-bottom" class="widget-area" role="complementary">
<?php
do_action( 'before_sidebar' );
dynamic_sidebar( 'sidebar-1' );
?>
</div><!-- .widget-area -->
</div><!-- #secondary-bottom -->
</div><!-- #secondary -->

View File

@ -16,7 +16,7 @@ get_header(); ?>
get_template_part( 'content', 'single' );
twentyfourteen_content_nav( 'nav-below' );
twentyfourteen_post_nav();
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() )

View File

@ -1780,8 +1780,8 @@ span > object {
margin: 24px 0 0;
margin: 2.4rem 0 0;
}
.post-navigation .nav-previous,
.post-navigation .nav-next,
.post-navigation [rel="prev"],
.post-navigation [rel="next"],
#image-navigation .previous-image,
#image-navigation .next-image {
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
@ -1793,7 +1793,7 @@ span > object {
text-align: left;
width: 100%;
}
.post-navigation .nav-next {
.post-navigation [rel="next"] {
margin: 0;
}
.post-navigation .meta-nav {
@ -1863,7 +1863,7 @@ span > object {
padding: 0 1.0rem;
text-transform: uppercase;
}
#respond #commentform {
#commentform {
background: #fff;
padding: 0 10px;
padding: 0 1.0rem;
@ -1965,14 +1965,12 @@ span > object {
word-wrap: break-word;
}
.comment-content ul,
.comment-content ol {
.comment-content ol {
margin: 0 0 24px 22px;
margin: 0 0 2.4rem 2.2rem;
}
.comment-content ul ul,
.comment-content ol ol,
.comment-content ul ol,
.comment-content ol ul {
.comment-content li > ul,
.comment-content li > ol {
margin-bottom: 0;
}
.comment-list .children {
@ -1997,7 +1995,7 @@ span > object {
margin-bottom: 24px;
margin-bottom: 2.4rem;
}
.nocomments {
.no-comments {
color: #8c8c8c;
font-size: 16px;
font-size: 1.6rem;
@ -2076,10 +2074,8 @@ span > object {
list-style: none;
margin: 0;
}
.widget ul ul,
.widget ol ol,
.widget ul ol,
.widget ol ul {
.widget li > ul,
.widget li > ol {
margin: 0 0 0 10px;
margin: 0 0 0 1.0rem;
}
@ -2089,8 +2085,8 @@ span > object {
font-size: 1.4rem;
font-weight: 900;
line-height: 1.7142857142;
margin: 0 0 2.4rem 0;
margin: 0 0 24px 0;
margin: 0 0 2.4rem 0;
text-transform: uppercase;
}
.widget-area button,
@ -2145,36 +2141,6 @@ span > object {
margin-bottom: 0;
}
/* Authors Widget */
.widget_authors > ul > li {
list-style: none;
margin-bottom: 18px;
margin-bottom: 1.8rem;
}
.widget_authors > ul > li:last-child {
margin-bottom: 0;
}
.widget_authors img {
border-radius: 2;
margin: 0 5px 9px 0;
margin: 0 0.5rem 0.9rem 0;
vertical-align: middle;
}
.widget_authors ul ul {
margin: 0;
}
/* Author Grid Widget */
.widget_author_grid .avatar {
max-width: none;
}
/* Blog Subscription */
.widget_blog_subscription input[type="text"] {
padding: 4px !important;
padding: 0.4rem !important;
}
/* Caledar widget*/
.widget_calendar #wp-calendar a {
display: block;
@ -2225,76 +2191,6 @@ span > object {
word-wrap: break-word;
}
/* Contact Info Widget */
.widget_contact_info #contact-map {
margin-bottom: 18px;
margin-bottom: 1.8rem;
}
.widget_contact_info #contact-info-map-canvas {
height: 168px;
height: 16.8rem;
}
/* Flickr Widget (WP.com) */
.widget_flickr #flickr_badge_uber_wrapper {
margin-top: 4px;
margin-top: 0.4rem;
}
.widget_flickr #flickr_badge_uber_wrapper a:link,
.widget_flickr #flickr_badge_uber_wrapper a:active,
.widget_flickr #flickr_badge_uber_wrapper a:visited {
color: #fff;
}
.widget_flickr #flickr_badge_uber_wrapper a:hover {
color: #5FF23D;
}
.widget_flickr #flickr_badge_wrapper {
background-color: transparent;
border: none;
}
/* Gravatar Profile widget */
.widget-area .widget-grofile h4 {
color: rgba(255, 255, 255, 0.75);
font-size: 11px;
font-size: 1.1rem;
line-height: 1.6363636363;
margin: 18px 0 0;
margin: 1.8rem 0 0;
text-transform: uppercase;
}
.widget-grofile .grofile-accounts {
margin-top: 4px;
margin-top: 0.4rem;
}
/* Milestone Widget */
.widget-area .milestone-widget .milestone-content {
max-width: 100%;
}
.widget-area .milestone-countdown,
.widget-area .milestone-message {
border-color: rgba(255, 255, 255, 0.1);
border-top: 0;
}
.widget-area .milestone-header,
.widget-area .milestone-countdown,
.widget-area .milestone-message {
background-color: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.15);
color: rgba(255, 255, 255, 0.75);
}
.widget-area .milestone-countdown {
background-color: rgba(255, 255, 255, 0.1);
}
.widget-area .milestone-widget {
margin-bottom: 48px;
margin-bottom: 4.8rem;
}
.widget-area .milestone-content {
margin-top: 0;
}
/* RSS Widget */
.widget_rss li {
margin-bottom: 18px;
@ -2336,22 +2232,6 @@ span > object {
display: none;
}
/* Twitter Widget */
.widget_twitter li {
margin-bottom: 18px;
margin-bottom: 1.8rem;
}
.widget_twitter li:last-child {
margin-bottom: 0;
}
.widget_twitter li a {
word-wrap: break-word;
}
.widget_twitter iframe {
margin: 18px 0 0;
margin: 1.8rem 0 0;
}
/* =Content Sidebar
----------------------------------------------- */
@ -2452,46 +2332,9 @@ span > object {
#content-sidebar .widget_calendar #wp-calendar thead th {
background-color: rgba(0, 0, 0, 0.02);
}
#content-sidebar .widget_flickr #flickr_badge_uber_wrapper a:link,
#content-sidebar .widget_flickr #flickr_badge_uber_wrapper a:active,
#content-sidebar .widget_flickr #flickr_badge_uber_wrapper a:visited {
color: #2b2b2b;
}
#content-sidebar .widget_flickr #flickr_badge_uber_wrapper a:hover {
color: #41a62a;
}
#content-sidebar .widget-grofile h4 {
color: #2b2b2b;
font-size: 14px;
font-size: 1.4rem;
font-weight: 900;
line-height: 1.2857142857;
}
#content-sidebar .milestone-countdown,
#content-sidebar .milestone-message {
border-color: rgba(255, 255, 255, 0.1);
border-top: 0;
}
#content-sidebar .milestone-header,
#content-sidebar .milestone-countdown,
#content-sidebar .milestone-message {
background-color: #000;
border: 1px solid rgba(0, 0, 0, 0.1);
color: #fff;
}
#content-sidebar .milestone-countdown {
background-color: #fff;
color: #2b2b2b;
}
#content-sidebar .widget_rss li,
#content-sidebar .widget_twitter li {
#content-sidebar .widget_rss li {
margin-bottom: 0;
}
#content-sidebar .widget .widgets-multi-column-grid li {
border-top: none;
padding: 0 8px 6px 0;
padding: 0 0.8rem 0.6rem 0;
}
/* =Footer Sidebar
@ -2502,121 +2345,6 @@ span > object {
box-sizing: border-box;
}
/* =Jetpack
----------------------------------------------- */
/* Infinite Scroll */
/* Hide elements when IS is in use */
.infinite-scroll #nav-below,
.infinite-scroll.neverending #colophon {
display: none;
}
.infinite-scroll #content {
margin-bottom: 48px;
margin-bottom: 4.8rem;
}
#infinite-handle {
margin-top: 48px;
margin-top: 4.8rem;
text-align: center;
}
#infinite-handle span {
background-color: #000;
border: 0;
border-radius: 2px;
color: #fff;
font-weight: 700;
font-size: 12px;
font-size: 1.2rem;
line-height: 1;
padding: 11px 35px 10px;
padding: 1.1rem 3.5rem 1.0rem;
text-transform: uppercase;
}
#infinite-handle span:before {
color: #fff;
}
#infinite-handle span:hover {
background-color: #41a62a;
}
.infinite-loader {
margin: 48px auto;
margin: 4.8rem auto;
width: 25px;
width: 2.5rem;
height: 24px;
height: 2.4rem;
}
#infinite-footer {
z-index: 10;
}
#infinite-footer .container {
border-width: 1px 1px 0 0;
margin: 0;
}
/* Reset when IS is finished */
.infinite-scroll.infinity-end #content {
margin-bottom: 0;
}
.infinite-end.neverending #colophon {
display: block;
}
/* Sharing */
#main div.sharedaddy div.sd-block {
border-top: 1px dotted rgba(0, 0, 0, 0.1);
}
#main div.sharedaddy h3.sd-title {
font-size: 11px;
font-size: 1.1rem;
font-family: lato, sans-serif;
text-transform: uppercase;
}
#main div.sharedaddy .sd-like h3.sd-title {
width: 17.875%;
}
.entry-content > .pd-rating .rating-msg {
font-size: 12px;
font-size: 1.2rem;
}
/* Stats image */
img#wpstats {
margin-top: -5px;
margin-top: -0.5rem;
position: absolute;
}
/* Subscription */
.jetpack_subscription_widget input[type="text"] {
padding: 4px !important;
width: 100% !important;
}
.comment-subscription-form {
margin-bottom: 0;
}
/* =WP.com
----------------------------------------------- */
/* Prevent stats images to break the layout */
img[src^="http://botd"] {
position: absolute;
}
/* Corrects line number misalignemnt in GitHub Gist embeds */
.gist .gist-file .gist-data .line-numbers span {
line-height: 1.7142857142;
}
.entry-content .gist table {
margin-bottom: 0;
}
/* =Media Queries
----------------------------------------------- */
@ -2927,13 +2655,13 @@ img[src^="http://botd"] {
padding-left: 6.0rem;
}
.comments-title,
.nocomments,
.no-comments,
#comments #respond,
.comments-area article,
.comment-list li.trackback,
.comment-list li.pingback,
.post-navigation .nav-previous,
.post-navigation .nav-next {
.post-navigation [rel="prev"],
.post-navigation [rel="next"] {
padding-right: 9.12778904%;
padding-left: 9.12778904%;
}
@ -3030,13 +2758,13 @@ img[src^="http://botd"] {
clear: both;
}
.comments-title,
.nocomments,
.no-comments,
#comments #respond,
.comments-area article,
.comment-list li.trackback,
.comment-list li.pingback,
.post-navigation .nav-previous,
.post-navigation .nav-next {
.post-navigation [rel="prev"],
.post-navigation [rel="next"] {
padding-right: 12.39493534%;
padding-left: 17.06896551%;
}
@ -3225,13 +2953,13 @@ img[src^="http://botd"] {
margin: 0 5.882236%;
}
.comments-title,
.nocomments,
.no-comments,
#comments #respond,
.comments-area article,
.comment-list li.trackback,
.comment-list li.pingback,
.post-navigation .nav-previous,
.post-navigation .nav-next {
.post-navigation [rel="prev"],
.post-navigation [rel="next"] {
padding-right: 9.87001616%;
padding-left: 9.19765166%;
}
@ -3318,13 +3046,13 @@ img[src^="http://botd"] {
margin: 1.2rem 8.03571428% 2.4rem 12.5%;
}
.comments-title,
.nocomments,
.no-comments,
#comments #respond,
.comments-area article,
.comment-list li.trackback,
.comment-list li.pingback,
.post-navigation .nav-previous,
.post-navigation .nav-next {
.post-navigation [rel="prev"],
.post-navigation [rel="next"] {
padding-right: 12.44146986%;
padding-left: 16.77524429%;
}