tempate nav code changes and cleanups

This commit is contained in:
John Bintz 2009-07-16 21:51:52 -04:00
parent ba387cd1c2
commit 90aa7c111a
10 changed files with 304 additions and 262 deletions

View File

@ -120,11 +120,12 @@ $month['12'] = array('month' => 'December', 'days' => '31');
<div class="post-page-head"></div> <div class="post-page-head"></div>
<div class="post-page"> <div class="post-page">
<?php while (have_posts()) { the_post(); ?> <?php while (have_posts()) : the_post() ?>
<h2 class="pagetitle"><span class="archive-year"><?php echo $archive_year ?></span> <?php the_title() ?></h2> <div class="entry">
<h2 class="pagetitle"><span class="archive-year"><?php echo $archive_year; ?></span> <?php the_title() ?></h2>
<div class="entry"><?php the_content() ?></div> <?php the_content(); ?>
<?php } ?> </div>
<?php endwhile; ?>
<div class="archive-yearlist">| <div class="archive-yearlist">|
<?php $years = $wpdb->get_col("SELECT DISTINCT YEAR(post_date) FROM $wpdb->posts WHERE post_status = 'publish' ORDER BY post_date ASC"); <?php $years = $wpdb->get_col("SELECT DISTINCT YEAR(post_date) FROM $wpdb->posts WHERE post_status = 'publish' ORDER BY post_date ASC");

View File

@ -64,11 +64,12 @@ Template Name: Comic Storyline Archive
<div id="content" class="narrowcolumn"> <div id="content" class="narrowcolumn">
<div class="post-page-head"></div> <div class="post-page-head"></div>
<div class="post-page"> <?php while (have_posts()) : the_post() ?>
<h2 class="pagetitle"><?php the_title() ?></h2>
<div class="entry"> <div class="entry">
<?php while (have_posts()) : the_post(); the_content(); endwhile; ?> <h2 class="pagetitle"><?php the_title() ?></h2>
<?php the_content(); ?>
</div> </div>
<?php endwhile; ?>
<ul id="storyline" class="level-0"> <ul id="storyline" class="level-0">
<?php if (get_option('comicpress-enable-storyline-support') == 1) { <?php if (get_option('comicpress-enable-storyline-support') == 1) {
if (($result = get_option("comicpress-storyline-category-order")) !== false) { if (($result = get_option("comicpress-storyline-category-order")) !== false) {

View File

@ -35,6 +35,12 @@
<div class="post-comic-head"></div> <div class="post-comic-head"></div>
<div class="post-comic"> <div class="post-comic">
<div class="comicarchiveframe" style="width:<?php echo $archive_comic_width; ?>px;"> <div class="comicarchiveframe" style="width:<?php echo $archive_comic_width; ?>px;">
<div class="comicdate">
<div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
</div>
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
By <?php the_author(); ?> on <?php the_time('F jS, Y') ?> <?php edit_post_link('[edit this]'); ?> <br />
Posted in: <?php the_category(','); ?>
<a href="<?php the_permalink() ?>"><img src="<?php the_comic_archive() ?>" alt="<?php the_title() ?>" title="Click for full size." width="<?php echo $archive_comic_width ?>" /><br /> <a href="<?php the_permalink() ?>"><img src="<?php the_comic_archive() ?>" alt="<?php the_title() ?>" title="Click for full size." width="<?php echo $archive_comic_width ?>" /><br />
<h3><?php the_title() ?></h3> <h3><?php the_title() ?></h3>
<small><?php the_time('F jS, Y') ?></small></a> <small><?php the_time('F jS, Y') ?></small></a>

View File

@ -1,4 +1,3 @@
<div id="content" class="narrowcolumn">
<div class="comment-wrap"> <div class="comment-wrap">
<?php <?php
@ -16,7 +15,13 @@
<h3 id="comments"><?php comments_number('Discussion&not;', 'Discussion&not;', 'Discussion (%)&not;' );?></h3> <h3 id="comments"><?php comments_number('Discussion&not;', 'Discussion&not;', 'Discussion (%)&not;' );?></h3>
<ol class="commentlist"> <ol class="commentlist">
<?php wp_list_comments(array('avatar_size'=>64)); ?> <?php wp_list_comments(array(
'type' => 'all',
'callback' => 'comicpress_comments_callback',
'end-callback' => 'comicpress_comments_end_callback',
'avatar_size'=>64
)
); ?>
</ol> </ol>
<div class="pagenav"> <div class="pagenav">
<div class="pagenav-right"><?php next_comments_link('Newer Comments &uarr;') ?></div> <div class="pagenav-right"><?php next_comments_link('Newer Comments &uarr;') ?></div>
@ -90,4 +95,3 @@
<?php endif; ?> <?php endif; ?>
</div> </div>
</div>

View File

@ -22,6 +22,7 @@
<link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name') ?> Atom Feed" href="<?php bloginfo('atom_url') ?>" /> <link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name') ?> Atom Feed" href="<?php bloginfo('atom_url') ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url') ?>" /> <link rel="pingback" href="<?php bloginfo('pingback_url') ?>" />
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/scroll.js"></script> <script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/scroll.js"></script>
<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
<?php wp_head() ?> <?php wp_head() ?>
<!--[if lt IE 7]><script type="text/javascript" src="<?php bloginfo('template_directory') ?>/js/ie6submenus.js"></script><![endif]--> <!--[if lt IE 7]><script type="text/javascript" src="<?php bloginfo('template_directory') ?>/js/ie6submenus.js"></script><![endif]-->
</head> </head>

View File

@ -9,6 +9,7 @@
<img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_hovertext() ?>" /> <img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_hovertext() ?>" />
</div> </div>
<div id="comic-foot"></div> <div id="comic-foot"></div>
<?php comic_navigation(); ?>
<?php endwhile; ?> <?php endwhile; ?>
<div id="content" class="narrowcolumn"> <div id="content" class="narrowcolumn">
@ -20,22 +21,23 @@
<div class="nav-first"><a href="<?php echo $first_comic ?>" title="Go to the First Comic">&lsaquo;&lsaquo; First</a></div> <div class="nav-first"><a href="<?php echo $first_comic ?>" title="Go to the First Comic">&lsaquo;&lsaquo; First</a></div>
<div class="nav-previous"><?php global $wp_query; $wp_query->is_single = true; previous_comic_link('%link', '&lsaquo; Previous'); $wp_query->is_single = false ?></div> <div class="nav-previous"><?php global $wp_query; $wp_query->is_single = true; previous_comic_link('%link', '&lsaquo; Previous'); $wp_query->is_single = false ?></div>
</div> </div>
<div class="comicdate">
<?php the_time('F jS, Y') ?>
</div>
<div class="clear"></div> <div class="clear"></div>
<?php if (get_option('comicpress-enable-storyline-support') == 1) { ?> <?php if (get_option('comicpress-enable-storyline-support') == 1) { ?>
<ul class="storyline-cats"><li class="storyline-root"><?php the_category(' &raquo; </li><li>', multiple) ?></li></ul> <ul class="storyline-cats"><li class="storyline-root"><?php the_category(' &raquo; </li><li>', multiple) ?></li></ul>
<?php } ?> <?php } ?>
<h2> <div class="comicdate">
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title() ?>"><?php the_title() ?></a> <div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
</h2> </div>
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
By <?php the_author(); ?> on <?php the_time('F jS, Y'); ?> <?php edit_post_link('Edit Post', ' [ ', ' ] '); ?> <br />
Posted in: <?php the_category(','); ?>
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
<div class="entry"> <div class="entry">
<?php the_content('&darr; Read the rest of this entry...') ?> <?php the_content('&darr; Read the rest of this entry...') ?>
</div> </div>
<?php the_transcript('styled') ?> <?php the_transcript('styled') ?>
<div class="tags"> <div class="tags">
<?php the_tags('&#9492; Tags: ', ', ', ''); edit_post_link('Edit Post', ' [ ', ' ] ') ?> <?php the_tags('&#9492; Tags: ', ', ', ''); ?>
</div> </div>
<div class="comment-link"> <div class="comment-link">
<?php if ('open' == $post->comment_status) { comments_popup_link('&ldquo;Comment&rdquo;', '&ldquo;1 Comment&rdquo;', '&ldquo;% Comments&rdquo;'); } ?> <?php if ('open' == $post->comment_status) { comments_popup_link('&ldquo;Comment&rdquo;', '&ldquo;1 Comment&rdquo;', '&ldquo;% Comments&rdquo;'); } ?>
@ -57,17 +59,18 @@
while ($wp_query->have_posts()) : $wp_query->the_post() ?> while ($wp_query->have_posts()) : $wp_query->the_post() ?>
<div class="post-head"></div> <div class="post-head"></div>
<div class="post" id="post-<?php the_ID() ?>"> <div class="post" id="post-<?php the_ID() ?>">
<h3> <div class="comicdate">
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title() ?>"><?php the_title() ?></a> <div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
</h3>
<div class="postdate">
<?php the_time('F jS, Y') ?>
</div> </div>
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
By <?php the_author(); ?> on <?php the_time('F jS, Y') ?> <?php edit_post_link('Edit Post', ' [ ', ' ] '); ?> <br />
Posted in: <?php the_category(','); ?>
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
<div class="entry"> <div class="entry">
<?php the_content('&darr; Read the rest of this entry...') ?> <?php the_content('&darr; Read the rest of this entry...') ?>
</div> </div>
<div class="tags"> <div class="tags">
<?php the_tags('&#9492; Tags: ', ', ', ''); edit_post_link('Edit Post', ' [ ', ' ] ') ?> <?php the_tags('&#9492; Tags: ', ', ', ''); ?>
</div> </div>
<div class="comment-link"> <div class="comment-link">
<?php if ('open' == $post->comment_status) { comments_popup_link('&ldquo;Comment&rdquo;', '&ldquo;1 Comment&rdquo;', '&ldquo;% Comments&rdquo;'); } ?> <?php if ('open' == $post->comment_status) { comments_popup_link('&ldquo;Comment&rdquo;', '&ldquo;1 Comment&rdquo;', '&ldquo;% Comments&rdquo;'); } ?>

View File

@ -22,10 +22,14 @@
<div class="post-comic-head"></div> <div class="post-comic-head"></div>
<div class="post-comic"> <div class="post-comic">
<div class="comicdate">
<div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
</div>
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
By <?php the_author(); ?> on <?php the_time('F jS, Y') ?> <?php edit_post_link('[edit this]'); ?> <br />
Posted in: <?php the_category(','); ?>
<div class="comicarchiveframe" style="width:<?php echo $archive_comic_width ?>px;"> <div class="comicarchiveframe" style="width:<?php echo $archive_comic_width ?>px;">
<a href="<?php the_permalink() ?>"><img src="<?php the_comic_archive() ?>" alt="<?php the_title() ?>" title="<?php the_transcript() ?>" width="<?php echo $archive_comic_width ?>" /><br /> <a href="<?php the_permalink() ?>"><img src="<?php the_comic_archive() ?>" alt="<?php the_title() ?>" title="<?php the_transcript() ?>" width="<?php echo $archive_comic_width ?>" /><br />
<h3><?php the_title() ?></h3>
<small><?php the_time('F jS, Y') ?></small></a>
</div> </div>
<br class="clear-margins" /> <br class="clear-margins" />
</div> </div>
@ -35,8 +39,12 @@
<div class="post-head"></div> <div class="post-head"></div>
<div class="post"> <div class="post">
<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title() ?>"><?php the_title() ?></a></h3> <div class="comicdate">
<div class="postdate"><?php the_time('F jS, Y') ?></div> <div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
</div>
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
By <?php the_author(); ?> on <?php the_time('F jS, Y') ?> <?php edit_post_link('[edit this]'); ?> <br />
Posted in: <?php the_category(','); ?>
<?php the_excerpt() ?> <?php the_excerpt() ?>
<br class="clear-margins" /> <br class="clear-margins" />
</div> </div>

View File

@ -22,10 +22,14 @@
<div class="post-comic-head"></div> <div class="post-comic-head"></div>
<div class="post-comic"> <div class="post-comic">
<div class="comicdate">
<div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
</div>
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
By <?php the_author(); ?> on <?php the_time('F jS, Y') ?> <?php edit_post_link('[edit this]'); ?> <br />
Posted in: <?php the_category(','); ?>
<div class="comicarchiveframe" style="width:<?php echo $archive_comic_width ?>px;"> <div class="comicarchiveframe" style="width:<?php echo $archive_comic_width ?>px;">
<a href="<?php the_permalink() ?>"><img src="<?php the_comic_archive() ?>" alt="Click for full size." title="Click for full size" width="<?php echo $archive_comic_width ?>" /><br /> <a href="<?php the_permalink() ?>"><img src="<?php the_comic_archive() ?>" alt="Click for full size." title="Click for full size" width="<?php echo $archive_comic_width ?>" /><br />
<h3><?php the_title() ?></h3>
<small><?php the_time('F jS, Y') ?></small></a>
</div> </div>
<br class="clear-margins" /> <br class="clear-margins" />
</div> </div>
@ -35,8 +39,12 @@
<div class="post-head"></div> <div class="post-head"></div>
<div class="post"> <div class="post">
<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title() ?>"><?php the_title() ?></a></h3> <div class="comicdate">
<div class="postdate"><?php the_time('F jS, Y') ?></div> <div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
</div>
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
By <?php the_author(); ?> on <?php the_time('F jS, Y') ?> <?php edit_post_link('[edit this]'); ?> <br />
Posted in: <?php the_category(','); ?>
<?php the_excerpt() ?> <?php the_excerpt() ?>
<br class="clear-margins" /> <br class="clear-margins" />
</div> </div>
@ -44,7 +52,7 @@
<?php } ?> <?php } ?>
<?php endwhile ?> <?php endwhile; ?>
<?php if(function_exists('wp_page_numbers')) { wp_page_numbers(); } else { ?> <?php if(function_exists('wp_page_numbers')) { wp_page_numbers(); } else { ?>
<div class="pagenav"> <div class="pagenav">
@ -65,7 +73,7 @@
</div> </div>
<div class="post-page-foot"></div> <div class="post-page-foot"></div>
<?php endif ?> <?php endif; ?>
</div> </div>

View File

@ -1,6 +1,6 @@
<form method="get" id="searchform" action="<?php bloginfo('url'); ?>/"> <form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
<div> <div>
<input type="text" value="Search Site..." name="s" id="s" onfocus="this.value=(this.value=='Search Site...') ? '' : this.value;" onblur="this.value=(this.value=='') ? 'Search Site...' : this.value;" /> <input type="text" value="Search Site..." name="s" id="s" onfocus="this.value=(this.value=='Search Site...') ? '' : this.value;" onblur="this.value=(this.value=='') ? 'Search Site...' : this.value;" />
<input type="submit" id="searchsubmit" value="&raquo;" /> <button type="submit" class="button">&#9658;</button>
</div> </div>
</form> </form>

View File

@ -6,6 +6,7 @@
<img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_hovertext() ?>" /> <img src="<?php the_comic() ?>" alt="<?php the_title() ?>" title="<?php the_hovertext() ?>" />
</div> </div>
<div id="comic-foot"></div> <div id="comic-foot"></div>
<?php comic_navigation(); ?>
<?php } endwhile; ?> <?php } endwhile; ?>
<div id="content" class="narrowcolumn"> <div id="content" class="narrowcolumn">
@ -15,24 +16,28 @@
<?php if (in_comic_category()) { ?> <?php if (in_comic_category()) { ?>
<div class="post-comic-head"></div> <div class="post-comic-head"></div>
<div class="post-comic" id="post-<?php the_ID() ?>"> <div class="post-comic" id="post-<?php the_ID() ?>">
<div class="comicdate">
<div class="nav"> <div class="nav">
<?php if ( get_permalink() != $first_comic ) { ?><div class="nav-first"><a href="<?php echo $first_comic ?>">&lsaquo;&lsaquo; First</a></div><?php } ?> <?php if ( get_permalink() != $first_comic ) { ?><div class="nav-first"><a href="<?php echo $first_comic ?>">&lsaquo;&lsaquo; First</a></div><?php } ?>
<div class="nav-previous"><?php previous_comic_link('%link', '&lsaquo; Previous') ?></div> <div class="nav-previous"><?php previous_comic_link('%link', '&lsaquo; Previous') ?></div>
<div class="nav-next"><?php next_comic_link('%link', 'Next &rsaquo;') ?></div> <div class="nav-next"><?php next_comic_link('%link', 'Next &rsaquo;') ?></div>
<?php if ( get_permalink() != $last_comic ) { ?><div class="nav-last"><a href="<?php echo $last_comic ?>">Last &rsaquo;&rsaquo;</a></div><?php } ?> <?php if ( get_permalink() != $last_comic ) { ?><div class="nav-last"><a href="<?php echo $last_comic ?>">Last &rsaquo;&rsaquo;</a></div><?php } ?>
</div> </div>
<?php the_time('F jS, Y') ?> <div class="clear"></div>
</div>
<?php if (get_option('comicpress-enable-storyline-support') == 1) { ?> <?php if (get_option('comicpress-enable-storyline-support') == 1) { ?>
<ul class="storyline-cats"><li class="storyline-root"><?php the_category(' &raquo; </li><li>', 'multiple') ?></li></ul> <ul class="storyline-cats"><li class="storyline-root"><?php the_category(' &raquo; </li><li>', 'multiple') ?></li></ul>
<?php } ?> <?php } ?>
<h2><?php the_title() ?></h2> <div class="comicdate">
<div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
</div>
<h2><?php the_title(); ?></h2>
By <?php the_author(); ?> on <?php the_time('F jS, Y') ?> <?php edit_post_link('Edit Post', ' [ ', ' ] ') ?> <br />
Posted in: <?php the_category(','); ?>
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
<div class="entry"> <div class="entry">
<?php the_content() ?> <?php the_content() ?>
<?php the_transcript('styled') ?> <?php the_transcript('styled') ?>
<div class="tags"> <div class="tags">
<?php the_tags('&#9492; Tags: ', ', ', ''); edit_post_link('Edit Post', ' [ ', ' ] ') ?> <?php the_tags('&#9492; Tags: ', ', ', ''); ?>
</div> </div>
<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')) ?> <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')) ?>
</div> </div>
@ -49,13 +54,18 @@
<div class="nav-blog-next"><?php next_post_link('%link','Next &rsaquo;', TRUE) ?></div> <div class="nav-blog-next"><?php next_post_link('%link','Next &rsaquo;', TRUE) ?></div>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
<h2><?php the_title() ?></h2> <div class="comicdate">
<div class="postdate"><?php the_time('F jS, Y') ?></div> <div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
</div>
<h2><?php the_title(); ?></h2>
By <?php the_author(); ?> on <?php the_time('F jS, Y') ?> <?php edit_post_link('Edit Post', ' [ ', ' ] '); ?> <br />
Posted in: <?php the_category(','); ?>
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
<div class="entry"> <div class="entry">
<?php the_content() ?> <?php the_content() ?>
<?php the_transcript('styled') ?> <?php the_transcript('styled') ?>
<div class="tags"> <div class="tags">
<?php the_tags('&#9492; Tags: ', ', ', ''); edit_post_link('Edit Post', ' [ ', ' ] ') ?> <?php the_tags('&#9492; Tags: ', ', ', ''); ?>
</div> </div>
<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')) ?> <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')) ?>
</div> </div>