Permalink
Browse files

CSS

#page width fixed, -2px
added archive comic elements for thumbnail archives
show archive as links now makes comics appear as thumbnails
  • Loading branch information...
1 parent df6a882 commit 5b2ae5ea2dc569d3c1098419f7a21b0cfb2abbaf @Frumph committed Sep 15, 2013
Showing with 69 additions and 29 deletions.
  1. +40 −27 archive.php
  2. +1 −0 readme.txt
  3. +28 −2 style.css
View
@@ -12,40 +12,53 @@
$count = $wp_query->found_posts;
if (empty($count)) $count = 'No';
-// $count = $wp_query->post_count;
-$post = $posts[0]; // Hack. Set $post so that the_date() works
+
$title_string = '';
-if (is_category()) { /* Category */
- $title_string = __('Archive for ','comicpress').single_cat_title('',false);
-} elseif(is_tag()) { /* Tag */
- $title_string = __('Posts Tagged ','comicpress').single_tag_title('',false);
-} elseif (is_day()) {
- $title_string = __('Archive for ','comicpress').get_the_time('F jS, Y');
-} elseif (is_month()) {
- $title_string = __('Archive for ','comicpress').get_the_time('F, Y');
-} elseif (is_year()) {
- $title_string = __('Archive for ','comicpress').get_the_time('Y');
-} elseif (is_author()) {
- $title_string = __('Author Archive ','comicpress').get_the_time('Y');
-} elseif (isset($_GET['paged']) && !empty($_GET['paged'])) {
- $title_string = __('Archives','comicpress');
-} elseif (isset($wp_query->query_vars['taxonomy']) && taxonomy_exists($wp_query->query_vars['taxonomy'])) {
- if (term_exists($wp_query->query_vars['term'])) {
- $title_string = __('Archive for ','comicpress').$wp_query->query_vars['term'];
+
+if ($count > 0) {
+ if (is_category()) { /* Category */
+ $title_string = __('Archive for ','comicpress').single_cat_title('',false);
+ } elseif(is_tag()) { /* Tag */
+ $title_string = __('Posts Tagged ','comicpress').single_tag_title('',false);
+ } elseif (is_day()) {
+ $title_string = __('Archive for ','comicpress').get_the_time('F jS, Y');
+ } elseif (is_month()) {
+ $title_string = __('Archive for ','comicpress').get_the_time('F, Y');
+ } elseif (is_year()) {
+ $title_string = __('Archive for ','comicpress').get_the_time('Y');
+ } elseif (is_author()) {
+ $title_string = __('Author Archive ','comicpress').get_the_time('Y');
+ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) {
+ $title_string = __('Archives','comicpress');
+ } elseif (isset($wp_query->query_vars['taxonomy']) && taxonomy_exists($wp_query->query_vars['taxonomy'])) {
+ if (term_exists($wp_query->query_vars['term'])) {
+ $title_string = __('Archive for ','comicpress').$wp_query->query_vars['term'];
+ } else {
+ $title_string = __('Archive for ','comicpress').$wp_query->query_vars['taxonomy'];
+ }
+ } elseif ($wp_query->query_vars['post_type'] !== 'post') {
+ $title_string = __('Archive for ','comicpress').$wp_query->query_vars['post_type'];
} else {
- $title_string = __('Archive for ','comicpress').$wp_query->query_vars['taxonomy'];
+ $title_string = __('Archive is unable to be found.','comicpress');
}
-} elseif ($post->post_type !== 'post') {
- $title_string = __('Archive for ','comicpress').$post->post_type;
-} else {
- $title_string = __('Archive is unable to be found.','comicpress');
-}
+} else $title_string = __('No Archive Found.','comicpress');
if (have_posts()) { ?>
<h2 class="page-title"><?php echo $title_string; ?></h2>
<div class="archiveresults"><?php printf(_n("%d result.", "%d results.", $count,'comicpress'),$count); ?></div>
<div class="clear"></div>
- <?php
- if (comicpress_themeinfo('display_archive_as_links') || comicpress_is_bbpress()) { ?>
+ <?php if (function_exists('ceo_pluginfo') && (isset($wp_query->query_vars['chapters']) || isset($wp_query->query_vars['characters']) || isset($wp_query->query_vars['locations']) || ($wp_query->query_vars['post_type'] == 'comic')) && (comicpress_themeinfo('display_archive_as_links') && !comicpress_is_bbpress())) { ?>
+ <?php while (have_posts()) : the_post(); ?>
+ <div class="archivecomicthumbwrap">
+ <div class="archivecomicthumbdate"><?php echo get_the_time('M jS, Y'); ?></div>
+ <div class="archivecomicframe">
+ <?php
+ $thumbnail = ceo_display_comic_thumbnail('thumbnail', $post);
+ $thumbnail = (!$thumbnail) ? __('No Thumbnail or Featured Image Found','comicpress') : $thumbnail; ?>
+ <a href="<?php the_permalink() ?>" title="<?php echo the_title(); ?>"><?php echo $thumbnail; ?></a><br />
+ </div>
+ </div>
+ <?php endwhile; ?>
+ <?php } elseif (comicpress_themeinfo('display_archive_as_links') || comicpress_is_bbpress()) { ?>
<div <?php post_class(); ?>>
<div class="post-head"></div>
<div class="entry">
View
@@ -17,6 +17,7 @@ Please read information and faqs on comiceasel.com for more information.
= 4.0.4 =
* CSS: body.wide set properly for when the sidebars get removed!important
* CSS: .header-info padding removal when used as click block
+* CSS: 780px 980px #page instead of 782/982 .. extra 2px was wrong, fixed
= 4.0.3 =
* Correctly attribute the height to auto for images inside posts.
View
@@ -188,12 +188,12 @@ h4, h4 a {
}
#page {
- width: 982px;
+ width: 980px;
margin: 0 auto;
}
body.layout-2cl #page, body.layout-2cr #page{
- width: 782px;
+ width: 780px;
}
/* Header */
@@ -982,6 +982,32 @@ table#wp-calendar td {
background: #800;
}
+/* Archive */
+
+.archivecomicthumbwrap {
+ display: inline-block;
+ float: left;
+ width: 120px;
+ margin: 5px 3px;
+ height: 200px;
+ overflow: hidden;
+}
+
+.archivecomicthumbdate {
+ text-align: center;
+}
+
+.archivecomicframe {
+ text-align: center;
+}
+
+.archivecomicframe img {
+ width: 120px;
+ height: auto;
+ max-height: 200px;
+}
+
+
/* SEARCH */
.s-search {

0 comments on commit 5b2ae5e

Please sign in to comment.