added automatic time logic to live-pair-programming page

pull/91/head
phlacin 2015-02-12 20:31:11 -08:00
parent 6455d80a6e
commit 2d447f0bb0
4 changed files with 3065 additions and 1 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,16 @@
/**
* Created by jason on 2/11/15.
*/
function nextSession () {
var next = 'Our next session will be ';
var today = moment().day(moment().day());
if (today > moment().day(2)) {
next += moment().day(9).format('dddd, MMMM Do YYYY') + ' at 9PM EST!';
} else {
next += moment().day('Tuesday').format('dddd, MMMM Do YYYY') + ' at 9PM EST!';
}
return next;
}

View File

@ -4,6 +4,8 @@ html(ng-app='profileValidation', lang='en')
script(src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js")
script(src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.11/angular.min.js")
script(src="//cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.12.0/ui-bootstrap-tpls.min.js")
script(src="/js/lib/moment/moment.js")
script(src="/js/lib/moment/nextTuesday.js")
link(rel='shortcut icon', href='//s3.amazonaws.com/freecodecamp/favicon.ico')
link(rel='stylesheet', href='//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css')
link(rel='stylesheet', href='//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css')

View File

@ -1,8 +1,12 @@
extends ../layout-wide
block content
.text-center
h1 Live Pair Programming
h2 Our next session will be February 3rd, 2015 at 9 p.m. EST!
h2#next-session
h2 Watch the live stream below or on our  
a(href="http://twitch.tv/freecodecamp", target='_blank') Twitch.tv channel
| .
@ -46,3 +50,5 @@ block content
br
br
br
script.
$('#next-session').text(nextSession());