Pull some useful changes from aborted branch

This commit is contained in:
Michael Q Larson
2015-04-16 23:54:26 -07:00
parent d2fae63310
commit d10011acc3
4 changed files with 147 additions and 110 deletions

View File

@@ -1,100 +1,83 @@
extends ../layout-wide
extends ../layout
block content
if (Math.random() > 0.98)
img.img-responsive.img-center(src='https://s3.amazonaws.com/freecodecamp/wide-social-banner-dino.png')
else
img.img-responsive.img-center(src='https://s3.amazonaws.com/freecodecamp/wide-social-banner.png')
br
.row.text-center
.col-xs-12.col-md-6.col-md-offset-3
if (user)
if (!user.sentSlackInvite)
a.btn.btn-cta.signup-btn.next-challenge-button.btn-block(href="/challenges") Take me to my next challenge
.spacer
a.btn.btn-primary.btn-cta.next-challenge-button.btn-block(href="/api/slack") Join our Slack Chat Room
else
a.btn.btn-cta.signup-btn.next-challenge-button.btn-block(href="/signin") Start learning to code (it's free)
br
.row
.col-xs-12.col-sm-12.col-md-4
.panel.panel-info
.panel-heading.landing-panel-heading.text-center Get Connected
.panel-body.text-center
img.img-responsive.img-center(src="https://s3.amazonaws.com/freecodecamp/about-chatroom.jpg" alt="A screen shot from Free Code Camp's main chat room")
h3 #{c3} campers are doing challenges.
h3 #{all} campers are coding for nonprofits.
.col-xs-12.col-sm-12.col-md-4
.panel.panel-info
.panel-heading.landing-panel-heading.text-center Learn JavaScript
.panel-body.text-center
img.img-responsive.img-center(src="https://s3.amazonaws.com/freecodecamp/about-github.jpg" alt="A screen shot of a GitHub commit graph showing a streak of 33 consecutive days of contributions")
include ../partials/github
.col-xs-12.col-sm-12.col-md-4
.panel.panel-info
.panel-heading.landing-panel-heading.text-center Help Nonprofits
.panel-body.text-center
img.img-responsive.img-center(src="https://s3.amazonaws.com/freecodecamp/about-trello.jpg" alt="a screen shot of Free Code Camp's nonprofit project Trello board showing several active projects")
h3 We launched #{daysRunning} days ago.
h3 We help 20 nonprofits.  
a(href='https://trello.com/b/BA3xVpz9/nonprofit-projects') (view them)
br
script.
var challengeName = 'Learn to code'
.row
.col-xs-12
.panel.panel-info
.panel-heading.landing-panel-heading.text-center Announcements
.panel-body
.landing-panel-body.text-center
for announcement in announcements
h2
if (announcement.length > 1)
a(href=announcement[1])= announcement[0]
.col-xs-12.col-sm-12.col-md-12
.panel.panel-info
.panel-heading.text-center
h1 About Free Code Camp
.panel-body
.row.text-center
.col-xs-12
if (Math.random() > 0.99)
img.img-responsive.img-center(src='https://s3.amazonaws.com/freecodecamp/wide-social-banner-dino.png')
else
img.img-responsive.img-center(src='https://s3.amazonaws.com/freecodecamp/wide-social-banner.png')
.col-xs-12.col-md-8.col-md-offset-2
h2.text-center
span.text-primary #{c3}  
| campers have joined our community since we launched  
span.text-primary #{daysRunning}  
| days ago.
.row.text-center
.col-xs-12.col-md-8.col-md-offset-2
if (user)
if (!user.sentSlackInvite)
a.btn.btn-cta.signup-btn.next-challenge-button.btn-block(href="/challenges") Take me to my next challenge
.spacer
a.btn.btn-primary.btn-cta.next-challenge-button.btn-block(href="/api/slack") Join our Slack Chat Room
else
= announcement[0]
a.twitter-timeline(data-dnt='true', href='https://twitter.com/FreeCodeCamp', data-widget-id='560847186548621312') Tweets by @FreeCodeCamp
a.btn.btn-cta.signup-btn.next-challenge-button.btn-block(href="/signin") Start learning to code (it's free)
br
script.
!function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0], p = /^http:/.test(d.location) ? 'http' : 'https';
if (!d.getElementById(id)) {
js = d.createElement(s);
js.id = id;
js.src = p + "://platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js, fjs);
}
}(document, "script", "twitter-wjs");
h3
.col-xs-12 Follow us on Twitter here:
.col-xs-12.github-and-twitter-button-text
html.
<a class="twitter-follow-button"
href="https://twitter.com/freecodecamp"
data-show-count="true"
data-lang="en">
Follow @FreeCodeCamp
</a>
<script>window.twttr=(function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return;js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);t._e=[];t.ready=function(f){t._e.push(f);};return t;}(document,"script","twitter-wjs"));</script>
.col-xs-12.github-and-twitter-button-text Star us on GitHub here:
.col-xs-12.github-and-twitter-button-text
html.
<iframe src="http://ghbtns.com/github-btn.html?user=freecodecamp&repo=freecodecamp&type=watch&count=true&size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe>
#announcementModal.modal(tabindex='-1')
.modal-dialog
.modal-content
.modal-header.challenge-list-header Camp-wide Meeting on Saturday at Noon EST
a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
.modal-body
h3.text-left We'll live-stream some of Free Code Camp's new features, and campers will show what they're building. Live Saturday, March 28 at Noon EST on our &thinsp;
a(href='http://twitch.tv/freecodecamp', target='_blank') Twitch.tv channel
| .
a.btn.btn-lg.btn-info.btn-block(name='_csrf', value=_csrf, aria-hidden='true', href='http://twitch.tv/freecodecamp', target='_blank') Take me to Twitch so I can follow Free Code Camp
a.btn.btn-lg.btn-primary.btn-block(href='#', data-dismiss='modal', aria-hidden='true') Thanks for the heads-up!
script.
$(document).ready(function() {
if (!localStorage || !localStorage.campWideMeeting) {
$('#announcementModal').modal('show');
localStorage.campWideMeeting = "true";
}
});
var challengeName = 'Learn to code'
.row
.col-xs-12.col-md-8.col-md-offset-2
for announcement in announcements
h2
if (announcement.length > 1)
a(href=announcement[1])= announcement[0]
else
= announcement[0]
a.twitter-timeline(data-dnt='true', href='https://twitter.com/FreeCodeCamp', data-widget-id='560847186548621312') Tweets by @FreeCodeCamp
script.
!function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0], p = /^http:/.test(d.location) ? 'http' : 'https';
if (!d.getElementById(id)) {
js = d.createElement(s);
js.id = id;
js.src = p + "://platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js, fjs);
}
}(document, "script", "twitter-wjs");
h3
.col-xs-12 Follow us on Twitter here:
.col-xs-12.github-and-twitter-button-text
html.
<a class="twitter-follow-button"
href="https://twitter.com/freecodecamp"
data-show-count="true"
data-lang="en">
Follow @FreeCodeCamp
</a>
<script>window.twttr=(function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return;js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);t._e=[];t.ready=function(f){t._e.push(f);};return t;}(document,"script","twitter-wjs"));</script>
.col-xs-12.github-and-twitter-button-text Star us on GitHub here:
.col-xs-12.github-and-twitter-button-text
html.
<iframe src="http://ghbtns.com/github-btn.html?user=freecodecamp&repo=freecodecamp&type=watch&count=true&size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe>
#announcementModal.modal(tabindex='-1')
.modal-dialog
.modal-content
.modal-header.challenge-list-header Camp-wide Meeting on Saturday at Noon EST
a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
.modal-body
h3.text-left We'll live-stream some of Free Code Camp's new features, and campers will show what they're building. Live Saturday, March 28 at Noon EST on our &thinsp;
a(href='http://twitch.tv/freecodecamp', target='_blank') Twitch.tv channel
| .
a.btn.btn-lg.btn-info.btn-block(name='_csrf', value=_csrf, aria-hidden='true', href='http://twitch.tv/freecodecamp', target='_blank') Take me to Twitch so I can follow Free Code Camp
a.btn.btn-lg.btn-primary.btn-block(href='#', data-dismiss='modal', aria-hidden='true') Thanks for the heads-up!
script.
$(document).ready(function () {
if (!localStorage || !localStorage.campWideMeeting) {
$('#announcementModal').modal('show');
localStorage.campWideMeeting = "true";
}
});