CSS improvements for the 'Current Theme' section. see #20403.

git-svn-id: http://svn.automattic.com/wordpress/trunk@20445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
koopersmith 2012-04-11 21:19:32 +00:00
parent 1b65e28f8f
commit e1d8dcddef
2 changed files with 60 additions and 22 deletions

View File

@ -4316,7 +4316,31 @@ h3.available-themes {
}
#current-theme {
padding: 0 0 .5em;
margin: 20px 0 10px;
padding: 0 0 20px;
border-bottom: 1px solid #dfdfdf;
overflow: hidden;
}
#current-theme.has-screenshot {
padding-left: 320px;
}
#current-theme h3 {
margin: 0;
font-size: 12px;
font-weight: normal;
color: #999;
}
#current-theme h4 {
margin: 3px 0 16px;
font-size: 20px;
}
#current-theme h4 span {
margin-left: 20px;
font-size: 12px;
font-weight: normal;
}
#current-theme a {
@ -4325,24 +4349,22 @@ h3.available-themes {
#current-theme .theme-description {
margin-top: 5px;
max-width: 600px;
line-height: 1.6em;
}
#current-theme img {
float: left;
width: 300px;
margin-left: -320px;
border-width: 1px;
border-style: solid;
margin-right: 1em;
margin-bottom: 1.5em;
width: 150px;
}
.theme-options span {
text-transform: uppercase;
font-size: 13px;
}
.theme-options a {
font-size: 15px;
.theme-options {
font-size: 14px;
padding-bottom: 10px;
}
.theme-options .load-customize {

View File

@ -95,16 +95,33 @@ if ( ! is_multisite() && current_user_can( 'install_themes' ) ) : ?>
<h2><?php echo esc_html( $title ); ?>
<?php endif; ?>
</h2>
<?php $ct = wp_get_theme(); ?>
<div id="current-theme">
<h3><?php _e( 'Current Theme' ); ?></h3>
<?php if ( $screenshot = $ct->get_screenshot() ) : ?>
<img src="<?php echo esc_url( $screenshot ); ?>" alt="<?php esc_attr_e( 'Current theme preview'); ?>" />
<?php endif; ?>
<h4><?php
/* translators: 1: theme title, 2: theme version, 3: theme author */
printf( __( '%1$s %2$s by %3$s' ), $ct->display('Name'), $ct->display('Version'), $ct->display('Author') ) ; ?></h4>
<p class="theme-description"><?php echo $ct->display('Description'); ?></p>
<?php
$ct = wp_get_theme();
$screenshot = $ct->get_screenshot();
$class = $screenshot ? 'has-screenshot' : '';
?>
<div id="current-theme" class="<?php echo esc_attr( $class ); ?>">
<?php if ( $screenshot ) : ?>
<img src="<?php echo esc_url( $screenshot ); ?>" alt="<?php esc_attr_e( 'Current theme preview' ); ?>" />
<?php endif; ?>
<h3><?php _e('Current Theme'); ?></h3>
<h4>
<?php echo $ct->display('Name'); ?>
</h4>
<div>
<p>
<span><?php printf( __('By %s'), $ct->display('Author') ); ?></span>
|
<span><?php printf( __('Version %s'), $ct->display('Version') ); ?></span>
</p>
<p class="theme-description"><?php echo $ct->display('Description'); ?></p>
<?php theme_update_available( $ct ); ?>
</div>
<div class="theme-options">
<a href="#" class="load-customize hide-if-no-js" data-customize-template="<?php echo esc_attr( $ct->get_template() ); ?>" data-customize-stylesheet="<?php echo esc_attr( $ct->get_stylesheet() ); ?>" title="<?php echo esc_attr( sprintf( __( 'Customize &#8220;%s&#8221;' ), $ct->get('Name') ) ); ?>"><?php _e( 'Customize' )?></a>
<span><?php _e( 'Options:' )?></span>
@ -137,7 +154,6 @@ if ( ! is_multisite() && current_user_can( 'install_themes' ) ) : ?>
}
echo implode ( ' | ', $options );
?></div>
<?php theme_update_available( $ct ); ?>
</div>