Twenty Twelve: add support for Status post format. See #21743.

git-svn-id: http://core.svn.wordpress.org/trunk@21726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Lance Willett 2012-09-04 05:00:19 +00:00
parent 3121d4dd6c
commit cc42ab537a
4 changed files with 51 additions and 8 deletions

View File

@ -0,0 +1,21 @@
<?php
/**
* The template for displaying posts in the Status post format
*
* @package WordPress
* @subpackage Twenty_Twelve
* @since Twenty Twelve 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="entry-content">
<div class="avatar"><?php echo get_avatar( get_the_author_meta( 'ID' ), apply_filters( 'twentytwelve_status_avatar', '48' ) ); ?></div>
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?>
</div><!-- .entry-content -->
<footer class="entry-meta">
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php echo get_the_date(); ?></a>
<?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-meta -->
</article><!-- #post -->

View File

@ -58,7 +58,7 @@ function twentytwelve_setup() {
add_theme_support( 'automatic-feed-links' );
// This theme supports a variety of post formats.
add_theme_support( 'post-formats', array( 'aside', 'image', 'link', 'quote' ) );
add_theme_support( 'post-formats', array( 'aside', 'image', 'link', 'quote', 'status' ) );
// This theme uses wp_nav_menu() in one location.
register_nav_menu( 'primary', __( 'Primary Menu', 'twentytwelve' ) );

View File

@ -77,18 +77,14 @@ td {
padding: 6px 0 6px 10px;
}
/* =Aside post styling
-------------------------------------------------------------- */
/* Aside posts */
article.format-aside .aside {
border-right: 22px solid #a8bfe8;
border-left: none;
}
/* =Link post styling
-------------------------------------------------------------- */
/* Link posts */
article.format-link header {
float: left;
}
@ -96,6 +92,20 @@ article.format-link .entry-content {
float: right;
}
/* Status posts */
.format-status .entry-content p {
margin-left: 48px;
margin-left: 3.428571429rem;
margin-right: auto;
}
.format-status div.avatar {
float: left;
margin-left: auto;
margin-right: 14px;
margin-right: 1rem;
}
/* =Comment styling
-------------------------------------------------------------- */

View File

@ -186,7 +186,8 @@ img {
/* Shared Post Format styling */
article.format-quote footer.entry-meta,
article.format-link footer.entry-meta {
article.format-link footer.entry-meta,
article.format-status footer.entry-meta {
font-size: 11px;
font-size: 0.785714286rem;
line-height: 2.181818182;
@ -1015,6 +1016,17 @@ article.format-quote .entry-content blockquote {
background: #efefef;
}
/* Status posts */
.format-status .entry-content p {
margin-right: 48px;
margin-right: 3.428571429rem;
}
.format-status div.avatar {
float: right;
margin-left: 14px;
margin-left: 1rem;
}
/* =Comments
-------------------------------------------------------------- */