Permalink
Browse files

added latest sermon to homepage

  • Loading branch information...
1 parent 75c643e commit 1e0826f06f825c876cc0e9901dd7983582411f50 Justin Louie committed Dec 20, 2012
@@ -20,31 +20,58 @@
</tr>
<tr class="info-row">
<td class="info-box info-cell">
- <table>
- <tr>
- <td class="service-time">8:30am</td>
- <td>Cantonese Service 1</td>
- </tr>
- <tr>
- <td class="service-time">10:00am</td>
- <td>English Ministries Service</td>
- </tr>
- <tr>
- <td class="service-time">11:30am</td>
- <td>Cantonese Service 2</td>
- </tr>
- </table>
+ <div class="info-cell-container">
+ <table>
+ <tr>
+ <td class="service-time">8:30am</td>
+ <td>Cantonese Service 1</td>
+ </tr>
+ <tr>
+ <td class="service-time">10:00am</td>
+ <td>English Ministries Service</td>
+ </tr>
+ <tr>
+ <td class="service-time">11:30am</td>
+ <td>Cantonese Service 2</td>
+ </tr>
+ </table>
- <p>
- 2803 S. Orcas St.
- <br/>
- Seattle, WA 98108
- </p>
+ <p>
+ 2803 S. Orcas St.
+ <br/>
+ Seattle, WA 98108
+ </p>
- <a href="<?php echo home_url("/")?>visit/">Directions</a>
+ <a href="<?php echo home_url("/")?>visit/">Directions</a>
+ </div>
</td>
<td class="info-box info-cell">
- Coming Soon
+ <?php
+ $args = array(
+ 'post_type' => 'ct_sermon',
+ 'order' => 'DESC',
+ 'numberposts' => 1
+ );
+ $post = array_shift(get_posts($args));
+
+ if(isset($post)) :
+ $term = array_shift(wp_get_post_terms($post->ID, 'sermon_series'));
+
+ ?>
+ <div class="info-cell-container">
+ <?php
+ global $nggdb;
+ if(isset($nggdb)):
+ $img = $nggdb->find_image($term->slug);
+ ?>
+ <div class="latest-sermon-img"><img src="<?php echo $img->imageURL; ?>" style="width: 300px"></div>
+ <?php endif; ?>
+ <div class="latest-sermon-title"><a href="<?php echo get_permalink($post); ?>"><?php echo get_the_title($post); ?></a></div>
+ <div class="latset-sermon-date"><?php echo get_the_time('M j, Y', $post); ?></div>
+ </div>
+ <?php else : ?>
+ Latest sermon coming soon! Check often!
+ <?php endif; ?>
</td>
<td class="info-box info-cell">
<?php
@@ -8,6 +8,7 @@
font-size: 20px
float: left
position: relative
+ font-weight: normal
.site-name-top
position: relative
@@ -26,6 +26,19 @@
width: 20%
vertical-align: top
+ .info-cell-container
+ width: 90%
+
+ .latest-sermon-img
+ margin: 0 0 10px
+
+ .latest-sermon-title
+ font-size: 20px
+ line-height: 25px
+
+ .latset-sermon-date
+ color: $text-grey
+
.service-time
padding-right: 5px
@@ -14,6 +14,7 @@
h1
a
color: $text-color
+ line-height: 20px
.page, .post
@@ -33,6 +33,8 @@
td
height: 150px
+ vertical-align: top
+ padding: 0 0 15px
.series-img-container
@@ -37,5 +37,5 @@
display: block
position: absolute
left: -1.5em
- top: 2px
+ top: 0px
@@ -37,7 +37,8 @@
.site-title {
font-size: 20px;
float: left;
- position: relative; }
+ position: relative;
+ font-weight: normal; }
.site-title .site-name-top {
position: relative;
top: 0px;
@@ -171,6 +172,15 @@
.info-area .info-row .info-cell {
width: 20%;
vertical-align: top; }
+ .info-area .info-row .info-cell .info-cell-container {
+ width: 90%; }
+ .info-area .info-row .info-cell .info-cell-container .latest-sermon-img {
+ margin: 0 0 10px; }
+ .info-area .info-row .info-cell .info-cell-container .latest-sermon-title {
+ font-size: 20px;
+ line-height: 25px; }
+ .info-area .info-row .info-cell .info-cell-container .latset-sermon-date {
+ color: #777777; }
.info-area .info-row .info-cell .service-time {
padding-right: 5px; }
.info-area .info-row .info-header {
@@ -264,7 +274,9 @@
.sermon-series-listings {
width: 100%; }
.sermon-series-listings td {
- height: 150px; }
+ height: 150px;
+ vertical-align: top;
+ padding: 0 0 15px; }
.page-sermon-series .page-header {
margin: 0 0 2em; }
@@ -297,7 +309,8 @@
float: left;
padding: 0 10px; }
#primary h1 a {
- color: #444444; }
+ color: #444444;
+ line-height: 20px; }
.page .entry-content h2, .page .entry-content h3, .page .entry-content h4, .page .entry-content h5, .post .entry-content h2, .post .entry-content h3, .post .entry-content h4, .post .entry-content h5 {
color: #77991f; }
@@ -350,7 +363,7 @@
display: block;
position: absolute;
left: -1.5em;
- top: 2px; }
+ top: 0px; }
.ministry-page .col-left {
float: left;

0 comments on commit 1e0826f

Please sign in to comment.