Make WordPress Core

Changeset 25213


Ignore:
Timestamp:
09/02/2013 09:20:56 PM (12 years ago)
Author:
lancewillett
Message:

Twenty Fourteen: add archive page templates, fix alignment bugs for archive headers, and use content-none.php for consistency. Props obenland, fixes #25181.

Location:
trunk/src/wp-content/themes/twentyfourteen
Files:
5 added
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfourteen/archive.php

    r25088 r25213  
    1919get_header(); ?>
    2020
    21 <section id="primary" class="content-area">
    22     <div id="content" class="site-content" role="main">
     21    <section id="primary" class="content-area">
     22        <div id="content" class="site-content" role="main">
    2323
    24         <?php if ( have_posts() ) : ?>
     24            <?php if ( have_posts() ) : ?>
    2525
    26         <header class="page-header">
    27             <h1 class="page-title">
    28                 <?php
    29                     if ( is_day() ) :
    30                         printf( __( 'Day: %s', 'twentyfourteen' ), get_the_date() );
     26            <header class="page-header">
     27                <h1 class="page-title">
     28                    <?php
     29                        if ( is_day() ) :
     30                            printf( __( 'Day: %s', 'twentyfourteen' ), get_the_date() );
    3131
    32                     elseif ( is_month() ) :
    33                         printf( __( 'Month: %s', 'twentyfourteen' ), get_the_date( 'F Y' ) );
     32                        elseif ( is_month() ) :
     33                            printf( __( 'Month: %s', 'twentyfourteen' ), get_the_date( 'F Y' ) );
    3434
    35                     elseif ( is_year() ) :
    36                         printf( __( 'Year: %s', 'twentyfourteen' ), get_the_date( 'Y' ) );
     35                        elseif ( is_year() ) :
     36                            printf( __( 'Year: %s', 'twentyfourteen' ), get_the_date( 'Y' ) );
    3737
    38                     else :
    39                         _e( 'Archives', 'twentyfourteen' );
     38                        else :
     39                            _e( 'Archives', 'twentyfourteen' );
    4040
    41                     endif;
    42                 ?>
    43             </h1>
    44         </header><!-- .page-header -->
     41                        endif;
     42                    ?>
     43                </h1>
     44            </header><!-- .page-header -->
    4545
    46         <?php
    47                 while ( have_posts() ) :
    48                     the_post();
     46            <?php
     47                    while ( have_posts() ) :
     48                        the_post();
    4949
    50                     get_template_part( 'content', get_post_format() );
    51                 endwhile;
    52                 twentyfourteen_paging_nav();
     50                        get_template_part( 'content', get_post_format() );
     51                    endwhile;
     52                    twentyfourteen_paging_nav();
    5353
    54             else :
    55                 get_template_part( 'no-results', 'archive' );
     54                else :
     55                    get_template_part( 'content', 'none' );
    5656
    57             endif;
    58         ?>
    59     </div><!-- #content -->
    60 </section><!-- #primary -->
     57                endif;
     58            ?>
     59        </div><!-- #content -->
     60    </section><!-- #primary -->
    6161
    6262<?php
  • trunk/src/wp-content/themes/twentyfourteen/front-page.php

    r25090 r25213  
    3232
    3333                        else :
    34                             get_template_part( 'no-results', 'index' );
     34                            get_template_part( 'content', 'none' );
    3535
    3636                        endif;
  • trunk/src/wp-content/themes/twentyfourteen/index.php

    r25088 r25213  
    2828
    2929            else :
    30                 get_template_part( 'no-results', 'index' );
     30                get_template_part( 'content', 'none' );
    3131
    3232            endif;
  • trunk/src/wp-content/themes/twentyfourteen/rtl.css

    r25090 r25213  
    552552    }
    553553
     554    .archive-header,
    554555    .page-header {
    555556        margin: 0 12.5% 24px 8.03571428%;
     
    789790    }
    790791
     792    .archive-header,
    791793    .page-header {
    792794        margin: 0 12.5% 24px 8.03571428%;
  • trunk/src/wp-content/themes/twentyfourteen/search.php

    r25088 r25213  
    99get_header(); ?>
    1010
    11 <section id="primary" class="content-area">
    12     <div id="content" class="site-content" role="main">
     11    <section id="primary" class="content-area">
     12        <div id="content" class="site-content" role="main">
    1313
    14         <?php if ( have_posts() ) : ?>
     14            <?php if ( have_posts() ) : ?>
    1515
    16         <header class="page-header">
    17             <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyfourteen' ), get_search_query() ); ?></h1>
    18         </header><!-- .page-header -->
     16            <header class="page-header">
     17                <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyfourteen' ), get_search_query() ); ?></h1>
     18            </header><!-- .page-header -->
    1919
    20         <?php
    21                 while ( have_posts() ) :
    22                     the_post();
     20            <?php
     21                    while ( have_posts() ) :
     22                        the_post();
    2323
    24                     get_template_part( 'content', get_post_format() );
    25                 endwhile;
    26                 twentyfourteen_paging_nav();
     24                        get_template_part( 'content', get_post_format() );
     25                    endwhile;
     26                    twentyfourteen_paging_nav();
    2727
    28             else :
    29                 get_template_part( 'no-results', 'search' );
     28                else :
     29                    get_template_part( 'content', 'none' );
    3030
    31             endif;
    32         ?>
     31                endif;
     32            ?>
    3333
    34     </div><!-- #content -->
    35 </section><!-- #primary -->
     34        </div><!-- #content -->
     35    </section><!-- #primary -->
    3636
    3737<?php
  • trunk/src/wp-content/themes/twentyfourteen/style.css

    r25090 r25213  
    10841084
    10851085/* .content-area specific styles */
    1086 .content-area .entry-header,
    1087 .content-area .page-header {
     1086.content-area .entry-header {
    10881087    background-color: #fff;
    10891088    padding: 24px 10px 12px;
    10901089    padding: 2.4rem 1.0rem 1.2rem;
    10911090}
    1092 .content-area .entry-title,
    1093 .content-area .page-title {
     1091.content-area .entry-title {
    10941092    font-size: 33px;
    10951093    font-size: 3.3rem;
     
    13071305    height: 0.4rem;
    13081306}
     1307.archive-header,
    13091308.page-header {
    13101309    margin: 0 0 24px;
     
    13131312    padding: 0 1.0rem;
    13141313}
     1314.archive-title,
    13151315.page-title {
    13161316    font-size: 16px;
     
    13211321    margin-bottom: 2.4rem;
    13221322}
    1323 .taxonomy-description p {
     1323.taxonomy-description {
    13241324    color: #767676;
    13251325    font-size: 12px;
     
    25642564        padding: 0 4.46428571%;
    25652565    }
     2566    .archive-header,
    25662567    .page-header {
    25672568        margin: 0 4.59183673% 24px;
     
    27022703        margin: 0 11.30926724%;
    27032704    }
     2705    .archive-header,
    27042706    .page-header {
    27052707        margin: 0 8.03571428% 24px 12.5%;
     
    28272829        width: 24.87804878%;
    28282830    }
    2829     .content-area .entry-header,
    2830     .content-area .page-header {
     2831    .content-area .entry-header {
    28312832        margin: -48px 4.59183673% 0;
    28322833        margin: -4.8rem 4.59183673% 0;
     
    28462847        padding: 0 4.46428571%;
    28472848    }
     2849    .archive-header,
    28482850    .page-header {
    28492851        margin: 0 4.59183673% 24px;
     
    29742976
    29752977@media screen and (min-width: 1150px) {
    2976     .content-area .entry-header,
    2977     .content-area .page-header {
     2978    .content-area .entry-header {
    29782979        margin: -48px 8.03571428% 0 12.5%;
    29792980        margin: -4.8rem 8.03571428% 0 12.5%;
     
    30103011        padding-left: 16.77524429%;
    30113012    }
     3013    .archive-header,
    30123014    .page-header {
    30133015        margin: 0 8.03571428% 24px 12.5%;
Note: See TracChangeset for help on using the changeset viewer.