WordPress.org

Making WordPress.org

Changeset 1274


Ignore:
Timestamp:
02/17/2015 11:18:19 PM (6 years ago)
Author:
obenland
Message:

WP.org Themes: Use main query instead of Themes API for server output.

  • Can now deal properly with /browse/*/ URL structure.
  • Adds single theme navigation.
  • Adds Photon support for server output.
  • Brings single theme view closer to melchoyce's mockups.

See #745.

Location:
sites/trunk/wordpress.org/public_html/wp-content
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/class-wporg-themes-repo-package.php

    r1219 r1274  
    1010
    1111    /**
    12      * Returns the screenshot URL for a theme.
     12     * Returns the screen shot URL for a theme.
    1313     *
    1414     * @return string
    1515     */
    16     public function screenshot_url() {
    17         $screen = $this->wp_post->_screenshot;
    18         if ( ! $screen ) {
    19             $screen = sprintf( '//ts.w.org/wp-content/themes/%1$s/screenshot.png?ver=%2$s', $this->wp_post->post_name, $this->latest_version() );
     16    public function screen_shot_url() {
     17        $screen  = 'screenshot.png';
     18        $version = $this->latest_version();
     19
     20        if ( ! empty( $this->wp_post->_screen_shot[ $version ] ) ) {
     21            $screen = $this->wp_post->_screen_shot[ $version ];
    2022        }
    2123
    22         return $screen;
     24        return sprintf( 'https://i0.wp.com/themes.svn.wordpress.org/%1$s/%2$s/%3$s',
     25            $this->wp_post->post_name,
     26            $version,
     27            $screen
     28        );
    2329    }
    2430
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/class-wporg-themes-upload.php

    r1225 r1274  
    302302        usort( $screen_shots, array( $this, 'sort_by_string_length' ) );
    303303
    304         $screen_shot                  = array_pop( $screen_shots );
    305         $this->theme->screen_shot_ext = pathinfo( $screen_shot, PATHINFO_EXTENSION );
    306 
    307         return (bool) $screen_shot;
     304        $this->theme->screen_shot = array_pop( $screen_shots );
     305
     306        return (bool) $this->theme->screen_shot;
    308307    }
    309308
     
    449448[[TicketQuery(format=table, keywords=~theme-{$this->theme->get_stylesheet()}, col=id|summary|status|resolution|owner)]]
    450449
    451 [[Image(https://themes.svn.wordpress.org/{$this->theme->get_stylesheet()}/{$this->theme->display( 'Version' )}/screenshot.{$this->theme->screen_shot_ext}, width=640)]]
     450[[Image(https://themes.svn.wordpress.org/{$this->theme->get_stylesheet()}/{$this->theme->display( 'Version' )}/{$this->theme->screen_shot}, width=640)]]
    452451TICKET;
    453452    }
     
    532531            '_upload_date' => $upload_date,
    533532            '_ticket_id'   => $ticket_id,
     533            '_screen_shot' => $this->theme->screen_shot,
    534534        );
    535535
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/theme-directory.php

    r1220 r1274  
    2020// Load uploader.
    2121include_once plugin_dir_path( __FILE__ ) . 'upload.php';
     22
     23register_activation_hook( __FILE__, 'flush_rewrite_rules' );
     24register_deactivation_hook( __FILE__, 'flush_rewrite_rules' );
    2225
    2326/**
     
    5760        'query_var'           => true,
    5861        'can_export'          => true,
    59         'rewrite'             => true,
     62        'rewrite'             => array( 'slug' => '/' ),
    6063        'capability_type'     => 'post',
    6164    );
     
    6568        register_post_type( 'repopackage', $args );
    6669    }
     70
     71    add_rewrite_tag( '%browse%', '(featured|popular|new)' );
     72
     73    // Single themes.
     74    add_rewrite_rule( '(.?.+?)(/[0-9]+)?/?$', 'index.php?post_type=repopackage&name=$matches[1]', 'top' );
     75
     76    // Browse views.
     77    add_rewrite_rule( 'browse/(featured|popular|new)/?$', 'index.php?post_type=repopackage&browse=$matches[1]', 'top' );
     78
     79    // Paginated browse views.
     80    add_rewrite_rule( 'browse/(featured|popular|new)/page/?([0-9]{1,})/?$', 'index.php?post_type=repopackage&browse=$matches[1]&paged=$matches[2]', 'top' );
    6781}
    6882add_action( 'init', 'wporg_themes_init' );
     83
     84/**
     85 * Adjusts query to account for custom views.
     86 *
     87 * @param WP_Query $wp_query
     88 * @return WP_Query
     89 */
     90function wporg_themes_set_up_query( $wp_query ) {
     91    if ( is_admin() || in_array( $wp_query->get( 'pagename' ), array( 'upload', 'commercial' ) ) || 'nav_menu_item' == $wp_query->get( 'post_type' ) ) {
     92        return $wp_query;
     93    }
     94
     95    $wp_query->set( 'post_type', 'repopackage' );
     96
     97    if ( $wp_query->is_home() ) {
     98        $wp_query->set( 'browse', 'featured' );
     99    }
     100
     101    if ( $wp_query->get( 'browse' ) ) {
     102        switch ( $wp_query->get( 'browse' ) ) {
     103            case 'featured':
     104                $wp_query->set( 'paged', 1 );
     105                $wp_query->set( 'posts_per_page', 15 );
     106                $wp_query->set( 'date_query', array(
     107                    array(
     108                        'column' => 'post_modified_gmt',
     109                        'after'  => '-1 year',
     110                    ),
     111                ) );
     112                $wp_query->set( 'orderby', 'rand' );
     113                break;
     114
     115            case 'popular':
     116                //TODO: Sort by popularity.
     117                break;
     118
     119            case 'new':
     120                break;
     121        }
     122    }
     123
     124    return $wp_query;
     125}
     126add_filter( 'pre_get_posts', 'wporg_themes_set_up_query' );
     127
     128/**
     129 * Adjusts the amount of found posts when browsing featured themes.
     130 *
     131 * @param string   $found_posts
     132 * @param WP_Query $wp_query
     133 * @return string
     134 */
     135function wporg_themes_found_posts( $found_posts, $wp_query ) {
     136    if ( $wp_query->is_main_query() && 'featured' === $wp_query->get( 'browse' ) ) {
     137        $found_posts = $wp_query->get( 'posts_per_page' );
     138    }
     139
     140    return $found_posts;
     141}
     142add_filter( 'found_posts', 'wporg_themes_found_posts', 10, 2 );
    69143
    70144/**
     
    169243 * @return string
    170244 */
    171 function wporg_themes_post_thumbnail_html( $html, $post_id ) {
     245function wporg_themes_post_thumbnail_html( $html, $post_id, $post_thumbnail_id, $size ) {
    172246    $post = get_post( $post_id );
    173247    if ( 'repopackage' == $post->post_type ) {
    174248        $theme = new WPORG_Themes_Repo_Package( $post );
    175         // no size because we only have one (unknown) image size, so the theme needs to size with css
    176         $html = '<img src="' . $theme->screenshot_url() . '"/>';
     249        $src   = add_query_arg( array( 'w' => $size, 'strip' => 'all' ), $theme->screen_shot_url() );
     250
     251        $html = '<img src="' . esc_url( $src ) . '"/>';
    177252    }
    178253
    179254    return $html;
    180255}
    181 add_filter( 'post_thumbnail_html', 'wporg_themes_post_thumbnail_html', 10, 2 );
     256add_filter( 'post_thumbnail_html', 'wporg_themes_post_thumbnail_html', 10, 5 );
     257
    182258
    183259/**
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/content-single.php

    r1255 r1274  
    11<?php
    2     global $theme;
    3     $theme = wporg_themes_photon_screen_shot( $theme );
     2$slug  = get_post()->post_name;
     3$theme = themes_api('theme_information', array( 'slug' => $slug ) );
    44?>
    55<div class="theme-wrap">
    66    <div class="theme-about hentry">
    77
    8         <?php if ( strtotime( '-2 years' ) > strtotime( $theme->last_updated ) ) : ?>
     8        <?php if ( strtotime( '-2 years' ) > get_post_modified_time() ) : ?>
    99        <div class="theme-notice notice notice-warning">
    1010            <p><?php _e( 'This theme <strong>hasn&#146;t been updated in over 2 years</strong>. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.', 'wporg-themes' ); ?></p>
     
    1414        <div class="theme-head">
    1515            <h3 class="theme-name entry-title"><?php the_title(); ?></h3>
    16             <h4 class="theme-author"><?php printf( __( 'By %s' ), sprintf( '<a href="https://profiles.wordpress.org/%s"><span class="author">%s</span><a/>', $theme->author ) ); ?></h4>
     16            <h4 class="theme-author">
     17                <?php printf( _x( 'By %s', 'post author', 'wporg-themes' ), sprintf( '<a href="https://profiles.wordpress.org/%s"><span class="author">%s</span></a>', get_the_author_meta( 'login' ), esc_html( get_the_author() ) ) ); ?>
     18            </h4>
    1719
    1820            <div class="theme-actions">
    19                 <a href="<?php echo esc_url( '//downloads.wordpress.org/theme/' . $theme->slug . '.' . $theme->version . '.zip' ); ?>" class="button button-primary"><?php _e( 'Download' ); ?></a>
    20                 <a href="<?php echo esc_url( $theme->preview_url ); ?>" class="button button-secondary"><?php _e( 'Preview' ); ?></a>
     21                <a href="<?php echo esc_url( '//wp-themes.com/' . $slug ); ?>" class="button button-secondary"><?php _e( 'Preview' ); ?></a>
     22                <a href="<?php echo esc_url( '//downloads.wordpress.org/theme/' . $slug . '.' . $theme->version . '.zip' ); ?>" class="button button-primary"><?php _e( 'Download' ); ?></a>
    2123            </div>
    2224
    23             <?php if ( ! empty( $theme->parent ) ) : ?>
     25            <?php if ( ! empty( get_post()->parent ) ) : ?>
    2426            <div class="theme-notice notice notice-info">
    2527                <p class="parent-theme"><?php printf( __( 'This is a child theme of %s.' ), sprintf( '<a href="/%1$s">%2$s</a>', $theme->parent->slug, $theme->parent->name ) ); ?></p>
     
    2931
    3032        <div class="theme-info">
    31             <div class="screenshot"><?php echo esc_url( $theme->screenshot_url . '?w=732&strip=all' ); ?></div>
     33            <div class="screenshot"><?php the_post_thumbnail( '798' ); ?></div>
    3234
    3335            <div class="theme-description entry-summary"><?php the_content(); ?></div>
    3436
    3537            <div class="theme-tags">
    36                 <h4><?php _e( 'Tags:' ); ?></h4>
    37                 <?php
    38                 foreach( $theme->tags as &$tag ) :
    39                     $tag = sprintf( '<a href="%1$s">%2$s</a>', esc_url( home_url( "/tag/{$tag}/" ) ), $tag );
    40                 endforeach;
    41                 echo implode( ', ', $theme->tags );
    42                 ?>
     38                <?php the_tags( '<h4>' . __( 'Tags:' ) . '</h4>' ); ?>
    4339            </div><!-- .theme-tags -->
    4440
     
    4642                <h4><?php _e( 'Downloads', 'wporg-themes' ); ?></h4>
    4743
    48                 <div id="theme-download-stats-<?php echo esc_attr( $theme->slug ); ?>" class="chart"></div>
     44                <div id="theme-download-stats-<?php echo esc_attr( $slug ); ?>" class="chart"></div>
    4945                <script type="text/javascript">
    5046                    google.load("visualization", "1", {packages:["corechart"]});
     
    5349                    function drawThemeDownloadsChart() {
    5450                        jQuery(document).ready(function($){
    55                             jQuery.getJSON('https://api.wordpress.org/stats/themes/1.0/downloads.php?slug=<?php echo $theme->slug; ?>&limit=730&callback=?', function (downloads) {
     51                            $.getJSON('https://api.wordpress.org/stats/themes/1.0/downloads.php?slug=<?php echo $slug; ?>&limit=730&callback=?', function (downloads) {
    5652                                var data = new google.visualization.DataTable(),
    5753                                    count = 0;
     
    6763                                });
    6864
    69                                 new google.visualization.ColumnChart(document.getElementById('theme-download-stats-<?php echo esc_attr( $theme->slug ); ?>')).draw(data, {
     65                                new google.visualization.ColumnChart(document.getElementById('theme-download-stats-<?php echo esc_attr( $slug ); ?>')).draw(data, {
    7066                                    colors: ['#253578'],
    7167                                    legend: {
     
    118114                <?php if ( ! empty( $theme->ratings ) && ! empty( $theme->num_ratings ) ) : ?>
    119115                <ul>
    120                     <?php foreach ( $theme->ratings as $key => $rate_count ) : ?>
     116                    <?php
     117                        foreach ( $theme->ratings as $key => $rate_count ) :
     118                            // Hack to have descending key/value pairs.
     119                            $key        = 6 - $key;
     120                            $rate_count = $theme->ratings[ $key ];
     121                    ?>
    121122                    <li class="counter-container">
    122                         <a href="//wordpress.org/support/view/theme-reviews/<?php echo esc_attr( $theme->slug ); ?>?filter=<?php echo $key; ?>" title="<?php printf( _n( 'Click to see reviews that provided a rating of %d star', 'Click to see reviews that provided a rating of %d stars', $key, 'wporg-themes' ), $key ); ?>">
     123                        <a href="//wordpress.org/support/view/theme-reviews/<?php echo esc_attr( $slug ); ?>?filter=<?php echo $key; ?>" title="<?php printf( _n( 'Click to see reviews that provided a rating of %d star', 'Click to see reviews that provided a rating of %d stars', $key, 'wporg-themes' ), $key ); ?>">
    123124                            <span class="counter-label"><?php printf( __( '%d stars', 'wporg-themes' ), $key ); ?></span>
    124125                            <span class="counter-back">
     
    133134            </div><!-- .theme-rating -->
    134135
     136            <div class="theme-support">
     137                <h4><?php _e( 'Support', 'wporg-themes' ); ?></h4>
     138                <p><?php _e( 'Got something to say? Neeed help?', 'wporg-themes' ); ?></p>
     139                <a href="//wordpress.org/support/theme/<?php echo esc_attr( $slug ); ?>" class="button button-secondary"><?php _e( 'View support forum', 'wporg-themes' ); ?></a>
     140            </div><!-- .theme-support -->
     141
    135142            <div class="theme-devs">
    136143                <h4><?php _e( 'Development', 'wporg-themes' ); ?></h4>
     
    138145                <ul class="unmarked-list">
    139146                    <li>
    140                         <a href="//themes.trac.wordpress.org/log/<?php echo esc_attr( $theme->slug ); ?>?limit=100&mode=stop_on_copy&format=rss">
     147                        <a href="//themes.trac.wordpress.org/log/<?php echo esc_attr( $slug ); ?>?limit=100&mode=stop_on_copy&format=rss">
    141148                            <img src="//s.w.org/style/images/feedicon.png" />
    142149                            <?php _e( 'Development Log', 'wporg' ); ?>
     
    147154                <h5><?php _e( 'Browse the Code', 'wporg-themes' ); ?></h5>
    148155                <ul class="unmarked-list">
    149                     <li><a href="//themes.trac.wordpress.org/log/<?php echo esc_attr( $theme->slug ); ?>/" rel="nofollow"><?php _e( 'Development Log', 'wporg-themes' ); ?></a></li>
    150                     <li><a href="//themes.svn.wordpress.org/<?php echo esc_attr( $theme->slug ); ?>/" rel="nofollow"><?php _e( 'Subversion Repository', 'wporg-themes' ); ?></a></li>
    151                     <li><a href="//themes.trac.wordpress.org/browser/<?php echo esc_attr( $theme->slug ); ?>/" rel="nofollow"><?php _e( 'Browse in Trac', 'wporg-themes' ); ?></a></li>
     156                    <li><a href="//themes.trac.wordpress.org/log/<?php echo esc_attr( $slug ); ?>/" rel="nofollow"><?php _e( 'Development Log', 'wporg-themes' ); ?></a></li>
     157                    <li><a href="//themes.svn.wordpress.org/<?php echo esc_attr( $slug ); ?>/" rel="nofollow"><?php _e( 'Subversion Repository', 'wporg-themes' ); ?></a></li>
     158                    <li><a href="//themes.trac.wordpress.org/browser/<?php echo esc_attr( $slug ); ?>/" rel="nofollow"><?php _e( 'Browse in Trac', 'wporg-themes' ); ?></a></li>
    152159                </ul>
    153160            </div><!-- .theme-devs -->
    154161        </div><!-- .theme-meta -->
    155162    </div>
     163    <div class="theme-footer">
     164        <a class="index-link" rel="home" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php _e( 'Return to Themes List', 'wporg-themes' ); ?></a>
     165        <?php the_post_navigation( array(
     166            'prev_text' => '<span class="screen-reader-text">' . __( 'Next', 'wporg-themes' ) . '</span>',
     167            'next_text' => '<span class="screen-reader-text">' . __( 'Previous', 'wporg-themes' ) . '</span>',
     168        ) ); ?>
     169    </div>
    156170</div>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/content.php

    r1265 r1274  
    11<?php
    2     global $theme;
    3     $theme = wporg_themes_photon_screen_shot( $theme );
     2$post  = get_post();
     3$theme = new WPORG_Themes_Repo_Package( $post );
    44?>
    5 <article id="post-<?php echo $theme->slug; ?>" class="theme hentry">
    6     <a class="url" href="<?php echo esc_url( home_url( $theme->slug . '/' ) ); ?>" rel="bookmark" tabindex="-1">
     5<article id="post-<?php echo $post->post_name; ?>" class="theme hentry">
     6    <a class="url" href="<?php the_permalink(); ?>" rel="bookmark">
    77        <div class="theme-screenshot">
    8             <img src="<?php echo esc_url( $theme->screenshot_url . '?w=572&strip=all' ); ?>" alt="">
     8            <?php the_post_thumbnail( '572' ); ?>
    99        </div>
    1010        <span class="more-details"><?php _ex( 'More Info', 'theme' ); ?></span>
    11         <div class="theme-author"><?php printf( __( 'By %s' ), '<span class="author">' . $theme->author . '</span>' ); ?></div>
    12         <h3 class="theme-name entry-title"><?php echo $theme->name; ?></h3>
     11        <div class="theme-author">
     12            <?php printf( _x( 'By %s', 'post author', 'wporg-themes' ), '<span class="author vcard">' . esc_html( get_the_author() ) . '</span>' ); ?>
     13        </div>
     14        <h3 class="theme-name entry-title"><?php the_title(); ?></h3>
    1315
    1416        <div class="theme-actions">
    15             <a class="button button-primary preview install-theme-preview" href="<?php echo esc_url( '//downloads.wordpress.org/theme/' . $theme->slug . '.' . $theme->version . '.zip' ); ?>"><?php esc_html_e( 'Download' ); ?></a>
     17            <a class="button button-primary preview install-theme-preview" href="<?php echo esc_url( '//downloads.wordpress.org/theme/' . $post->post_name . '.' . $theme->latest_version() . '.zip' ); ?>"><?php esc_html_e( 'Download' ); ?></a>
    1618        </div>
    1719    </a>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php

    r1243 r1274  
    5555
    5656/**
    57  * Makes an API request to retrieve the right themes for the current query.
    58  *
    59  * @param WP_Query $query
    60  * @return WP_Query
    61  */
    62 function wporg_themes_set_up_query( $query ) {
    63     if ( is_admin() || in_array( $query->query_vars['pagename'], array( 'upload', 'commercial' ) ) || 'nav_menu_item' == $query->get( 'post_type' ) ) {
    64         return $query;
    65     }
    66 
    67     $query->set( 'post_type', 'repopackage' );
    68 
    69     $args = array(
    70         'per_page' => 15,
    71         'fields'   => array(
    72             'description'  => true,
    73             'sections'     => false,
    74             'tested'       => true,
    75             'requires'     => true,
    76             'rating'       => true,
    77             'downloaded'   => true,
    78             'downloadlink' => true,
    79             'last_updated' => true,
    80             'homepage'     => true,
    81             'tags'         => true,
    82             'num_ratings'  => true,
    83             'parent'       => true,
    84         ),
    85     );
    86 
    87     if ( $query->query_vars['tag'] ) {
    88         $args['tag'][] = $query->query_vars['tag'];
    89     }
    90     elseif ( $query->query_vars['author_name'] ) {
    91         $args['author'] = $query->query_vars['author_name'];
    92     }
    93     elseif ( $query->query_vars['pagename'] ) {
    94         $slugs = explode( '/', $query->query_vars['pagename'] );
    95 
    96         if ( count( $slugs ) > 1 && 'browse' == $slugs[0] ) {
    97             $args['browse'] = $slugs[1];
    98         } else {
    99             $args['theme'] = $slugs[0];
    100         }
    101     }
    102     else {
    103         $args['browse'] = 'featured';
    104     }
    105 
    106     if ( ! function_exists( 'themes_api' ) ) {
    107         include ABSPATH . 'wp-admin/includes/theme.php';
    108     }
    109     $GLOBALS['themes'] = themes_api( 'query_themes', $args );
    110 
    111     return $query;
    112 }
    113 add_filter( 'pre_get_posts', 'wporg_themes_set_up_query' );
    114 
    115 /**
    11657 * Enqueue scripts and styles.
    11758 */
     
    12364    wp_enqueue_style( 'wporg-themes-style', get_stylesheet_uri() );
    12465
    125     wp_enqueue_script( 'google-jsapi', '//www.google.com/jsapi', array(), null );
     66    wp_enqueue_script( 'google-jsapi', '//www.google.com/jsapi', array( 'jquery' ), null );
    12667
    12768    if ( ! is_singular( 'page' ) ) {
     
    199140 */
    200141function wporg_themes_api_args( $args, $action ) {
    201     if ( 'query_themes' == $action ) {
     142    if ( in_array( $action, array( 'query_themes', 'theme_information' ) ) ) {
    202143        $args->per_page = 30;
    203144        $args->fields['parent']  = true;
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/index.php

    r1247 r1274  
    1212 */
    1313
    14 
    15 
     14if ( ! function_exists( 'get_theme_feature_list' ) ) {
     15    include ABSPATH . 'wp-admin/includes/theme.php';
     16}
    1617get_header();
    17 
    18 global $themes;
    1918?>
    2019
     
    2221        <div class="wp-filter">
    2322            <div class="filter-count">
    24                 <span class="count theme-count"><?php echo count( $themes->themes ); ?></span>
     23                <span class="count theme-count"><?php echo $GLOBALS['wp_query']->found_posts; ?></span>
    2524            </div>
    2625
     
    6665            <div class="themes" style="display:none;">
    6766                <?php
    68                 if ( ! is_wp_error( $themes ) ) :
    69                     if ( is_single() ) :
    70                         $theme = array_shift( $themes->themes );
    71                         get_template_part( 'content', 'single' );
    72                     else :
    73                         foreach ( $themes->themes as $theme ) :
    74                             get_template_part( 'content', 'index' );
    75                         endforeach;
    76                     endif;
    77                 endif;
     67                    while ( have_posts() ) :
     68                        the_post();
     69                        get_template_part( 'content', is_single() ? 'single' : 'index' );
     70                    endwhile;
     71
     72                    the_posts_navigation( array(
     73                        'prev_text' => __( 'Next', 'wporg-themes' ),
     74                        'next_text' => __( 'Previous', 'wporg-themes' ),
     75                    ) );
    7876                ?>
    7977            </div>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/style.css

    r1255 r1274  
    5757.clear:before,
    5858.clear:after,
     59.theme-wrap .theme-about:before,
     60.theme-wrap .theme-about:after,
    5961.main-navigation:before,
    6062.main-navigation:after {
     
    6466
    6567.clear:after,
     68.theme-wrap .theme-about:after,
    6669.main-navigation:after {
    6770    clear: both;
     
    105108    padding: 0;
    106109}
    107 .theme-browser .themes:not(:empty) {
     110body:not(.single) .theme-browser .themes:not(:empty) {
    108111    font-size: 0;
    109112    padding: 0 0 100px;
     
    135138}
    136139
    137 .theme-overlay .theme-about {
     140.theme-wrap .theme-about {
    138141    bottom: 0;
    139142}
     
    258261.single .theme-wrap {
    259262    background: #fff;
    260     box-shadow: 0 1px 20px 5px rgba(0, 0, 0, 0.1);
    261     margin: 3% 0;
     263    border: 1px solid #e5e5e5;
     264    box-shadow: 0 1px 1px rgba(0,0,0,0.04);
     265    margin-bottom: 3%;
    262266    overflow: hidden;
    263267    padding: 2% 4%;
     
    337341    box-shadow: 0 0 0 1px rgba(0,0,0,0.2);
    338342    box-sizing: border-box;
    339     overflow: hidden;
    340343    position: relative;
    341344}
     
    833836}
    834837
     838/* Themes Navigation */
     839.posts-navigation {
     840    font-size: 18px;
     841    overflow: hidden;
     842}
     843
     844.posts-navigation .nav-previous {
     845    float: right;
     846}
     847
     848.posts-navigation .nav-next {
     849    float: left;
     850}
     851
     852.posts-navigation .nav-links a {
     853    padding: 8px 10px;
     854    display: inline-block;
     855}
     856
     857.posts-navigation .nav-previous a:after {
     858    content: '\2192';
     859    margin: 0 -10px 0 5px;
     860}
     861
     862.posts-navigation .nav-next a:before {
     863    content: '\2190';
     864    margin: 0 5px 0 -10px;
     865    vertical-align: middle;
     866}
     867
     868/* Single Theme Footer */
     869.theme-wrap .theme-footer {
     870    border-top: 1px solid #ddd;
     871    clear: both;
     872    margin: 25px -38px -19px;
     873    height: 48px;
     874}
     875
     876.index-link {
     877    display: inline-block;
     878    font-size: 14px;
     879    font-weight: 700;
     880    padding: 13px 15px;
     881}
     882
     883.index-link:before {
     884    content: '\2190';
     885    margin-right: 5px;
     886}
     887
     888.post-navigation {
     889    float: right;
     890    width: 110px;
     891    height: 48px;
     892}
     893
     894.post-navigation .nav-links a {
     895    border: 0;
     896    border-left: 1px solid #ddd;
     897    color: #777;
     898    float: left;
     899    height: 48px;
     900    text-align: center;
     901    -webkit-transition: color .1s ease-in-out, background .1s ease-in-out;
     902    transition: color .1s ease-in-out, background .1s ease-in-out;
     903    vertical-align: top;
     904    width: 54px;
     905}
     906
     907.post-navigation .nav-links a:before {
     908    font: 400 20px/50px dashicons !important;
     909    text-decoration: inherit;
     910    -webkit-font-smoothing: antialiased;
     911}
     912
     913.post-navigation .nav-links a:hover,
     914.post-navigation .nav-links a:focus {
     915    background: #ddd;
     916    border-color: #ccc;
     917    color: #000;
     918}
     919.post-navigation .nav-previous a:before {
     920    content: '\f341';
     921}
     922
     923.post-navigation .nav-next a:before {
     924    content: '\f345';
     925}
     926
    835927/* Theme notices */
    836928.notice,
     
    10041096        width: 100%;
    10051097    }
    1006 }
     1098
     1099    .posts-navigation {
     1100        margin-top: 40px;
     1101    }
     1102}
Note: See TracChangeset for help on using the changeset viewer.