Commits

Doug Stewart committed 3adba94

More styling changes, added support for Now Reading (whose default templates wreak havok on Elbee) and removed the Hot Dates with CSS format (it was to garish, IMNSHO).

  • Participants
  • Parent commits 7106781

Comments (0)

Files changed (10)

now-reading/author.php

+<?php get_header() ?>
+
+<div class="content">
+	
+	<div id="content" class="now-reading primary narrowcolumn">
+	
+	<div class="post">
+		
+		<?php if( can_now_reading_admin() ) : ?>
+			
+			<p>Admin: &raquo; <a href="<?php manage_library_url() ?>">Manage Books</a></p>
+			
+		<?php endif; ?>
+		
+		<?php library_search_form() ?>
+		
+		<p><a href="<?php library_url() ?>">&larr; Back to library</a></p>
+		
+		<h2>Books by <?php the_book_author() ?></h2>
+		
+		<?php if( have_books("author={$GLOBALS['nr_author']}") ) : ?>
+			
+			<ul>
+			
+			<?php while( have_books("author={$GLOBALS['nr_author']}") ) : the_book(); ?>
+				
+				<li>
+					<p><a href="<?php book_permalink() ?>"><img src="<?php book_image() ?>" alt="<?php book_title() ?>" /></a></p>
+					<p><?php book_title() ?></p>
+				</li>
+				
+			<?php endwhile; ?>
+			
+			</ul>
+			
+		<?php else : ?>
+			
+			<p>There are no books by this author!</p>
+			
+		<?php endif; ?>
+		
+		<?php do_action('nr_footer'); ?>
+		
+	</div>
+	
+	</div>
+	
+</div>
+
+<?php get_sidebar() ?>
+
+<?php get_footer() ?>

now-reading/library.php

+<?php get_header() ?>
+
+<div class="content">
+	
+	<div id="content" class="now-reading primary narrowcolumn">
+	
+	<div class="post">
+		
+		<?php if( can_now_reading_admin() ) : ?>
+			
+			<p>Admin: &raquo; <a href="<?php manage_library_url() ?>">Manage Books</a></p>
+			
+		<?php endif; ?>
+		
+		<p><?php total_books() ?> overall; <?php books_read_since('1 year') ?> read in the last year; <?php books_read_since('1 month') ?> read in the last month. That's <?php average_books('month'); ?>.</p>
+		
+		<?php library_search_form() ?>
+		
+		<h2>Planned books (<?php echo total_books('unread', 0) ?>):</h2>
+		
+		<?php if( have_books('status=unread&num=-1') ) : ?>
+			
+			<ul>
+			
+			<?php while( have_books('status=unread&num=-1') ) : the_book(); ?>
+				
+				<li><a href="<?php book_permalink() ?>"><?php book_title() ?></a> by <a href="<?php book_author_permalink() ?>"><?php book_author() ?></a></li>
+				
+			<?php endwhile; ?>
+			
+			</ul>
+			
+		<?php else : ?>
+			
+			<p>None</p>
+			
+		<?php endif; ?>
+		
+		<h2>Current books (<?php echo total_books('reading', 0) ?>):</h2>
+		
+		<?php if( have_books('status=reading&num=-1') ) : ?>
+			
+			<ul>
+			
+			<?php while( have_books('status=reading&num=-1') ) : the_book(); ?>
+				
+				<li>
+					<p><a href="<?php book_permalink() ?>"><img src="<?php book_image() ?>" alt="<?php book_title() ?>" /></a></p>
+					<p><a href="<?php book_permalink() ?>"><?php book_title() ?></a> by <a href="<?php book_author_permalink() ?>"><?php book_author() ?></a></p>
+				</li>
+				
+			<?php endwhile; ?>
+			
+			</ul>
+			
+		<?php else : ?>
+			
+			<p>None</p>
+			
+		<?php endif; ?>
+		
+		<h2>Recent books (<?php echo total_books('read', 0) ?>):</h2>
+		
+		<?php if( have_books('status=read&orderby=finished&order=desc&num=-1') ) : ?>
+			
+			<ul>
+			
+			<?php while( have_books('status=read&orderby=finished&order=desc&num=-1') ) : the_book(); ?>
+				
+				<li><a href="<?php book_permalink() ?>"><?php book_title() ?></a> by <a href="<?php book_author_permalink() ?>"><?php book_author() ?></a></li>
+				
+			<?php endwhile; ?>
+			
+			</ul>
+			
+		<?php else : ?>
+			
+			<p>None</p>
+			
+		<?php endif; ?>
+		
+		<?php do_action('nr_footer'); ?>
+		
+	</div>
+	
+	</div>
+	
+</div>
+
+<?php get_sidebar() ?>
+
+<?php get_footer() ?>

now-reading/search.php

+<?php get_header(); ?>
+
+<div class="content">
+	
+	<div id="content" class="narrowcolumn primary now-reading">
+	
+	<div class="post">
+		
+		<?php if( can_now_reading_admin() ) : ?>
+			
+			<p>Admin: &raquo; <a href="<?php manage_library_url() ?>">Manage Books</a></p>
+			
+		<?php endif; ?>
+		
+		<p><a href="<?php library_url() ?>">&larr; Back to library</a></p>
+		
+		<?php library_search_form() ?>
+		
+		<p>Search results for <?php search_query(); ?>:</p>
+		
+		<?php if( have_books("status=all&num=-1&search={$GLOBALS['query']}") ) : ?>
+			
+			<ul>
+			
+			<?php while( have_books("status=all&num=-1&search={$GLOBALS['query']}") ) : the_book(); ?>
+				
+				<li><a href="<?php book_permalink() ?>"><?php book_title() ?></a> by <a href="<?php book_author_permalink() ?>"><?php book_author() ?></a></li>
+				
+			<?php endwhile; ?>
+			
+			</ul>
+			
+		<?php else : ?>
+			
+			<p>Sorry, but there were no search results for your query.</p>
+			
+		<?php endif; ?>
+		
+		<?php do_action('nr_footer'); ?>
+		
+	</div>
+	
+	</div>
+	
+</div>
+
+<?php get_sidebar() ?>
+
+<?php get_footer() ?>

now-reading/sidebar.php

+	<h3>Planned books:</h3>
+	
+	<?php if( have_books('status=unread') ) : ?>
+		
+		<ul>
+		
+		<?php while( have_books('status=unread') ) : the_book(); ?>
+			
+			<li><a href="<?php book_permalink() ?>"><?php book_title() ?></a> by <?php book_author() ?></li>
+			
+		<?php endwhile; ?>
+		
+		</ul>
+		
+	<?php else : ?>
+		
+		<p>None</p>
+		
+	<?php endif; ?>
+	
+	<h3>Current books:</h3>
+	
+	<?php if( have_books('status=reading') ) : ?>
+		
+		<ul>
+		
+		<?php while( have_books('status=reading') ) : the_book(); ?>
+			
+			<li>
+				<p><a href="<?php book_permalink() ?>"><img src="<?php book_image() ?>" alt="<?php book_title() ?>" /></a></p>
+				<p><strong><?php book_title() ?></strong> by <?php book_author() ?></p>
+			</li>
+			
+		<?php endwhile; ?>
+		
+		</ul>
+		
+	<?php else : ?>
+		
+		<p>None</p>
+		
+	<?php endif; ?>
+	
+	<h3>Recent books:</h3>
+	
+	<?php if( have_books('status=read&orderby=finished&order=desc') ) : ?>
+		
+		<ul>
+		
+		<?php while( have_books('status=read&orderby=finished&order=desc') ) : the_book(); ?>
+			
+			<li><a href="<?php book_permalink() ?>"><?php book_title() ?></a> by <?php book_author() ?></li>
+			
+		<?php endwhile; ?>
+		
+		</ul>
+		
+	<?php else : ?>
+		
+		<p>None</p>
+		
+	<?php endif; ?>
+	
+	<p><a href="<?php library_url() ?>">View full Library</a></p>
+	

now-reading/single.php

+<?php get_header(); global $nr_id; ?>
+
+<div class="content">
+	
+	<div id="content" class="narrowcolumn primary now-reading">
+	
+	<div class="post">
+		
+		<?php if( have_books(intval($nr_id)) ) : ?>
+			
+			<?php while ( have_books(intval(nr_id)) ) : the_book(); ?>
+			
+			<?php if( can_now_reading_admin() ) : ?>
+			<p>Admin: &raquo; <a href="<?php manage_library_url() ?>">Manage Books</a> &raquo; <a href="<?php book_edit_url() ?>">Edit this book</a></p>
+			<?php endif; ?>
+			
+			<?php library_search_form() ?>
+			
+			<p><a href="<?php library_url() ?>">&larr; Back to library</a></p>
+			
+			<h2><?php book_title() ?></h2>
+			<p>By <a href="<?php book_author_permalink() ?>"><?php book_author() ?></a></p>
+			
+			<p>
+				<a href="<?php book_url() ?>"><img src="<?php book_image() ?>" alt="<?php book_title() ?>" /></a>
+			</p>
+			
+			<?php if( !is_custom_book() ): ?>
+				<p>You can view this book's Amazon detail page <a href="<?php book_url() ?>">here</a>.</p>
+			<?php endif; ?>
+			
+			<?php if( book_has_post() ): ?>
+				<p>This book is linked with the post <a href="<?php book_post_url() ?>">&ldquo;<?php book_post_title() ?>&rdquo;</a>.</p>
+			<?php endif; ?>
+			
+			<p>Tags: <?php print_book_tags(1) ?></p>
+			
+			<dl>
+				<dt>Started reading:</dt>
+				<dd><?php book_started() ?></dd>
+				
+				<dt>Finished reading:</dt>
+				<dd><?php book_finished() ?></dd>
+				
+				<?php print_book_meta(0); ?>
+			</dl>
+			
+			<div class="review">
+				
+				<h3>Review</h3>
+				
+				<p><strong>Rating:</strong> <?php book_rating() ?></p>
+				
+				<?php book_review() ?>
+				
+			</div>
+			
+			<?php endwhile; ?>
+			
+		<?php else : ?>
+			
+			<p>That book doesn't exist!</p>
+			
+		<?php endif; ?>
+		
+		<?php do_action('nr_footer'); ?>
+		
+	</div>
+	
+	</div>
+
+	
+	<?php get_sidebar(); ?>
+	
+</div>
+
+<?php get_footer(); ?>

now-reading/tag.php

+<?php get_header(); ?>
+
+<div class="content">
+	
+	<div id="content" class="narrowcolumn primary now-reading">
+	
+	<div class="post">
+	
+	<?php if( can_now_reading_admin() ) : ?>
+		
+		<p>Admin: &raquo; <a href="<?php manage_library_url() ?>">Manage Books</a></p>
+		
+	<?php endif; ?>
+	
+	<p><a href="<?php library_url() ?>">&larr; Back to library</a></p>
+	
+	<?php library_search_form() ?>
+	
+	<p>Viewing books tagged with &ldquo;<?php the_tag(); ?>&rdquo;:</p>
+	
+	<?php if( have_books("tag={$GLOBALS['nr_tag']}") ) : ?>
+		
+		<ul>
+		
+		<?php while( have_books("tag={$GLOBALS['nr_tag']}") ) : the_book(); ?>
+			
+			<li><a href="<?php book_permalink() ?>"><?php book_title() ?></a> by <a href="<?php book_author_permalink() ?>"><?php book_author() ?></a></li>
+			
+		<?php endwhile; ?>
+		
+		</ul>
+		
+	<?php else : ?>
+		
+		<p>Sorry, but there were no search results for your query.</p>
+		
+	<?php endif; ?>
+	
+	<?php do_action('nr_footer'); ?>
+	
+	</div>
+		
+	</div>
+	
+</div>
+
+<?php get_sidebar() ?>
+
+<?php get_footer() ?>
 	    		<img src="<?php sparkStats_legendURI(); ?>" alt="SparkStats Legend"/>
 		</li>	
 	<?php }*/ ?>
-	<?php if ( function_exists('deepthoughts') ) { ?>
+	<?php if ( function_exists('deepthoughts') && is_home() ) { ?>
 		<li><h2>Deep Thoughts</h2>
 		<?php deepthoughts(); ?>
 		</li>
+	<?php }
+
+	if ( is_single() ) { ?>
+	<li><h2>Post Info</h2>
+		You are reading "<a href="<?php the_permalink(); ?>"> <?php the_title(); ?></a>". It was posted on <?php the_date('l, F jw, Y','',''); ?> in <?php the_category(', '); ?>.
+	</li>
+	<?php 
+	}
+	if (is_home()) {
+		get_links_list(); 
+	}
+	
+	if (is_single() || is_archive()) {?>
+	<li><h2>Related</h2>
+	<?php related_posts(); ?>
+	</li>
 	<?php } ?>
-	<?php get_links_list(); ?>
 	<?php endif; ?>
 </ul>
 
 <div id="extra">
 <ul>
 	<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Extra') ) : ?>
+	<?php if (function_exists(nr_display)) { ?>
+	<li><h2>Now Reading</h2>
+		<?php nr_display(); ?>
+	</li>
+	<?php } ?>
         <?php if (function_exists(ttlb_ecosystem_details)) { ?>
         <li><h2>TTLB Info</h2>
 		<?php ttlb_ecosystem_details('http://literalbarrage.org/blog'); ?>
 }
 
 #content {
-
+	padding-left: 20px;
 }
 
 #container {
 }
 
 #searchform input {
-	width: 95%;
+	width: 130px;
 }
 
 #navigation ul, #extra ul, #footer ul {
 	background: url('dark/mandolux-twins-800.jpg') top center no-repeat;
 	color: #ca1919;
 }
+
+#footerleft {
+	padding-left: 20px;
+}
+
+#footerright {
+	padding-right: 20px;
+}
 		<?php /* Permalink navigation has to be inside the loop */ if (is_single()) include (TEMPLATEPATH . '/navigation.php'); ?>
 		<div id="post-<?php the_ID(); ?>" class="wppost">
 			<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php echo strip_tags(get_the_title()) ?>"><?php the_title(); ?></a></h3>	
-			<span class="postmeta">Posted by <?php the_author(); ?> | <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?><?php edit_post_link(' | Edit this entry.', '', ''); ?></span>
+			<span class="postmeta">Posted by <?php the_author(); ?> on <?php the_time('F wS, Y'); ?> | <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?><?php edit_post_link(' | Edit this entry.', '', ''); ?></span>
 			<div class="itemtext">
 				<?php 
 					$time = get_the_time('M d Y');
 					list($mo, $da, $ye) = explode(" ", $time);
 				?>
-				<acronym class="published" title="<?php the_time('Y-m-d\TG:i:sO'); ?>">
+				<!--acronym class="published" title="<?php the_time('Y-m-d\TG:i:sO'); ?>">
 					<span class="pub-month"><?php echo($mo); ?></span>
 					<span class="pub-date"><?php echo($da); ?></span>
-					<!--span class="pub-year"><?php echo($ye); ?></span-->
-				</acronym>
+					<span class="pub-year"><?php echo($ye); ?></span>
+				</acronym-->
 					<?php if ( is_archive() or is_search() or (function_exists('is_tag') and is_tag()) ) {
 						the_excerpt();
 					} else {