Skip to content

Commit

Permalink
added a countdown and other tiny style tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
lukesandberg committed Apr 3, 2013
1 parent 41e5b61 commit 9167d21
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 11 deletions.
10 changes: 10 additions & 0 deletions public/css/additions.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ img.bg {
padding: 20px;
}

.countdown {
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
font-size: medium;
font-weight: bold;
position: absolute;
right: 5px;
top: 11px;
color: #7F003F;
}

.notice > h1,
.notice > h2,
.notice > h3,
Expand Down
8 changes: 6 additions & 2 deletions views/bride_and_groom.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
p
| After finishing college, moving into separate apartments, and starting our respective jobs, Rachel nervously bought a condo and more nervously requested that Luke be her domestic partner, made official with a joint membership to Costco. Three lovely years had passed, including Luke's 6 month stint as a Seattleite, when Luke pulled an engagement ring out of the coin pocket of his jeans and Rachel got misty eyed in our
a(href='http://theviolethour.com/') favorite cocktail lounge.
| Rachel had just started graduate school, though, so wedding planning would have to wait.
| Rachel had just started
a(href='http://www.chicagobooth.edu/') graduate school
|, though, so wedding planning would have to wait.

div.background
div.row-fluid
Expand All @@ -18,7 +20,9 @@
h1 Facts about Rachel
ul
li Sleeps with her eyes open
li| Cannot donate blood — may or may not be infected with bovine spongiform encephalitis (mad cow disease)
li| Cannot donate blood — may or may not be infected with
a(href='http://en.wikipedia.org/wiki/Bovine_spongiform_encephalopathy') bovine spongiform encephalopathy
|(mad cow disease)
li Prefers to wing it rather than follow recipes when cooking
li Has a skin allergy to all but precious metals
li Had
Expand Down
16 changes: 9 additions & 7 deletions views/home.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
div.row-fluid
div.row-fluid.tile
div.offset7.span5.tile
div.notice
h1 The Wedding
Expand All @@ -13,14 +13,16 @@
div.offset7.span5.tile
div.notice
h1 Accomodations
|The Palomar Hotel
br()
a(target='_blank', href='https://gc.synxis.com/rez.aspx?Hotel=26727&Chain=10179&arrive=7/12/2013&depart=7/14/2013&adult=1&child=0&group=18000701735') Huddleston/Sandberg Party Reservations
br()
|or call (877) 731-0505 and specify the Huddleston/Sandberg wedding.
p
|The Palomar Hotel
br()
a(target='_blank', href='https://gc.synxis.com/rez.aspx?Hotel=26727&Chain=10179&arrive=7/12/2013&depart=7/14/2013&adult=1&child=0&group=18000701735') Huddleston/Sandberg Party Reservations
br()
|or call (877) 731-0505; specify Huddleston/Sandberg

div.row-fluid.tile
div.offset7.span5.tile
div.notice
h1 The Registry
a(target='_blank', href='http://www.giftregistry360.com/wishlist/rachelandluke') www.giftregistry360.com
p
a(target='_blank', href='http://www.giftregistry360.com/wishlist/rachelandluke') www.giftregistry360.com
2 changes: 2 additions & 0 deletions views/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
mixin item('Home', '/')
mixin item('Bride & Groom', '/bride-and-groom/')
mixin item('Wedding Party', '/')
div.countdown= daysToGo

!=body
script(src='http://code.jquery.com/jquery-latest.js')
script(src='/js/bootstrap.min.js')
Expand Down
23 changes: 21 additions & 2 deletions web.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ var express = require('express');
var utils = {
getDriveImageUrl: function(filename) {
return 'https://googledrive.com/host/0B6vNk5GSBIjUWG9xNklsYnVGaHc/' + filename;
},
getDaysToGo: function() {
var daysLeft = Math.round((new Date(2013, 6, 13) - new Date()) / (1000*60*60*24));
if (daysLeft < 0) {
return "";
}
if (daysLeft == 0 || daysLeft == 1) {
return "The Wedding is Soon!";
}
return daysLeft + " days to go!";
}
};

Expand All @@ -22,10 +32,19 @@ app.configure(function() {
});

app.get('/', function(request, response) {
response.render('home.html', {banner: utils.getDriveImageUrl('homepage_banner.jpg'), active: 'Home'});
console.log(utils.getDaysToGo());
response.render('home.html', {
banner: utils.getDriveImageUrl('homepage_banner.jpg'),
active: 'Home',
daysToGo: utils.getDaysToGo()
});
});
app.get('/bride-and-groom/', function(request, response) {
response.render('bride_and_groom.html', {banner: utils.getDriveImageUrl('bride_and_groom_banner.jpg'), active: 'Bride & Groom'});
response.render('bride_and_groom.html', {
banner: utils.getDriveImageUrl('bride_and_groom_banner.jpg'),
active: 'Bride & Groom',
daysToGo: utils.getDaysToGo()
});
});

var port = process.env.PORT || 5000;
Expand Down

0 comments on commit 9167d21

Please sign in to comment.