Changeset 1409 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/view-templates/theme-single.php
- Timestamp:
- 03/17/2015 11:37:22 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/view-templates/theme-single.php
r1383 r1409 1 1 <script id="tmpl-theme-single" type="text/template"> 2 <div class="theme-backdrop"></div> 3 <div class="theme-wrap"> 4 <div class="theme-header"> 5 <button class="close dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Close overlay' ); ?></span></button> 2 <div class="theme-navigation"> 3 <button class="close"><?php _e( 'Return to Themes List', 'wporg-themes' ); ?></button> 4 <div class="navigation post-navigation"> 6 5 <button class="left dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Show previous theme' ); ?></span></button> 7 6 <button class="right dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Show next theme' ); ?></span></button> 8 7 </div> 9 8 </div> 9 <div class="theme-wrap"> 10 10 <div class="theme-about hentry" itemscope itemtype="http://schema.org/CreativeWork"> 11 11 <# if ( data.is_outdated ) { #> … … 15 15 <# } #> 16 16 17 <div> 18 <h3 class="theme-name entry-title" itemprop="name">{{{ data.name }}}</h3> 19 <h4 class="theme-author"><?php printf( __( 'by %s' ), '<a href="https://wordpress.org/themes/author/{{ data.author.user_nicename }}/"><span class="author" itemprop="author">{{{ data.author.display_name }}}</span></a>' ); ?></h4> 20 </div> 21 17 22 <div class="theme-head"> 18 <h3 class="theme-name entry-title" itemprop="name">{{{ data.name }}}</h3> 19 <h4 class="theme-author"><?php printf( __( 'By %s' ), '<a href="https://profiles.wordpress.org/{{ data.author.user_nicename }}"><span class="author" itemprop="author">{{{ data.author.display_name }}}</span></a>' ); ?></h4> 20 21 <div class="theme-actions"> 22 <a href="{{{ data.preview_url }}}" class="button button-secondary"><?php _e( 'Preview' ); ?></a> 23 <a href="//downloads.wordpress.org/theme/{{ data.slug }}.{{ data.version }}.zip" class="button button-primary"><?php _e( 'Download' ); ?></a> 23 <div class="theme-actions clear"> 24 <a href="{{{ data.preview_url }}}" class="button button-secondary alignleft"><?php _e( 'Preview' ); ?></a> 25 <a href="//downloads.wordpress.org/theme/{{ data.slug }}.{{ data.version }}.zip" class="button button-primary alignright"><?php _e( 'Download' ); ?></a> 24 26 </div> 25 27 … … 40 42 <div class="theme-info"> 41 43 <# if ( data.screenshot_url ) { #> 42 <div class="screenshot"><img src="{{ data.screenshot_url }}?w= 798&strip=all" alt=""/></div>44 <div class="screenshot"><img src="{{ data.screenshot_url }}?w=571&strip=all" alt=""/></div> 43 45 <# } else { #> 44 46 <div class="screenshot blank"></div> … … 63 65 <div class="theme-meta"> 64 66 <div class="theme-ratings" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"> 65 <meta itemprop="itemReviewed" content="{{ data.name }}" />66 <meta itemprop="ratingValue" content="{{ (data.rating/20).toFixed(1) }}"/>67 67 <meta itemprop="ratingCount" content="{{ data.num_ratings }}"/> 68 68 <h4><?php _e( 'Ratings', 'wporg-themes' ); ?></h4> 69 70 <# if ( data.rating ) { #> 71 <div class="rating rating-{{ Math.round( data.rating / 10 ) * 10 }}"> 72 <span class="one"></span> 73 <span class="two"></span> 74 <span class="three"></span> 75 <span class="four"></span> 76 <span class="five"></span> 77 <p class="description"><?php printf( __( '%s out of 5 stars.', 'wporg-themes' ), '<span itemprop="ratingValue">{{ ( data.rating / 20 ).toFixed( 1 ) }}</span>' ); ?></p> 78 </div> 79 <# } else { #> 69 80 <div class="rating"> 70 <div class="star-holder"> 71 <div class="star-rating" style="width: {{ (data.rating).toFixed(1) }}%"><?php printf( __( '%d stars', 'wporg-themes' ), '{{ Math.round( data.rating ) }}' ); ?></div> 72 </div> 73 <p class="description"><?php printf( __( '%s out of 5 stars.', 'wporg-themes' ), '{{ (data.rating/20).toFixed(1) }}' ); ?></p> 81 <div class="ratings"><?php _e( 'This theme has not been rated yet.', 'wporg-themes' ); ?></div> 74 82 </div> 83 <# } #> 75 84 76 85 <# if ( data.ratings ) { #> 77 86 <ul> 78 87 <li class="counter-container"> 79 <a href="//wordpress.org/support/view/theme-reviews/{{ data.id }}?filter=5" title="<?php printf( __( 'Click to see reviews that provided a rating of %d stars', 'wporg-themes' ), 5); ?>">88 <a href="//wordpress.org/support/view/theme-reviews/{{ data.id }}?filter=5" title="<?php echo esc_attr( sprintf( __( 'Click to see reviews that provided a rating of %d stars', 'wporg-themes' ), 5 ) ); ?>"> 80 89 <span class="counter-label"><?php printf( __( '%d stars', 'wporg-themes' ), 5 ); ?></span> 81 90 <span class="counter-back"> … … 86 95 </li> 87 96 <li class="counter-container"> 88 <a href="//wordpress.org/support/view/theme-reviews/{{ data.id }}?filter=4" title="<?php printf( __( 'Click to see reviews that provided a rating of %d stars', 'wporg-themes' ), 4); ?>">97 <a href="//wordpress.org/support/view/theme-reviews/{{ data.id }}?filter=4" title="<?php echo esc_attr( sprintf( __( 'Click to see reviews that provided a rating of %d stars', 'wporg-themes' ), 4 ) ); ?>"> 89 98 <span class="counter-label"><?php printf( __( '%d stars', 'wporg-themes' ), 4 ); ?></span> 90 99 <span class="counter-back"> … … 95 104 </li> 96 105 <li class="counter-container"> 97 <a href="//wordpress.org/support/view/theme-reviews/{{ data.id }}?filter=3" title="<?php printf( __( 'Click to see reviews that provided a rating of %d stars', 'wporg-themes' ), 3); ?>">106 <a href="//wordpress.org/support/view/theme-reviews/{{ data.id }}?filter=3" title="<?php echo esc_attr( sprintf( __( 'Click to see reviews that provided a rating of %d stars', 'wporg-themes' ), 3 ) ); ?>"> 98 107 <span class="counter-label"><?php printf( __( '%d stars', 'wporg-themes' ), 3 ); ?></span> 99 108 <span class="counter-back"> … … 104 113 </li> 105 114 <li class="counter-container"> 106 <a href="//wordpress.org/support/view/theme-reviews/{{ data.id }}?filter=2" title="<?php printf( __( 'Click to see reviews that provided a rating of %d stars', 'wporg-themes' ), 2); ?>">115 <a href="//wordpress.org/support/view/theme-reviews/{{ data.id }}?filter=2" title="<?php echo esc_attr( sprintf( __( 'Click to see reviews that provided a rating of %d stars', 'wporg-themes' ), 2 ) ); ?>"> 107 116 <span class="counter-label"><?php printf( __( '%d stars', 'wporg-themes' ), 2 ); ?></span> 108 117 <span class="counter-back"> … … 113 122 </li> 114 123 <li class="counter-container"> 115 <a href="//wordpress.org/support/view/theme-reviews/{{ data.id }}?filter=1" title="<?php printf( __( 'Click to see reviews that provided a rating of %d stars', 'wporg-themes' ), 1); ?>">116 <span class="counter-label"><?php printf( __( '%d stars', 'wporg-themes' ), 1); ?></span>124 <a href="//wordpress.org/support/view/theme-reviews/{{ data.id }}?filter=1" title="<?php esc_attr_e( 'Click to see reviews that provided a rating of 1 star', 'wporg-themes' ); ?>"> 125 <span class="counter-label"><?php _e( '1 star', 'wporg-themes' ); ?></span> 117 126 <span class="counter-back"> 118 127 <span class="counter-bar" style="width: {{ 100 * data.ratings[1] / data.num_ratings }}%;"></span>
Note: See TracChangeset
for help on using the changeset viewer.