From 97f1f66b2d60d04497cd50fd4e7d853df0bbcaaa Mon Sep 17 00:00:00 2001
From: "Philip M. Hofer (Frumph)"
Date: Thu, 24 Dec 2009 17:20:03 -0800
Subject: [PATCH] .post .post-comic .post-page and .post-blog are the class
wrappers now, .post will always appear unless on is_page()
Signed-off-by: Philip M. Hofer (Frumph)
---
functions/classes.php | 50 +++++++++++++++++++--------------------
functions/displaypost.php | 16 ++++++-------
style.css | 7 +++++-
3 files changed, 38 insertions(+), 35 deletions(-)
diff --git a/functions/classes.php b/functions/classes.php
index c4d70b1..8a2f522 100644
--- a/functions/classes.php
+++ b/functions/classes.php
@@ -99,35 +99,33 @@ function comicpress_post_class($classes = '') {
$classes[] = 'uentry';
/* if a comic category */
- if (in_comic_category()) $classes[] = 'comicpost';
- if (is_page()) $classes[] = 'pagepost';
- if (!in_comic_category() && !is_page()) $classes[] = 'blogpost';
+ if (in_comic_category()) $classes[] = 'post-comic';
+ if (is_page()) $classes[] = 'post-page';
+ if (!in_comic_category() && !is_page()) $classes[] = 'post-blog';
/* Post alt class. */
- if (!is_page()) {
- $classes[] = 'postonpage-' . ++$post_alt;
-
- if ( $post_alt % 2 )
- $classes[] = 'odd';
- else
- $classes[] = 'even';
-
- /* Sticky class (only on home/blog page). */
- if( is_sticky() && is_home() )
- $classes[] = 'sticky';
-
- /* Author class. */
- if ( !is_attachment() )
- $classes[] = 'post-author-' . sanitize_html_class( get_the_author_meta( 'user_nicename' ), get_the_author_meta( 'ID' ) );
-
- /* User-created classes. */
- if ( !empty( $class ) ) :
- if ( !is_array( $class ) )
- $class = preg_split( '#\s+#', $class );
- $classes = array_merge( $classes, $class );
- endif;
- }
+ $classes[] = 'postonpage-' . ++$post_alt;
+
+ if ( $post_alt % 2 )
+ $classes[] = 'odd';
+ else
+ $classes[] = 'even';
+
+ /* Sticky class (only on home/blog page). */
+ if( is_sticky() && is_home() )
+ $classes[] = 'sticky';
+
+ /* Author class. */
+ if ( !is_attachment() )
+ $classes[] = 'post-author-' . sanitize_html_class( get_the_author_meta( 'user_nicename' ), get_the_author_meta( 'ID' ) );
+
+ /* User-created classes. */
+ if ( !empty( $class ) ) :
+ if ( !is_array( $class ) )
+ $class = preg_split( '#\s+#', $class );
+ $classes = array_merge( $classes, $class );
+ endif;
/* Password-protected posts. */
if ( post_password_required() )
diff --git a/functions/displaypost.php b/functions/displaypost.php
index 3b6e29f..eefcd79 100644
--- a/functions/displaypost.php
+++ b/functions/displaypost.php
@@ -141,9 +141,9 @@ function comicpress_display_the_content() {
function comicpress_display_post() {
global $post, $wp_query; ?>
+
+
>
-
-
@@ -169,12 +169,12 @@ function comicpress_display_post() {
'
'.__('Pages:','comicpress').' ', 'after' => '
', 'next_or_number' => 'number')); ?>
-
-
', '
'); } ?>
diff --git a/style.css b/style.css
index 890f953..844cdff 100644
--- a/style.css
+++ b/style.css
@@ -477,10 +477,15 @@ h4, h4 a {
.post {
clear: both;
text-align: left;
+ padding: 2px;
+ margin-bottom: 20px;
+}
+
+.post-content {
+ padding: 3px;
}
.post-foot {
- margin-bottom: 40px;
}
.post-image {