Themes: Add a default image for when a theme doesn't have a screenshot. Props matveb. See #25959

Built from https://develop.svn.wordpress.org/trunk@26462


git-svn-id: http://core.svn.wordpress.org/trunk@26360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dion Hulse 2013-11-29 04:04:11 +00:00
parent 483824f8fb
commit 2c78650fd0
4 changed files with 28 additions and 12 deletions

View File

@ -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
*/

File diff suppressed because one or more lines are too long

View File

@ -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
*/

View File

@ -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">