Themes: Add a default image for when a theme doesn't have a screenshot. Props matveb. See #25959
git-svn-id: https://develop.svn.wordpress.org/trunk@26462 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
503b0e73c4
commit
e937af37af
@ -508,7 +508,6 @@ body.theme-overlay-open {
|
||||
}
|
||||
/* First screenshot, shown big */
|
||||
.theme-overlay .screenshot {
|
||||
background: #000;
|
||||
border: 1px solid #fff;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
@ -561,6 +560,13 @@ body.theme-overlay-open {
|
||||
.theme-overlay .screenshot.selected img {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
/* No screenshot placeholder */
|
||||
.theme .theme-screenshot.blank,
|
||||
.theme-overlay .screenshot.blank {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAALElEQVQYGWO8d+/efwYkoKioiMRjYGBC4WHhUK6A8T8QIJt8//59ZC493AAAQssKpBK4F5AAAAAASUVORK5CYII=);
|
||||
}
|
||||
|
||||
/*
|
||||
* Theme heading information
|
||||
*/
|
||||
|
@ -211,8 +211,12 @@ if ( ! is_multisite() && current_user_can('edit_themes') && $broken_themes = wp_
|
||||
</div><!-- .wrap -->
|
||||
|
||||
<script id="tmpl-theme" type="text/template">
|
||||
<# if ( data.screenshot[0] ) { #>
|
||||
<div class="theme-screenshot">
|
||||
<img src="{{ data.screenshot[0] }}" alt="" />
|
||||
<# } else { #>
|
||||
<div class="theme-screenshot blank">
|
||||
<# } #>
|
||||
</div>
|
||||
<div class="theme-author"><?php printf( __( 'By %s' ), '{{{ data.author }}}' ); ?></div>
|
||||
<h3 class="theme-name">{{ data.name }}</h3>
|
||||
@ -245,16 +249,16 @@ if ( ! is_multisite() && current_user_can('edit_themes') && $broken_themes = wp_
|
||||
</div>
|
||||
|
||||
<div class="theme-screenshots">
|
||||
<# if ( data.screenshot[0] ) { #>
|
||||
<div class="screenshot first"><img src="{{ data.screenshot[0] }}" alt="" /></div>
|
||||
<#
|
||||
if ( _.size( data.screenshot ) > 1 ) {
|
||||
_.each ( data.screenshot, function( image ) {
|
||||
#>
|
||||
<div class="screenshot thumb"><img src="{{ image }}" alt="" /></div>
|
||||
<#
|
||||
});
|
||||
}
|
||||
#>
|
||||
<# if ( _.size( data.screenshot ) > 1 ) {
|
||||
_.each ( data.screenshot, function( image ) {
|
||||
#><div class="screenshot thumb"><img src="{{ image }}" alt="" /></div><#
|
||||
});
|
||||
} #>
|
||||
<# } else { #>
|
||||
<div class="screenshot first blank"></div>
|
||||
<# } #>
|
||||
</div>
|
||||
|
||||
<div class="theme-info">
|
||||
|
Loading…
Reference in New Issue
Block a user