Skip to content

Commit

Permalink
added latest sermon to homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Louie committed Dec 20, 2012
1 parent 75c643e commit 1e0826f
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 26 deletions.
69 changes: 48 additions & 21 deletions themes/scacseattle.org/page-homepage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions themes/scacseattle.org/sass/header.css.sass
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
font-size: 20px
float: left
position: relative
font-weight: normal

.site-name-top
position: relative
Expand Down
13 changes: 13 additions & 0 deletions themes/scacseattle.org/sass/homepage.css.sass
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions themes/scacseattle.org/sass/posts-pages.css.sass
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
h1
a
color: $text-color
line-height: 20px

.page, .post

Expand Down
2 changes: 2 additions & 0 deletions themes/scacseattle.org/sass/sermons.css.sass
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

td
height: 150px
vertical-align: top
padding: 0 0 15px

.series-img-container

Expand Down
2 changes: 1 addition & 1 deletion themes/scacseattle.org/sass/sidebars.css.sass
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@
display: block
position: absolute
left: -1.5em
top: 2px
top: 0px

21 changes: 17 additions & 4 deletions themes/scacseattle.org/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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; }
Expand Down Expand Up @@ -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; }
Expand Down Expand Up @@ -350,7 +363,7 @@
display: block;
position: absolute;
left: -1.5em;
top: 2px; }
top: 0px; }

.ministry-page .col-left {
float: left;
Expand Down

0 comments on commit 1e0826f

Please sign in to comment.