Making WordPress.org

Changeset 742


Ignore:
Timestamp:
07/09/2014 06:46:05 PM (10 years ago)
Author:
coffee2code
Message:

Code Reference: add search form to search results page.

  • Add search form to top of search results page
  • Add breadcrumb for search results page
  • Make searchform template applicable outside of reference landing page

See #450, #494.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/content-none.php

    r556 r742  
    2323            } ?>
    2424            </h4>
    25             <?php get_search_form(); ?>
    2625        </div><!-- /search-guide -->
    2726    </div><!-- .reference-landing -->
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/scss/main.scss

    r724 r742  
    578578    }
    579579
     580    .section.search-section {
     581        padding-bottom: 0;
     582    }
     583
     584    .searchform {
     585        overflow: hidden;
     586        height: auto;
     587        margin-bottom: 1em;
     588        input[type="text"], input[type="submit"] {
     589            height: 50px;
     590            height: 5rem;
     591            margin-bottom: 1em;
     592            width: 100%;
     593        }
     594        input[type="submit"] {
     595            width: 85px;
     596            width: 8.5rem;
     597            float: left;
     598        }
     599        label {
     600            width: 560px;
     601            width: 56rem;
     602            max-width: 100%;
     603            margin-right: 15px;
     604            display: inline-block;
     605            float: left;
     606            .search-field input[type="text"] {
     607                width: 100%;
     608            }
     609        }
     610        div {
     611            overflow: auto;
     612        }
     613    }
     614
    580615    .reference-landing {
    581616        padding: 1em 0;
     
    603638            &.section.topic-guide, &.section.new-in-guide  {
    604639                padding-top: 0;
    605             }
    606         }
    607         .searchform {
    608             overflow: hidden;
    609             height: auto;
    610             margin-bottom: 1em;
    611             input {
    612                 height: 50px;
    613                 height: 5rem;
    614                 margin-bottom: 1em;
    615                 width: 100%;
    616             }
    617             input[type="submit"] {
    618                 width: 85px;
    619                 width: 8.5rem;
    620                 float: left;
    621             }
    622             label {
    623                 width: 560px;
    624                 width: 56rem;
    625                 max-width: 100%;
    626                 margin-right: 15px;
    627                 display: inline-block;
    628                 float: left;
    629                 .search-field input[type="text"] {
    630                     width: 100%;
    631                 }
    632 
    633640            }
    634641        }
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/search.php

    r596 r742  
    1010    <div id="content-area">
    1111
    12         <header class="page-header">
    13             <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'wporg' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
    14         </header><!-- .page-header -->
     12        <div class="breadcrumb-trail breadcrumbs" itemprop="breadcrumb">
     13            <span class="trail-browse"><span class="trail-begin"><?php _e( 'Search Results', 'wporg' ); ?></span></span>
     14            <span class="sep">/</span> <span class="trail-end"><?php echo esc_html( get_search_query() ); ?></span>
     15        </div>
     16
     17        <?php get_search_form(); ?>
     18
    1519        <main id="main" class="site-main" role="main">
    1620
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/searchform.php

    r554 r742  
    66 */
    77?>
    8 <form role="search" method="get" class="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>">
    9     <label>
    10         <span class="screen-reader-text"><?php _ex( 'Search for:', 'label', 'wporg' ); ?></span>
    11         <input type="text" class="search-field" placeholder="<?php echo esc_attr_x( 'Search &hellip;', 'placeholder', 'wporg' ); ?>" value="<?php echo esc_attr( get_search_query() ); ?>" name="s">
    12     </label>
    13     <input type="submit" class="shiny-blue search-submit" value="<?php echo esc_attr_x( 'Search', 'submit button', 'wporg' ); ?>">
    14 </form>
     8<div class="search-section section clear">
     9
     10    <form role="search" method="get" class="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>">
     11        <div>
     12        <label>
     13            <span class="screen-reader-text"><?php _ex( 'Search for:', 'label', 'wporg' ); ?></span>
     14            <input type="text" class="search-field" placeholder="<?php echo esc_attr_x( 'Search &hellip;', 'placeholder', 'wporg' ); ?>" value="<?php echo esc_attr( get_search_query() ); ?>" name="s">
     15        </label>
     16        <input type="submit" class="shiny-blue search-submit" value="<?php echo esc_attr_x( 'Search', 'submit button', 'wporg' ); ?>">
     17        </div>
     18    </form>
     19
     20</div><!-- /search-guide -->
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/stylesheets/main.css

    r724 r742  
    819819  clear: none;
    820820}
    821 .devhub-wrap .reference-landing {
    822   padding: 1em 0;
    823 }
    824 .devhub-wrap .reference-landing .section {
    825   max-width: 700px;
    826   max-width: 70rem;
    827   margin: 0 auto;
    828   padding: 1.5em 0;
    829 }
    830 .devhub-wrap .reference-landing .section h2,
    831 .devhub-wrap .reference-landing .section h3,
    832 .devhub-wrap .reference-landing .section h4 {
    833   margin-bottom: 1em;
    834   color: #404040;
    835 }
    836 .devhub-wrap .reference-landing .section h2.widget-title,
    837 .devhub-wrap .reference-landing .section h3.widget-title,
    838 .devhub-wrap .reference-landing .section h4.widget-title {
    839   margin-bottom: 0;
    840 }
    841 .devhub-wrap .reference-landing .section.search-guide {
     821.devhub-wrap .section.search-section {
    842822  padding-bottom: 0;
    843823}
    844 .devhub-wrap .reference-landing .section.section.topic-guide, .devhub-wrap .reference-landing .section.section.new-in-guide {
     824.devhub-wrap .reference-landing .section.search-section {
    845825  padding-top: 0;
    846826}
    847 .devhub-wrap .reference-landing .searchform {
     827.devhub-wrap .searchform {
    848828  overflow: hidden;
    849829  height: auto;
    850830  margin-bottom: 1em;
    851831}
    852 .devhub-wrap .reference-landing .searchform input {
     832.devhub-wrap .searchform input[type="text"], .devhub-wrap .searchform input[type="submit"] {
    853833  height: 50px;
    854834  height: 5rem;
     
    856836  width: 100%;
    857837}
    858 .devhub-wrap .reference-landing .searchform input[type="submit"] {
     838.devhub-wrap .searchform input[type="submit"] {
    859839  width: 85px;
    860840  width: 8.5rem;
    861841  float: left;
    862842}
    863 .devhub-wrap .reference-landing .searchform label {
     843.devhub-wrap .searchform label {
    864844  width: 560px;
    865845  width: 56rem;
     
    869849  float: left;
    870850}
    871 .devhub-wrap .reference-landing .searchform label .search-field input[type="text"] {
     851.devhub-wrap .searchform label .search-field input[type="text"] {
    872852  width: 100%;
     853}
     854.devhub-wrap .searchform div {
     855  overflow: auto;
     856}
     857.devhub-wrap .reference-landing {
     858  padding: 1em 0;
     859}
     860.devhub-wrap .reference-landing .section, .devhub-wrap .search-section {
     861  max-width: 700px;
     862  max-width: 70rem;
     863  margin: 0 auto;
     864  padding: 1.5em 0;
     865}
     866.devhub-wrap .reference-landing .section h2,
     867.devhub-wrap .reference-landing .section h3,
     868.devhub-wrap .reference-landing .section h4 {
     869  margin-bottom: 1em;
     870  color: #404040;
     871}
     872.devhub-wrap .reference-landing .section h2.widget-title,
     873.devhub-wrap .reference-landing .section h3.widget-title,
     874.devhub-wrap .reference-landing .section h4.widget-title {
     875  margin-bottom: 0;
     876}
     877.devhub-wrap .reference-landing .section.search-guide {
     878  padding-bottom: 0;
     879}
     880.devhub-wrap .reference-landing .section.section.topic-guide, .devhub-wrap .reference-landing .section.section.new-in-guide {
     881  padding-top: 0;
    873882}
    874883.devhub-wrap .reference-landing .box,
Note: See TracChangeset for help on using the changeset viewer.