WordPress.org

Make WordPress Core

Changeset 20445


Ignore:
Timestamp:
04/11/2012 09:19:32 PM (10 years ago)
Author:
koopersmith
Message:

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

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/css/wp-admin.dev.css

    r20430 r20445  
    43174317
    43184318#current-theme {
    4319     padding: 0 0 .5em;
     4319    margin: 20px 0 10px;
     4320    padding: 0 0 20px;
     4321    border-bottom: 1px solid #dfdfdf;
     4322    overflow: hidden;
     4323}
     4324
     4325#current-theme.has-screenshot {
     4326    padding-left: 320px;
     4327}
     4328
     4329#current-theme h3 {
     4330    margin: 0;
     4331    font-size: 12px;
     4332    font-weight: normal;
     4333    color: #999;
     4334}
     4335
     4336#current-theme h4 {
     4337    margin: 3px 0 16px;
     4338    font-size: 20px;
     4339}
     4340#current-theme h4 span {
     4341    margin-left: 20px;
     4342    font-size: 12px;
     4343    font-weight: normal;
    43204344}
    43214345
     
    43264350#current-theme .theme-description {
    43274351    margin-top: 5px;
     4352    max-width: 600px;
     4353    line-height: 1.6em;
    43284354}
    43294355
    43304356#current-theme img {
    43314357    float: left;
     4358    width: 300px;
     4359    margin-left: -320px;
     4360
    43324361    border-width: 1px;
    43334362    border-style: solid;
    4334     margin-right: 1em;
    4335     margin-bottom: 1.5em;
    4336     width: 150px;
    4337 }
    4338 
    4339 .theme-options span {
    4340     text-transform: uppercase;
    4341     font-size: 13px;
    4342 }
    4343 
    4344 .theme-options a {
    4345     font-size: 15px;
     4363}
     4364
     4365.theme-options {
     4366    font-size: 14px;
     4367    padding-bottom: 10px;
    43464368}
    43474369
  • trunk/wp-admin/themes.php

    r20419 r20445  
    9696<?php endif; ?>
    9797</h2>
    98 <?php $ct = wp_get_theme(); ?>
    99 <div id="current-theme">
    100 <h3><?php _e( 'Current Theme' ); ?></h3>
    101 <?php if ( $screenshot = $ct->get_screenshot() ) : ?>
    102 <img src="<?php echo esc_url( $screenshot ); ?>" alt="<?php esc_attr_e( 'Current theme preview'); ?>" />
    103 <?php endif; ?>
    104 <h4><?php
    105     /* translators: 1: theme title, 2: theme version, 3: theme author */
    106     printf( __( '%1$s %2$s by %3$s' ), $ct->display('Name'), $ct->display('Version'), $ct->display('Author') ) ; ?></h4>
    107 <p class="theme-description"><?php echo $ct->display('Description'); ?></p>
     98<?php
     99
     100$ct = wp_get_theme();
     101$screenshot = $ct->get_screenshot();
     102$class = $screenshot ? 'has-screenshot' : '';
     103
     104?>
     105<div id="current-theme" class="<?php echo esc_attr( $class ); ?>">
     106    <?php if ( $screenshot ) : ?>
     107        <img src="<?php echo esc_url( $screenshot ); ?>" alt="<?php esc_attr_e( 'Current theme preview' ); ?>" />
     108    <?php endif; ?>
     109
     110    <h3><?php _e('Current Theme'); ?></h3>
     111    <h4>
     112        <?php echo $ct->display('Name'); ?>
     113    </h4>
     114
     115    <div>
     116        <p>
     117            <span><?php printf( __('By %s'), $ct->display('Author') ); ?></span>
     118            |
     119            <span><?php printf( __('Version %s'), $ct->display('Version') ); ?></span>
     120        </p>
     121        <p class="theme-description"><?php echo $ct->display('Description'); ?></p>
     122        <?php theme_update_available( $ct ); ?>
     123    </div>
     124
    108125<div class="theme-options">
    109126    <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>
     
    138155    echo implode ( ' | ', $options );
    139156?></div>
    140 <?php theme_update_available( $ct ); ?>
    141157
    142158</div>
Note: See TracChangeset for help on using the changeset viewer.