Theme Customizer: Add mini screenshot and description to theme info section. see #19910.

git-svn-id: http://svn.automattic.com/wordpress/trunk@20108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
koopersmith 2012-03-04 02:40:18 +00:00
parent d260a2c5fa
commit 125a02a3c5
2 changed files with 37 additions and 6 deletions

View File

@ -64,24 +64,48 @@ body {
border-color: transparent transparent #ccc transparent;
}
#customize-controls .theme-name {
#customize-info {
margin-top: 45px;
}
#customize-info .customize-section-title:after {
display: none;
}
#customize-info.open .customize-section-title:after {
display: block;
}
#customize-info .customize-section-title .theme-screenshot {
float: right;
width: auto;
height: 53px;
margin: -7px -13px 0 15px;
}
#customize-info.open .customize-section-title .theme-screenshot {
display: none;
}
#customize-info .theme-name {
font-size: 16px;
font-weight: bold;
line-height: 24px;
display: block;
}
#customize-controls .theme-screenshot {
#customize-info .theme-screenshot {
width: 258px;
border: 1px solid #ccc;
}
#customize-controls .submit {
text-align: center;
#customize-info .theme-description {
margin-top: 1em;
color: #777;
line-height: 20px;
}
#customize-info {
padding-top: 55px;
#customize-controls .submit {
text-align: center;
}
#customize-theme-controls {

View File

@ -52,6 +52,9 @@ do_action( 'customize_controls_print_scripts' );
<div id="customize-info" class="customize-section">
<div class="customize-section-title">
<?php if ( $screenshot ) : ?>
<img class="theme-screenshot" src="<?php echo esc_url( $screenshot ); ?>" />
<?php endif; ?>
<strong class="theme-name"><?php echo $theme['Name']; ?></strong>
<span class="theme-by"><?php printf( __( 'By %s' ), $theme['Author'] ); ?></span>
</div>
@ -59,6 +62,10 @@ do_action( 'customize_controls_print_scripts' );
<?php if ( $screenshot ) : ?>
<img class="theme-screenshot" src="<?php echo esc_url( $screenshot ); ?>" />
<?php endif; ?>
<?php if ( $theme->description ): ?>
<div class="theme-description"><?php echo $theme->description; ?></div>
<?php endif; ?>
</div>
</div>