Twenty Twelve: change author template markup to use classes instead of IDs, fixes #21937.

git-svn-id: http://core.svn.wordpress.org/trunk@21941 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Lance Willett 2012-09-21 16:39:38 +00:00
parent ba84c90e1b
commit b3f0c192d3
4 changed files with 26 additions and 26 deletions

View File

@ -41,15 +41,15 @@ get_header(); ?>
<?php <?php
// If a user has filled out their description, show a bio on their entries. // If a user has filled out their description, show a bio on their entries.
if ( get_the_author_meta( 'description' ) ) : ?> if ( get_the_author_meta( 'description' ) ) : ?>
<div id="author-info"> <div class="author-info">
<div id="author-avatar"> <div class="author-avatar">
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentytwelve_author_bio_avatar_size', 60 ) ); ?> <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentytwelve_author_bio_avatar_size', 60 ) ); ?>
</div><!-- #author-avatar --> </div><!-- .author-avatar -->
<div id="author-description"> <div class="author-description">
<h2><?php printf( __( 'About %s', 'twentytwelve' ), get_the_author() ); ?></h2> <h2><?php printf( __( 'About %s', 'twentytwelve' ), get_the_author() ); ?></h2>
<p><?php the_author_meta( 'description' ); ?></p> <p><?php the_author_meta( 'description' ); ?></p>
</div><!-- #author-description --> </div><!-- .author-description -->
</div><!-- #author-info --> </div><!-- .author-info -->
<?php endif; ?> <?php endif; ?>
<?php /* Start the Loop */ ?> <?php /* Start the Loop */ ?>

View File

@ -45,20 +45,20 @@
<?php twentytwelve_entry_meta(); ?> <?php twentytwelve_entry_meta(); ?>
<?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?> <?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
<?php if ( is_singular() && get_the_author_meta( 'description' ) && is_multi_author() ) : // If a user has filled out their description and this is a multi-author blog, show a bio on their entries. ?> <?php if ( is_singular() && get_the_author_meta( 'description' ) && is_multi_author() ) : // If a user has filled out their description and this is a multi-author blog, show a bio on their entries. ?>
<div id="author-info"> <div class="author-info">
<div id="author-avatar"> <div class="author-avatar">
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentytwelve_author_bio_avatar_size', 68 ) ); ?> <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentytwelve_author_bio_avatar_size', 68 ) ); ?>
</div><!-- #author-avatar --> </div><!-- .author-avatar -->
<div id="author-description"> <div class="author-description">
<h2><?php printf( __( 'About %s', 'twentytwelve' ), get_the_author() ); ?></h2> <h2><?php printf( __( 'About %s', 'twentytwelve' ), get_the_author() ); ?></h2>
<p><?php the_author_meta( 'description' ); ?></p> <p><?php the_author_meta( 'description' ); ?></p>
<div id="author-link"> <div class="author-link">
<a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author"> <a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
<?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentytwelve' ), get_the_author() ); ?> <?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentytwelve' ), get_the_author() ); ?>
</a> </a>
</div><!-- #author-link --> </div><!-- .author-link -->
</div><!-- #author-description --> </div><!-- .author-description -->
</div><!-- #author-info --> </div><!-- .author-info -->
<?php endif; ?> <?php endif; ?>
</footer><!-- .entry-meta --> </footer><!-- .entry-meta -->
</article><!-- #post --> </article><!-- #post -->

View File

@ -43,10 +43,10 @@ td {
} }
/* Author profiles */ /* Author profiles */
#author-avatar { .author-avatar {
float: right; float: right;
} }
#author-description { .author-description {
float: right; float: right;
margin-right: 15px; margin-right: 15px;
margin-right: 1.071428571rem; margin-right: 1.071428571rem;

View File

@ -324,7 +324,7 @@ video {
.comment-content img, .comment-content img,
.widget img, .widget img,
img.header-image, img.header-image,
#author-avatar img, .author-avatar img,
img.wp-post-image { img.wp-post-image {
/* Add fancy borders to all WordPress-added images but not things like badges and icons and the like */ /* Add fancy borders to all WordPress-added images but not things like badges and icons and the like */
border-radius: 3px; border-radius: 3px;
@ -410,7 +410,7 @@ img.wp-smiley,
margin-bottom: 24px; margin-bottom: 24px;
margin-bottom: 1.714285714rem; margin-bottom: 1.714285714rem;
} }
#author-info { .author-info {
border-top: 1px solid #ededed; border-top: 1px solid #ededed;
margin: 24px 0; margin: 24px 0;
margin: 1.714285714rem 0; margin: 1.714285714rem 0;
@ -418,18 +418,18 @@ img.wp-smiley,
padding-top: 1.714285714rem; padding-top: 1.714285714rem;
overflow: hidden; overflow: hidden;
} }
#author-description p { .author-description p {
color: #777; color: #777;
font-size: 13px; font-size: 13px;
font-size: 0.928571429rem; font-size: 0.928571429rem;
line-height: 1.846153846; line-height: 1.846153846;
} }
.author.archive #author-info { .author.archive .author-info {
border-top: 0; border-top: 0;
margin: 0 0 48px; margin: 0 0 48px;
margin: 0 0 3.428571429rem; margin: 0 0 3.428571429rem;
} }
.author.archive #author-avatar { .author.archive .author-avatar {
margin-top: 0; margin-top: 0;
} }
@ -1340,12 +1340,12 @@ img#wpstats {
/* Minimum width of 600 pixels. */ /* Minimum width of 600 pixels. */
@media screen and (min-width: 600px) { @media screen and (min-width: 600px) {
#author-avatar { .author-avatar {
float: left; float: left;
margin-top: 8px; margin-top: 8px;
margin-top: 0.571428571rem; margin-top: 0.571428571rem;
} }
#author-description { .author-description {
float: right; float: right;
width: 80%; width: 80%;
} }
@ -1541,7 +1541,7 @@ img#wpstats {
} }
.entry-content img, .entry-content img,
.comment-content img, .comment-content img,
#author-avatar img, .author-avatar img,
img.wp-post-image { img.wp-post-image {
border-radius: 0; border-radius: 0;
box-shadow: none; box-shadow: none;
@ -1567,7 +1567,7 @@ img#wpstats {
font-size: 10pt; font-size: 10pt;
text-align: left; text-align: left;
} }
#author-avatar, .author-avatar,
#colophon, #colophon,
#respond, #respond,
.commentlist .comment-edit-link, .commentlist .comment-edit-link,
@ -1615,7 +1615,7 @@ img#wpstats {
color: #444; color: #444;
font-size: 10pt; font-size: 10pt;
} }
#author-description { .author-description {
float: none; float: none;
width: auto; width: auto;
} }