added automatic time logic to live-pair-programming page
parent
6455d80a6e
commit
2d447f0bb0
File diff suppressed because it is too large
Load Diff
|
@ -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;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue