Files
freeCodeCamp/views/challengeMap/show.jade

74 lines
4.4 KiB
Plaintext
Raw Normal View History

extends ../layout
block content
script.
var completedChallenges = !{JSON.stringify(completedChallengeList)};
2015-04-28 22:29:59 -07:00
.panel.panel-info
.panel-heading.text-center
h1 Challenge Map
.panel-body
if (Math.random() > 0.99)
img.img-responsive.img-center.border-radius-5(src='https://s3.amazonaws.com/freecodecamp/wide-social-banner-dino.png')
else
img.img-responsive.img-center.border-radius-5(src='https://s3.amazonaws.com/freecodecamp/wide-social-banner.png')
.col-xs-12.col-md-10.col-md-offset-1
2015-04-28 22:29:59 -07:00
h2.text-center
span.text-primary #{camperCount}  
| campers have joined our community
br
| since we launched  
span.text-primary #{daysRunning}  
| days ago.
.spacer
for challengeBlock in challengeList
2015-05-25 17:09:49 -07:00
.row
.col-xs-12.col-sm-8.col-sm-offset-2
h3 #{challengeBlock.name}
.row
.col-xs-12
ol
for challenge in challengeBlock.challenges
if completedChallengeList.indexOf(challenge._id) > -1
.row
.hidden-xs.col-sm-3.col-md-2.text-primary.ion-checkmark-circled.padded-ionic-icon.text-center.large-p.negative-10
.col-xs-12.col-sm-9.col-md-10
li.faded.large-p.negative-10
a(href="/challenges/#{challenge.name}")= challenge.name
2015-05-25 17:09:49 -07:00
else
.row
.hidden-xs.col-sm-3.col-md-2
span.negative-10
.col-xs-12.col-sm-9.col-md-10
li.large-p.negative-10
a(href="/challenges/#{challenge.name}")= challenge.name
h3.text-center Nonprofit Projects (800 hours of real-world experience)*
.row
.col-xs-12
ul
.row
.hidden-xs.col-sm-3.col-md-2
span.negative-10
.col-xs-12.col-sm-9.col-md-10
li.large-p.negative-10
a(href="/nonprofits/directory") Browse our nonprofit projects
p * Complete all Waypoints, Bonfires, Ziplines and Basejumps to be assigned your first nonprofit project
2015-04-23 23:46:58 -07:00
2015-05-21 23:55:47 -07:00
#announcementModal.modal(tabindex='-1')
.modal-dialog.animated.fadeInUp.fast-animation
.modal-content
.modal-header.challenge-list-header Share deep comics about coding
a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
.modal-body
h3.text-left Submit your favorite profound comic about coding to Camper News. Start the headline with: "Deep Code Comic:" then add a clever description that doesn't ruin the punchline.
img.img-responsive.img-center(src='http://imgs.xkcd.com/comics/wisdom_of_the_ancients.png')
h3.text-left We'll publish the top 25 comics (and the campers who submitted them) in Wednesday's blog post. You'll also get 1 point for every upvote.
a.btn.btn-lg.btn-info.btn-block(name='_csrf', value=_csrf, aria-hidden='true', href='/news', target='_blank') Take me to Camper News
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.deepComic) {
$('#announcementModal').modal('show');
localStorage.deepComic = "true";
}
});