Permalink
Browse files

refactored sidebars

  • Loading branch information...
1 parent 4380fd3 commit 98b3554a187a77dddda803ee311ea4cf133ec8f1 Justin Louie committed Dec 14, 2012
@@ -13,63 +13,35 @@
<section id="primary" class="content-area">
<div id="content" class="site-content" role="main">
- <?php if ( have_posts() ) : ?>
<header class="page-header">
- <h1 class="page-title">Sermons</h1>
+ <h1 class="page-title">Sermons @ SCAC</h1>
- <!-- This draws out the sermon series topics. -->
- <?php if ( 'ct_sermon' == get_post_type() ) : ?>
- <div clas="right-sermons-nav" style="float: right;">
- <?php
+ </header><!-- .page-header -->
+
+ <div class="sermon-series-listings-container">
+
+ <table class="sermon-series-listings">
+ <tr>
+ <?php
+ if ( 'ct_sermon' == get_post_type() ) :
$taxonomy = 'sermon_series';
$terms = get_terms($taxonomy);
- foreach ($terms as $term) {
- $term_slug = $term->slug;
+ foreach ($terms as $k => $term) {
$current_series = get_the_term_list('', 'sermon_series');
- echo '<a href="'.get_home_url().'/series/'.$term->slug.'">'.$term->name.'</a><br />';
+ ?>
+ <td><a href="<?php get_term_link($term); ?>"><?php echo $term->name; ?></a></td>
+ <?php
+ if(($k+1)%3 == 0)
+ echo "</tr><tr>"; //make a new row every 3rd sermon
}
+ endif;
?>
- </div>
- <?php endif; ?>
-
- <?php
- if ( is_category() ) {
- // show an optional category description
- $category_description = category_description();
- if ( ! empty( $category_description ) )
- echo apply_filters( 'category_archive_meta', '<div class="taxonomy-description">' . $category_description . '</div>' );
-
- } elseif ( is_tag() ) {
- // show an optional tag description
- $tag_description = tag_description();
- if ( ! empty( $tag_description ) )
- echo apply_filters( 'tag_archive_meta', '<div class="taxonomy-description">' . $tag_description . '</div>' );
- }
- ?>
- </header><!-- .page-header -->
-
- <?php /* Start the Loop */ ?>
- <?php while ( have_posts() ) : the_post(); ?>
-
- <?php
- /* Include the Post-Format-specific template for the content.
- * If you want to overload this in a child theme then include a file
- * called content-___.php (where ___ is the Post Format name) and that will be used instead.
- */
- get_template_part( 'content', get_post_format() );
- ?>
-
- <?php endwhile; ?>
-
- <?php else : ?>
-
- <?php get_template_part( 'no-results', 'archive' ); ?>
-
- <?php endif; ?>
-
+ </tr>
+ </table>
+ </div>
</div><!-- #content .site-content -->
</section><!-- #primary .content-area -->
-<?php //get_sidebar(); ?>
+<?php get_sidebar('sermons'); ?>
<?php get_footer(); ?>
@@ -76,4 +76,4 @@
</header><!-- #masthead .site-header -->
- <div id="main" class="site-main">
+ <div id="main" class="site-main clearfix">
@@ -34,24 +34,9 @@
<?php endif; ?>
</div>
- <div class="col-right">
- <div class="sidebar sidebar-church">
- <h3 class="sidebar-title">Church</h3>
- <ul class="sidebar-page-listing">
- <?php
- $page = get_page_by_title('church');
- wp_list_pages(array(
- 'title_li' => '',
- 'child_of' => $page->ID,
- 'link_before' => '<span class="active-box"></span>'
- ));
- ?>
- </ul>
- </div>
- </div>
</div>
</div><!-- #content .site-content -->
</div><!-- #primary .content-area -->
-
+<?php get_sidebar('church'); ?>
<?php get_footer(); ?>
@@ -3,9 +3,11 @@
Template Name: Page - Visit
*/
+/******* This page does nto use #primary ***********/
+
get_header(); ?>
- <div id="primary" class="content-area">
+ <div id="page-visit" class="content-area">
<div id="content" class="page site-content clearfix" role="main">
<!-- Place holder img !-->
@@ -7,14 +7,6 @@
.page-church
width: 100%
-
- .col-left
- width: 75%
- float: left
- .col-right
- width: 25%
- float: left
-
.leadership-pic
padding-right: 10px
vertical-align: top
@@ -24,36 +16,4 @@
h2
font-size: 16px
- font-weight: normal
-
-.sidebar
- margin: 30px 0 0 0
-
- .sidebar-title
- margin: 0 0 20px 40px
- text-transform: uppercase
- font-weight: normal
- font-size: 12px
-
- .sidebar-page-listing
- list-style: none
-
- li
- margin-bottom: 0.5em
- a
- font-size: 11px
- position: relative
- color: $text-color
- .current_page_item
- a
- color: #77991F
- font-weight: bold
- .active-box
- height: 1em
- width: 1em
- background: #77991F
- display: block
- position: absolute
- left: -1.5em
- top: 2px
-
+ font-weight: normal
@@ -1,4 +1,8 @@
-.alignleft
+#primary
+ width: 75%
+ float: left
+.sidebar-right
+ width: 25%
float: left
.post-divider
@@ -18,4 +22,7 @@
table
h1,h2,h3,h4,h5
margin-top: 0
- padding-top: 0
+ padding-top: 0
+
+ .alignleft
+ float: left
@@ -0,0 +1,31 @@
+.sidebar
+ margin: 30px 0 0 0
+
+ .sidebar-title
+ margin: 0 0 20px 40px
+ text-transform: uppercase
+ font-weight: normal
+ font-size: 12px
+
+ .sidebar-page-listing
+ list-style: none
+
+ li
+ margin-bottom: 0.5em
+ a
+ font-size: 11px
+ position: relative
+ color: $text-color
+ .current_page_item
+ a
+ color: #77991F
+ font-weight: bold
+ .active-box
+ height: 1em
+ width: 1em
+ background: #77991F
+ display: block
+ position: absolute
+ left: -1.5em
+ top: 2px
+
@@ -20,6 +20,7 @@
@import "church.css.sass"
@import "sermons.css.sass"
@import "posts-pages.css.sass"
+@import "sidebars.css.sass"
body
@@ -0,0 +1,18 @@
+
+<div class="sidebar sidebar-right">
+ <div class="col-right">
+ <div class="sidebar sidebar-church">
+ <h3 class="sidebar-title">Church</h3>
+ <ul class="sidebar-page-listing">
+ <?php
+ $page = get_page_by_title('church');
+ wp_list_pages(array(
+ 'title_li' => '',
+ 'child_of' => $page->ID,
+ 'link_before' => '<span class="active-box"></span>'
+ ));
+ ?>
+ </ul>
+ </div>
+ </div>
+</div>
@@ -0,0 +1,14 @@
+<!-- This draws out the sermon series topics. -->
+<?php if ( 'ct_sermon' == get_post_type() ) : ?>
+ <div class="sidebar sidebar-right right-sermons-nav">
+ <?php
+ $taxonomy = 'sermon_series';
+ $terms = get_terms($taxonomy);
+ foreach ($terms as $term) {
+ $term_slug = $term->slug;
+ $current_series = get_the_term_list('', 'sermon_series');
+ echo '<a href="'.get_home_url().'/series/'.$term->slug.'">'.$term->name.'</a><br />';
+ }
+ ?>
+ </div>
+<?php endif; ?>
@@ -202,12 +202,6 @@
.page-church {
width: 100%; }
- .page-church .col-left {
- width: 75%;
- float: left; }
- .page-church .col-right {
- width: 25%;
- float: left; }
.page-church .leadership-pic {
padding-right: 10px;
vertical-align: top; }
@@ -217,33 +211,6 @@
font-size: 16px;
font-weight: normal; }
-.sidebar {
- margin: 30px 0 0 0; }
- .sidebar .sidebar-title {
- margin: 0 0 20px 40px;
- text-transform: uppercase;
- font-weight: normal;
- font-size: 12px; }
- .sidebar .sidebar-page-listing {
- list-style: none; }
- .sidebar .sidebar-page-listing li {
- margin-bottom: 0.5em; }
- .sidebar .sidebar-page-listing a {
- font-size: 11px;
- position: relative;
- color: #444444; }
- .sidebar .sidebar-page-listing .current_page_item a {
- color: #77991f;
- font-weight: bold; }
- .sidebar .sidebar-page-listing .current_page_item .active-box {
- height: 1em;
- width: 1em;
- background: #77991f;
- display: block;
- position: absolute;
- left: -1.5em;
- top: 2px; }
-
.ct_sermon {
width: 70%;
border-bottom: 2px solid #cccccc; }
@@ -254,7 +221,12 @@
.social.sermons ul li {
list-style-type: none; }
-.alignleft {
+#primary {
+ width: 75%;
+ float: left; }
+
+.sidebar-right {
+ width: 25%;
float: left; }
.post-divider {
@@ -272,6 +244,35 @@
.page table h1, .page table h2, .page table h3, .page table h4, .page table h5, .post table h1, .post table h2, .post table h3, .post table h4, .post table h5 {
margin-top: 0;
padding-top: 0; }
+.page .alignleft, .post .alignleft {
+ float: left; }
+
+.sidebar {
+ margin: 30px 0 0 0; }
+ .sidebar .sidebar-title {
+ margin: 0 0 20px 40px;
+ text-transform: uppercase;
+ font-weight: normal;
+ font-size: 12px; }
+ .sidebar .sidebar-page-listing {
+ list-style: none; }
+ .sidebar .sidebar-page-listing li {
+ margin-bottom: 0.5em; }
+ .sidebar .sidebar-page-listing a {
+ font-size: 11px;
+ position: relative;
+ color: #444444; }
+ .sidebar .sidebar-page-listing .current_page_item a {
+ color: #77991f;
+ font-weight: bold; }
+ .sidebar .sidebar-page-listing .current_page_item .active-box {
+ height: 1em;
+ width: 1em;
+ background: #77991f;
+ display: block;
+ position: absolute;
+ left: -1.5em;
+ top: 2px; }
body {
font-family: "Open Sans", sans-serif, Arial;

0 comments on commit 98b3554

Please sign in to comment.