Making WordPress.org

Changeset 3075


Ignore:
Timestamp:
05/04/2016 11:50:20 AM (8 years ago)
Author:
tellyworth
Message:

Add pagination links.

This is mainly for testing search, as the theme will soon be replaced.

See #1574

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins
Files:
2 edited
1 copied

Legend:

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

    r3009 r3075  
    66
    77<?php get_template_part( 'filter-bar' ); ?>
     8
     9<?php get_template_part( 'pagination-bar' ); ?>
    810
    911<div class="wrapper">
     
    2931</div>
    3032
     33<?php get_template_part( 'pagination-bar' ); ?>
     34
    3135<br class="clear" />
    3236<?php
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/pagination-bar.php

    r3072 r3075  
    55<div class="wrapper">
    66    <div class="col-12 filter-bar">
    7         <div class="wp-filter">
    8             <ul class="filter-links">
    9                 <?php if ( get_query_var('s' ) ) { ?>
    10                     <li class="plugin-install-search"><a href="<?php echo esc_url( home_url( 'search/' . urlencode( get_query_var('s') ) . '/' ) ); ?>" class="current"><?php _ex( 'Search Results', 'tab', 'wporg-plugins' ); ?></a></li>
    11                 <?php } ?>
    12                 <li class="plugin-install-featured"><a href="<?php echo esc_url( home_url( 'browse/featured/' ) ); ?>" <?php if ( (is_front_page() && !get_query_var('browse') ) || 'featured' == get_query_var('browse') ) { echo 'class="current"'; } ?>><?php _ex( 'Featured', 'plugins', 'wporg-plugins' ); ?></a></li>
    13                 <li class="plugin-install-popular"><a href="<?php echo esc_url( home_url( 'browse/popular/' ) ); ?>" <?php if ( 'popular' == get_query_var('browse') ) { echo 'class="current"'; } ?>><?php _ex( 'Popular', 'plugins', 'wporg-plugins' ); ?></a> </li>
    14                 <?php if ( is_user_logged_in() ) { ?>
    15                     <li class="plugin-install-favorites"><a href="<?php echo esc_url( home_url( 'browse/favorites/' ) ); ?>" <?php if ( 'favorites' == get_query_var('browse') ) { echo 'class="current"'; } ?>><?php _ex( 'Favorites', 'plugins', 'wporg-plugins' ); ?></a></li>
    16                 <?php } ?>
    17                 <li class="plugin-install-beta"><a href="<?php echo esc_url( home_url( 'browse/beta/' ) ); ?>" <?php if ( 'beta' == get_query_var('browse') ) { echo 'class="current"'; } ?>><?php _ex( 'Beta Testing', 'plugins', 'wporg-plugins' ); ?></a></li>
    18                 <li class="plugin-developer"><a href="<?php echo get_permalink( get_page_by_path( 'about' ) ); ?>" <?php if ( 'about' == get_query_var( 'pagename' ) ) { echo 'class="current"'; } ?>><?php _ex( 'Developers', 'plugins', 'wporg-plugins' ); ?></a></li>
    19             </ul>
    20 
    21             <form class="search-form search-plugins" method="get" action="<?php echo home_url('/'); ?>">
    22                 <label>
    23                     <span class="screen-reader-text"><?php _e( 'Search Plugins', 'wporg-plugins' ); ?></span>
    24                     <input type="search" name="s" value="<?php echo esc_attr( get_query_var( 's' ) ); ?>" class="wp-filter-search" placeholder="<?php esc_attr_e( 'Search plugins...', 'wporg-plugins' ); ?>">
    25                 </label>
    26                 <input type="submit" name="" id="search-submit" class="button screen-reader-text" value="<?php esc_attr_e( 'Search Plugins', 'wporg-plugins' ); ?>">
    27             </form>
     7        <div class="plugin-pagination">
     8            <?php
     9                the_posts_pagination( array(
     10                        'mid_size' => 5,
     11                        'prev_text' => __( 'Back', 'wporg-plugins' ),
     12                        'next_text' => __( 'Onward', 'wporg-plugins' ),
     13                ) );
     14            ?>
    2815        </div>
    2916    </div>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/style.css

    r3009 r3075  
    15141514    margin-left: 5px;
    15151515}
     1516
     1517.page-numbers {
     1518    font-size: 11px;
     1519    line-height: 1;
     1520    padding: 4px 6px;
     1521    margin-right: 3px;
     1522    border-width: 1px;
     1523    border-style: solid;
     1524    background-color: #fff;
     1525    border-color: #ccc;
     1526    display: inline-block;
     1527    text-align: center;
     1528}
     1529
     1530.dots {
     1531    background: none;
     1532    border: none;
     1533}
     1534
     1535.page-numbers.current {
     1536    font-weight: bold;
     1537    border-width: 1px;
     1538    border-style: solid;
     1539    background-color: #328ab2;
     1540    border-color: #328ab2;
     1541    color: #fff;
     1542}
     1543
     1544a.page-numbers:hover {
     1545    border-color: #999;
     1546}
     1547
     1548.next,
     1549.prev {
     1550    padding: 0;
     1551    border: none;
     1552    background-color: #fff;
     1553    color: #2583ad;
     1554}
     1555
     1556.next:hover,
     1557.prev:hover {
     1558    color: #d54e21;
     1559}
Note: See TracChangeset for help on using the changeset viewer.