Skip to content

Commit

Permalink
First pass at the link Post Format. References #4.
Browse files Browse the repository at this point in the history
  • Loading branch information
Drew Strojny committed Mar 28, 2012
1 parent e63f05b commit 433ba5c
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 23 deletions.
30 changes: 30 additions & 0 deletions source/assets/stylesheets/_view_content-link.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* content-link.css.scss
* Link post styling
* ------------------------------------------------------------------ */

article.format-link {
header {
@include rem('padding', 0 10px);
float: right;
@include rem('font-size', 11px);
line-height: ($evbase/11);
font-weight: bold;
font-style: italic;
text-transform: uppercase;
color: lighten($font-color, 25);
background-color: #ebebeb;
@include border-radius();
}
.entry-content {
float: left;
a {
@include rem('font-size', 22px);
line-height: ($evbase/22);
text-decoration: none;
}
}
footer.entry-meta {
@include rem('font-size', 11px);
line-height: ($evbase/11);
}
}
1 change: 1 addition & 0 deletions source/assets/stylesheets/style.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
@import "scaffolding";
@import "view_index";
@import "view_content-image";
@import "view_content-link";
@import "view_comments";
@import "widgets";
@import "view_archive";
26 changes: 3 additions & 23 deletions source/templates/partials/content-link.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,13 @@
?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
<div class="entry-meta">
<?php twentytwelve_posted_by() ?>
</div><!-- .entry-meta -->
</header><!-- .entry-header -->

<?php if ( is_search() ) : // Only display excerpts for search ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
<header><?php _e( 'Link', 'twentytwelve' ); ?></header>
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentytwelve' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php endif; ?>

<footer class="entry-meta">
<?php __( '<span class="sep">Posted on </span>', 'twentytwelve' ); ?> <?php twentytwelve_posted_on(); ?>

<?php if ( comments_open() ) : ?>
<span class="comments-link">
<?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
</span>
<?php endif; ?>

<?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link"><span class="sep"> | </span>', '</span>' ); ?>
<?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<div class="edit-link">', '</div>' ); ?>
<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_date(); ?></a>
</footer><!-- #entry-meta -->
</article><!-- #post -->

0 comments on commit 433ba5c

Please sign in to comment.