Styling: alerts, updates, top dashboard.

git-svn-id: http://svn.automattic.com/wordpress/trunk@6484 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
matt 2007-12-24 07:14:41 +00:00
parent efcd1eb5c5
commit 54b7d8f9c5
2 changed files with 74 additions and 61 deletions

View File

@ -28,7 +28,7 @@ $today = current_time('mysql', 1);
<h2><?php _e('Dashboard'); ?></h2>
<div id="rightnow">
<h3><?php _e('Right Now'); ?> <a href="post-new.php"><?php _e('Write a New Post'); ?></a> <a href="page-new.php"><?php _e('Write a New Page'); ?></a></h3>
<h3 class="reallynow"><?php _e('Right Now'); ?> <a href="post-new.php" class="rbutton"><?php _e('Write a New Post'); ?></a> <a href="page-new.php" class="rbutton"><?php _e('Write a New Page'); ?></a></h3>
<?php
$num_posts = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish'" );
@ -69,14 +69,14 @@ $post_type_text = implode(', ', $post_type_texts);
$sentence = sprintf( __( 'You have %1$s, contained within %2$s and %3$s.' ), $post_type_text, $cats_text, $tags_text );
?>
<p><?php echo $sentence; ?></p>
<p class="youhave"><?php echo $sentence; ?></p>
<?php
$ct = current_theme_info();
$sidebars_widgets = wp_get_sidebars_widgets();
$num_widgets = array_reduce( $sidebars_widgets, create_function( '$prev, $curr', 'return $prev+count($curr);' ) );
$widgets_text = sprintf( __ngettext( '%d widget', '%d widgets', $num_widgets ), $num_widgets );
?>
<p><?php printf( __( 'You are using %1$s theme with %2$s.' ), $ct->title, $widgets_text ); ?> <a href="themes.php"><?php _e('Change Theme'); ?></a>. You're using BetaPress TODO.</p>
<p><?php printf( __( 'You are using %1$s theme with %2$s.' ), $ct->title, "<a href='widgets.php'>$widgets_text</a>" ); ?> <a href="themes.php" class="rbutton"><?php _e('Change Theme'); ?></a> You're using BetaPress TODO.</p>
<p>
<?php do_action( 'rightnow_end' ); ?>
<?php do_action( 'activity_box_end' ); ?>

View File

@ -16,58 +16,10 @@ a.delete:hover {
color: #fff;
}
#devnews h4 {
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 18px;
font-weight: normal;
}
#planetnews ul {
list-style: none;
margin: 0;
padding: 0;
}
#planetnews li {
width: 17%;
margin: 1%;
float: left;
}
#planetnews li a {
display: block;
padding: .5em;
background: #ddd;
height: 6em;
overflow: hidden;
}
#planetnews cite {
font-size: 11px;
}
#planetnews li .post {
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 18px;
display: block;
height: 60px;
overflow: hidden;
}
#planetnews .hidden {
display: none;
}
.readmore {
clear: both;
text-align: right;
margin-right: 5em;
}
.wrap {
margin: 0;
padding: 0;
margin-left: 10px;
margin-left: 15px;
margin-right: 25%;
}
@ -76,8 +28,9 @@ a.delete:hover {
color: #666;
border-bottom: 1px solid #dadada;
padding: 0;
margin: 0;
padding-bottom: 10px;
margin: 0 0 0 -5px;
padding-bottom: 5px;
clear: both;
}
.widefat {
@ -381,18 +334,30 @@ form#upload #post_content {
display: none;
}
.updated, .confirm {
background: #CFEBF7 url(images/notice.gif) no-repeat 1em;
border: 1px solid #2580B2;
margin: 1em 5% 10px;
padding: 0 1em 0 3em;
.updated, .error {
margin-left: 15px;
padding: 0 15px;
margin-bottom: 20px;
margin-right: 25%;
}
.updated a, .error a {
text-decoration: underline;
}
.updated {
background: #ddedfa;
border: 1px solid #c6d9e9;
}
.updated a {
color: #448abd;
font-weight: bold;
}
.error {
background: #FFEFF7;
border: 1px solid #c69;
margin: 1em 5% 10px;
padding: 0 1em 0 1em;
}
.narrow {
@ -1382,4 +1347,52 @@ a.view-comment-post-link {
.niceblue tr {
background: #eaf3fa;
}
/* Dashboard stuff, possibly to go in separate file? */
#rightnow {
border: 1px solid #ccc;
padding: 2px;
margin-top: 10px;
}
#rightnow .reallynow {
background: #d54e21;
padding: 12px;
color: #fff;
font-size: 15px;
margin: 0;
}
#rightnow .rbutton {
background: #ebebeb;
-moz-border-radius: 5px;
padding: 6px;
font-weight: normal;
color: #264761;
border-bottom: none;
}
#rightnow .reallynow a {
float: right;
margin-left: 5px;
font-size: 14px;
margin-top: -24px;
}
#rightnow .youhave {
background: #f0f6fb;
font-size: 14px;
padding: 10px;
}
#rightnow p {
padding: 0 10px;
}
#rightnow a {
color: #448abd;
font-weight: bold;
border-bottom: 1px solid #448abd;
}