Making WordPress.org


Ignore:
Timestamp:
02/12/2015 07:56:30 PM (10 years ago)
Author:
obenland
Message:

WP.org Themes: First pass at revised modal styles.

Props melchoyce.

See http://make.wordpress.org/meta/2015/01/23/theme-directory-mockups/
Fixes missing forum link for #852,
Fixes #847.

File:
1 edited

Legend:

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

    r1254 r1255  
    44?>
    55<div class="theme-wrap">
    6     <div class="theme-about">
     6    <div class="theme-about hentry">
    77
    88        <?php if ( strtotime( '-2 years' ) > strtotime( $theme->last_updated ) ) : ?>
    9             <div class="theme-notice notice notice-warning">
    10                 <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>
    11             </div><!-- .theme-info -->
     9        <div class="theme-notice notice notice-warning">
     10            <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>
     11        </div><!-- .theme-info -->
    1212        <?php endif; ?>
    1313
    14         <div class="theme-screenshots">
    15             <div class="screenshot"><?php echo esc_url( $theme->screenshot_url . '?w=732&strip=all' ); ?></div>
     14        <div class="theme-head">
     15            <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>
    1617
    1718            <div class="theme-actions">
     
    1920                <a href="<?php echo esc_url( $theme->preview_url ); ?>" class="button button-secondary"><?php _e( 'Preview' ); ?></a>
    2021            </div>
    21         </div><!-- .theme-screenshots -->
     22
     23            <?php if ( ! empty( $theme->parent ) ) : ?>
     24            <div class="theme-notice notice notice-info">
     25                <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>
     26            </div>
     27            <?php endif; ?>
     28        </div><!-- .theme-head -->
    2229
    2330        <div class="theme-info">
    24             <div class="hentry">
    25                 <h3 class="theme-name entry-title"><?php the_title(); ?></h3>
    26                 <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>
     31            <div class="screenshot"><?php echo esc_url( $theme->screenshot_url . '?w=732&strip=all' ); ?></div>
    2732
    28                 <div class="theme-description entry-summary"><?php the_content(); ?></div>
     33            <div class="theme-description entry-summary"><?php the_content(); ?></div>
    2934
    30                 <?php if ( ! empty( $theme->parent ) ) : ?>
    31                 <div class="theme-notice notice notice-info">
    32                     <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>
    33                 </div>
    34                 <?php endif; ?>
    35             </div><!-- .theme-info -->
    36 
    37             <div class="theme-ratings" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
    38                 <meta itemprop="ratingValue" content="<?php echo esc_attr( number_format_i18n( $theme->rating / 20, 1 ) ); ?>"/>
    39                 <meta itemprop="ratingCount" content="<?php echo esc_attr( $theme->num_ratings ); ?>"/>
    40                 <h4><?php _e( 'Ratings', 'wporg-themes' ); ?></h4>
    41 
    42                 <div class="star-holder">
    43                     <div class="star-rating" style="width: <?php echo esc_attr( number_format_i18n( $theme->rating, 1 ) ); ?>%">
    44                         <?php printf( __( '%d stars', 'wporg-themes' ), number_format_i18n( $theme->rating / 20 ) ); ?>
    45                     </div>
    46                 </div>
    47                 <span><?php printf( __( '%s out of 5 stars.', 'wporg-themes' ), number_format_i18n( $theme->rating / 20, 1 ) ); ?></span>
    48 
     35            <div class="theme-tags">
     36                <h4><?php _e( 'Tags:' ); ?></h4>
    4937                <?php
    50                     if ( ! empty( $theme->ratings ) && ! empty( $theme->num_ratings ) ) :
    51                         foreach ( $theme->ratings as $key => $rate_count ) :
     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 );
    5242                ?>
    53                 <div class="counter-container">
    54                     <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 ); ?>">
    55                         <span class="counter-label"><?php printf( __( '%d stars', 'wporg-themes' ), $key ); ?></span>
    56                         <span class="counter-back">
    57                             <span class="counter-bar" style="width: <?php echo 92 * ( $rate_count / $theme->num_ratings ); ?>px;"></span>
    58                         </span>
    59                         <span class="counter-count"><?php echo $rate_count; ?></span>
    60                     </a>
    61                 </div>
    62                 <?php
    63                         endforeach;
    64                     endif;
    65                 ?>
    66             </div><!-- .theme-rating -->
    67 
    68             <div class="theme-devs">
    69                 <h4><?php _e( 'Development', 'wporg-themes' ); ?></h4>
    70                 <h5><?php _e( 'Subscribe', 'wporg-themes' ); ?></h5>
    71                 <ul class="unmarked-list">
    72                     <li>
    73                         <a href="//themes.trac.wordpress.org/log/<?php echo esc_attr( $theme->slug ); ?>?limit=100&mode=stop_on_copy&format=rss">
    74                             <img src="//s.w.org/style/images/feedicon.png" style="vertical-align:text-top;"/>
    75                             <?php _e( 'Development Log', 'wporg' ); ?>
    76                         </a>
    77                     </li>
    78                 </ul>
    79 
    80                 <h5><?php _e( 'Browse the Code', 'wporg-themes' ); ?></h5>
    81                 <ul class="unmarked-list">
    82                     <li><a href="//themes.trac.wordpress.org/log/<?php echo esc_attr( $theme->slug ); ?>/" rel="nofollow"><?php _e( 'Development Log', 'wporg-themes' ); ?></a></li>
    83                     <li><a href="//themes.svn.wordpress.org/<?php echo esc_attr( $theme->slug ); ?>/" rel="nofollow"><?php _e( 'Subversion Repository', 'wporg-themes' ); ?></a></li>
    84                     <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>
    85                 </ul>
    86             </div><!-- .theme-devs -->
     43            </div><!-- .theme-tags -->
    8744
    8845            <div class="theme-downloads">
     
    14299                <p class="total-downloads"><?php printf( __( 'Total downloads: %s' ), '<strong>' . number_format_i18n( $theme->downloaded ) . '</strong>' ); ?></p>
    143100            </div><!-- .theme-downloads -->
     101        </div><!-- .theme-info -->
    144102
    145             <div class="theme-tags">
    146                 <h4><?php _e( 'Tags:' ); ?></h4>
    147                 <?php
    148                     foreach( $theme->tags as &$tag ) :
    149                         $tag = sprintf( '<a href="%1$s">%2$s</a>', esc_url( home_url( "/tag/{$tag}/" ) ), $tag );
    150                     endforeach;
    151                     echo implode( ', ', $theme->tags );
    152                 ?>
    153             </div><!-- .theme-tags -->
    154         </div>
     103        <div class="theme-meta">
     104            <div class="theme-ratings" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
     105                <meta itemprop="ratingValue" content="<?php echo esc_attr( number_format_i18n( $theme->rating / 20, 1 ) ); ?>"/>
     106                <meta itemprop="ratingCount" content="<?php echo esc_attr( $theme->num_ratings ); ?>"/>
     107                <h4><?php _e( 'Ratings', 'wporg-themes' ); ?></h4>
     108
     109                <div class="rating">
     110                    <div class="star-holder">
     111                        <div class="star-rating" style="width: <?php echo esc_attr( number_format_i18n( $theme->rating, 1 ) ); ?>%">
     112                            <?php printf( __( '%d stars', 'wporg-themes' ), number_format_i18n( $theme->rating / 20 ) ); ?>
     113                        </div>
     114                    </div>
     115                    <p class="description"><?php printf( __( '%s out of 5 stars.', 'wporg-themes' ), number_format_i18n( $theme->rating / 20, 1 ) ); ?></p>
     116                </div>
     117
     118                <?php if ( ! empty( $theme->ratings ) && ! empty( $theme->num_ratings ) ) : ?>
     119                <ul>
     120                    <?php foreach ( $theme->ratings as $key => $rate_count ) : ?>
     121                    <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                            <span class="counter-label"><?php printf( __( '%d stars', 'wporg-themes' ), $key ); ?></span>
     124                            <span class="counter-back">
     125                                <span class="counter-bar" style="width: <?php echo 100 * ( $rate_count / $theme->num_ratings ); ?>px;"></span>
     126                            </span>
     127                            <span class="counter-count"><?php echo $rate_count; ?></span>
     128                        </a>
     129                    </li>
     130                    <?php endforeach; ?>
     131                </ul>
     132                <?php endif; ?>
     133            </div><!-- .theme-rating -->
     134
     135            <div class="theme-devs">
     136                <h4><?php _e( 'Development', 'wporg-themes' ); ?></h4>
     137                <h5><?php _e( 'Subscribe', 'wporg-themes' ); ?></h5>
     138                <ul class="unmarked-list">
     139                    <li>
     140                        <a href="//themes.trac.wordpress.org/log/<?php echo esc_attr( $theme->slug ); ?>?limit=100&mode=stop_on_copy&format=rss">
     141                            <img src="//s.w.org/style/images/feedicon.png" />
     142                            <?php _e( 'Development Log', 'wporg' ); ?>
     143                        </a>
     144                    </li>
     145                </ul>
     146
     147                <h5><?php _e( 'Browse the Code', 'wporg-themes' ); ?></h5>
     148                <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>
     152                </ul>
     153            </div><!-- .theme-devs -->
     154        </div><!-- .theme-meta -->
    155155    </div>
    156156</div>
Note: See TracChangeset for help on using the changeset viewer.