Files
freeCodeCamp/server/views/challengeMap/show.jade
2016-01-15 04:14:38 -08:00

59 lines
3.2 KiB
Plaintext

extends ../layout-wide
block content
.col-xs-12.col-sm-4.col-sm-offset-8
for superBlock, index in superBlocks
for challengeBlock in superBlock.blocks
h4.bold #{challengeBlock.name} (#{challengeBlock.time})
for challenge in challengeBlock.challenges
if challenge.completed
p.text-primary.ion-checkmark-circled.padded-ionic-icon.negative-15(name="#{challenge.dashedName}")  
a(href="/challenges/#{challenge.dashedName}")
= challenge.title
span.sr-only= " Complete"
else
if challenge.type === "bonfire"
p.ion-asterisk.padded-ionic-icon.negative-15(name="#{challenge.dashedName}")  
a(name="#{challenge.dashedName}" href="/challenges/#{challenge.dashedName}" class=challenge.isComingSoon ? 'disabled' : '')
span= challenge.title
span.sr-only= " Incomplete"
if challenge.markNew
span.text-success.small    
strong
em New
if challengeBlock.isComingSoon
span.text-success.small    
strong
em Coming Soon
else
p.ion-ios-circle-outline.padded-ionic-icon.negative-15(name="#{challenge.dashedName}")  
a(name="#{challenge.dashedName}" href="/challenges/#{challenge.dashedName}" class=challenge.isComingSoon ? 'disabled' : '')
span= challenge.title
span.sr-only= " Incomplete"
if challenge.markNew
span.text-success.small    
strong
em New
if challengeBlock.isComingSoon
span.text-success.small    
strong
em Coming Soon
if (index < superBlocks.length)
hr
script.
var username = !{JSON.stringify(user && user.username || '')};
var lastCompleted = !{JSON.stringify(lastCompleted || false)}
$(document).ready(function () {
if (!localStorage || !localStorage.hideRedditNotice) {
$("#map-notice").removeClass("hidden");
}
$("#hide-map-notice-button").on("click", function(e) {
e.preventDefault();
$("#map-notice").addClass('animated fadeOut');
setTimeout(function() {
$("#map-notice").hide();
}, 1000);
localStorage.hideRedditNotice = "true";
});
});