Permalink
Browse files

Post format: Aside

The title is no longer hidden with CSS. It's showed on singular views
but removed otherwise.
  • Loading branch information...
1 parent 5575303 commit f5cfc80e64665ed40cf1960d25e6276654ad12df @jayj committed Sep 29, 2012
Showing with 74 additions and 30 deletions.
  1. +2 −2 functions.php
  2. +0 −10 functions/post-formats.php
  3. +8 −10 less/post-formats.less
  4. +57 −0 loop-aside.php
  5. +7 −8 style.dev.css
View
@@ -146,11 +146,11 @@ function cakifo_theme_setup() {
add_action( 'wp_footer', 'cakifo_slider_javascript', 100 );
/* Change entry meta for certain post formats */
- add_filter( "{$prefix}_entry_meta_aside", 'cakifo_aside_entry_meta' );
+ //add_filter( "{$prefix}_entry_meta_aside", 'cakifo_aside_entry_meta' );
add_filter( "{$prefix}_entry_meta_link", 'cakifo_link_entry_meta' );
/* Hide byline and/or entry meta for certain post formats */
- add_filter( "{$prefix}_byline_aside", '__return_false' );
+ //add_filter( "{$prefix}_byline_aside", '__return_false' );
add_filter( "{$prefix}_byline_link", '__return_false' );
/* Excerpt read more link */
View
@@ -19,16 +19,6 @@
/* Auto-add paragraphs to the chat text. */
add_filter( 'post_format_chat_text', 'wpautop' );
-/**
- * Change entry meta for the Aside post format.
- *
- * @param string $meta The normal entry meta
- * @return string The changed entry meta
- * @since Cakifo 1.1
- */
-function cakifo_aside_entry_meta( $meta ) {
- return do_shortcode( '<footer class="entry-meta">' . __( '[entry-permalink after=" | "] By [entry-author] on [entry-published] [entry-terms taxonomy="category" before="in "] [entry-terms before="| Tagged "] [entry-comments-link before=" | "] [entry-edit-link before=" | "]', 'cakifo' ) . '</footer>' );
-}
/**
* Change entry meta for the Link post format.
View
@@ -15,19 +15,17 @@
right: 0;
}
-/* Format: aside */
+/* Format: Aside */
.format-aside {
- border-top: 5px solid #eee;
+ border-top: 5px solid @grayLighter;
margin-top: -26px;
- padding-top: 25px;
-}
-
-.format-aside .entry-format {
- top: 10px;
-}
+ padding-top: 10px;
-.format-aside .entry-header hgroup {
- padding-top: 15px;
+ .singular & {
+ border-top-width: 0;
+ margin-top: 0;
+ padding-top: 0;
+ }
}
/* Format: chat */
View
@@ -0,0 +1,57 @@
+<?php
+/**
+ * Aside Content Template
+ *
+ * Template used to show posts with the 'aside' post format.
+ *
+ * This can be overridden in child themes with loop-aside.php
+ *
+ * @package Cakifo
+ * @subpackage Template
+ * @since Cakifo 1.5
+ */
+
+do_atomic( 'before_entry' ); //cakifo_before_entry ?>
+
+<article id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); ?>">
+
+ <?php do_atomic( 'open_entry' ); //cakifo_open_entry ?>
+
+ <?php if ( is_singular() && is_main_query() ) : ?>
+
+ <header class="entry-header">
+ <?php echo apply_atomic_shortcode( 'entry_title', '[entry-title permalink=""]' ); ?>
+ <?php echo apply_atomic_shortcode( 'post_format_link', '[post-format-link]' ); ?>
+ <?php echo apply_atomic_shortcode( 'byline_aside', '<div class="byline">' . __( 'Published on [entry-published] by [entry-author] [entry-edit-link before=" | "]', 'cakifo' ) . '</footer>' ); ?>
+ </header> <!-- .entry-header -->
+
+ <div class="entry-content">
+ <?php the_content(); ?>
+ <?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'cakifo' ), 'after' => '</p>' ) ); ?>
+ </div> <!-- .entry-content -->
+
+ <?php
+ echo apply_atomic_shortcode( 'entry_meta_aside',
+ '<footer class="entry-meta">' . __(
+ '[entry-terms taxonomy="category" before="Posted in "]
+ [entry-terms before="| Tagged "]', 'cakifo' ) .
+ '</footer> <!-- .entry-meta -->'
+ );
+ ?>
+
+ <?php do_atomic( 'in_singular' ); // cakifo_in_singular (+ cakifo_after_singular) ?>
+
+ <?php else : ?>
+
+ <div class="entry-content">
+ <?php the_content( __( 'Continue reading <span class="meta-nav">&raquo;</span>', 'cakifo' ) ); ?>
+ <?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'cakifo' ), 'after' => '</p>' ) ); ?>
+ </div> <!-- .entry-content -->
+
+ <?php echo apply_atomic_shortcode( 'byline_aside', '<footer class="entry-meta">' . __( '[post-format-link] published on [entry-published] [entry-permalink before="| "] [entry-comments-link before="| "] [entry-edit-link before=" | "]', 'cakifo' ) . '</footer>' ); ?>
+
+ <?php endif; ?>
+
+</article> <!-- #post-<?php the_ID(); ?> -->
+
+<?php do_atomic( 'after_entry' ); //cakifo_after_entry ?>
View
@@ -1483,17 +1483,16 @@ html[xmlns] .slides-container {
top: 5px;
right: 0;
}
-/* Format: aside */
+/* Format: Aside */
.format-aside {
- border-top: 5px solid #eee;
+ border-top: 5px solid #eeeeee;
margin-top: -26px;
- padding-top: 25px;
+ padding-top: 10px;
}
-.format-aside .entry-format {
- top: 10px;
-}
-.format-aside .entry-header hgroup {
- padding-top: 15px;
+.singular .format-aside {
+ border-top-width: 0;
+ margin-top: 0;
+ padding-top: 0;
}
/* Format: chat */
.chat-transcript {

0 comments on commit f5cfc80

Please sign in to comment.