Skip to content
Browse files

Author box styling

  • Loading branch information...
1 parent 28549be commit ba061135e5d01d43a1da4cb371895d51398d1dd0 @jayj committed Oct 13, 2012
Showing with 47 additions and 46 deletions.
  1. +8 −8 functions.php
  2. +1 −0 less/media.less
  3. +0 −4 less/post-formats.less
  4. +22 −15 style.dev.css
  5. +16 −19 style.dev.less
View
16 functions.php
@@ -702,21 +702,21 @@ function cakifo_author_box() { ?>
<?php do_atomic( 'open_author_box' ); // cakifo_open_author_box ?>
- <h4 class="author-name fn n"><?php echo do_shortcode( __( 'Article written by [entry-author]', 'cakifo' ) ); ?></h4>
+ <h4 class="author-name fn n">
+ <?php echo do_shortcode( __( 'Article written by [entry-author]', 'cakifo' ) ); ?>
+ </h4>
- <?php echo get_avatar( get_the_author_meta( 'user_email' ), '48' ); ?>
+ <?php echo get_avatar( get_the_author_meta( 'user_email' ), 96 ); ?>
<div class="author-description author-bio">
- <?php the_author_meta( 'description' ); ?>
+ <?php echo wpautop( get_the_author_meta( 'description' ) ); ?>
</div>
- <?php if ( get_the_author_meta( 'twitter' ) ) { ?>
+ <?php if ( $twitter = get_the_author_meta( 'twitter' ) ) { ?>
<p class="twitter-link">
- <a href="http://twitter.com/<?php the_author_meta( 'twitter' ); ?>" title="<?php printf( esc_attr__( 'Follow %1$s on Twitter', 'cakifo' ), get_the_author_meta( 'display_name' ) ); ?>">
- <?php printf( __( 'Follow %1$s on Twitter', 'cakifo' ), get_the_author_meta( 'display_name' ) ); ?>
- </a>
+ <a href="<?php echo esc_url( "http://twitter.com/{$twitter}" ); ?>" title="<?php printf( esc_attr__( 'Follow %s on Twitter', 'cakifo' ), get_the_author_meta( 'display_name' ) ); ?>"><?php printf( __( 'Follow %s on Twitter', 'cakifo' ), get_the_author_meta( 'display_name' ) ); ?></a>
</p>
- <?php } // End check for twitter ?>
+ <?php } // Twitter ?>
<?php do_atomic( 'close_author_box' ); // cakifo_close_author_box ?>
View
1 less/media.less
@@ -71,6 +71,7 @@ img.alignright {
/* Avatars */
.avatar {
float: left;
+ margin-right: @smallGutterWidth - 7px;
}
/* Remove borders from some images */
View
4 less/post-formats.less
@@ -95,10 +95,6 @@
color: @gray;
&:hover { color: @linkColorHover; }
}
-
- .avatar {
- margin-right: 18px;
- }
}
/* Format: Quote */
View
37 style.dev.css
@@ -441,6 +441,7 @@ img.alignright {
/* Avatars */
.avatar {
float: left;
+ margin-right: 18px;
}
/* Remove borders from some images */
.wp-smiley,
@@ -1553,9 +1554,6 @@ table caption {
.format-status .entry-header a:hover {
color: #d54e21;
}
-.format-status .entry-header .avatar {
- margin-right: 18px;
-}
/* Format: Quote */
.format-quote .entry-meta {
position: relative;
@@ -1610,26 +1608,35 @@ table caption {
Components: Author box
========================================================================== */
.author-profile {
- /* The other styles are other 'Quotes' */
-
- padding: 25px 20px;
+ background: #f5f8f9 url(images/quote.png);
+ box-shadow: inset 0 0 20px #e8f0f4, 0 1px 1px #dde5e8, 0 0 3px rgba(0, 0, 0, 0.05);
+ border: 1px solid #dde5e8;
+ border-top: none;
+ border-radius: 5px;
+ color: #56717d;
+ text-shadow: 0 1px 0 #ffffff;
+ font-family: 'PT Serif', Georgia, Cambria, "Bitstream Charter", serif;
+ font-size: 16px;
+ font-weight: normal;
+ line-height: 32px;
+ margin: 25px auto;
+ padding: 25px;
+ position: relative;
+ box-shadow: inset 0 0 20px #e8f0f4;
}
.author-profile .author-name {
font-size: 18px;
- margin: 0 0 15px 0;
-}
-.author-profile .avatar {
- padding: 4px;
-}
-.twitter-link a {
- background: url(images/twitter.png) no-repeat left bottom;
- font: italic 14px Georgia, serif;
- padding-left: 25px;
+ margin-top: 0;
}
.author-profile .twitter-link {
text-align: right;
margin-bottom: 0;
}
+.author-profile .twitter-link a {
+ background: url(images/twitter.png) no-repeat left bottom;
+ font-size: 14px;
+ padding-left: 23px;
+}
/* =============================================================================
Components: Loop meta
========================================================================== */
View
35 style.dev.less
@@ -550,29 +550,26 @@ sub {
/* =============================================================================
Components: Author box
========================================================================== */
-.author-profile {
- /* The other styles are other 'Quotes' */
- padding: 25px 20px;
-}
-.author-profile .author-name {
- font-size: 18px;
- margin: 0 0 15px 0;
-}
+.author-profile {
+ .blue-box(@smallGutterWidth);
+ box-shadow: inset 0 0 20px #e8f0f4;
-.author-profile .avatar {
- padding: 4px;
-}
+ .author-name {
+ font-size: 18px;
+ margin-top: 0;
+ }
-.twitter-link a {
- background: url(images/twitter.png) no-repeat left bottom;
- font: italic 14px Georgia, serif;
- padding-left: 25px;
-}
+ .twitter-link {
+ text-align: right;
+ margin-bottom: 0;
-.author-profile .twitter-link {
- text-align: right;
- margin-bottom: 0;
+ a {
+ background: url(images/twitter.png) no-repeat left bottom;
+ font-size: 14px;
+ padding-left: (@smallGutterWidth - 2px);
+ }
+ }
}
/* =============================================================================

0 comments on commit ba06113

Please sign in to comment.
Something went wrong with that request. Please try again.