add challenge type to beginning of challenge in map
parent
b667a776ea
commit
b4ae49f915
|
@ -262,6 +262,10 @@ ul {
|
|||
font-size: 24px;
|
||||
}
|
||||
|
||||
.capitalize {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
.text-success {
|
||||
color: @brand-success;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ const debug = debugFactory('freecc:challenges');
|
|||
const challengeMapWithNames = utils.getChallengeMapWithNames();
|
||||
const challengeMapWithIds = utils.getChallengeMapWithIds();
|
||||
const challengeMapWithDashedNames = utils.getChallengeMapWithDashedNames();
|
||||
const challangesRegex = /^(bonfire|waypoint|zipline|basejump)/i;
|
||||
const challengesRegex = /^(bonfire|waypoint|zipline|basejump)/i;
|
||||
const firstChallenge = 'waypoint-say-hello-to-html-elements';
|
||||
|
||||
const dasherize = utils.dasherize;
|
||||
|
@ -232,7 +232,7 @@ module.exports = function(app) {
|
|||
var origChallengeName = req.params.challengeName;
|
||||
var unDashedName = unDasherize(origChallengeName);
|
||||
|
||||
var challengeName = challangesRegex.test(unDashedName) ?
|
||||
var challengeName = challengesRegex.test(unDashedName) ?
|
||||
// remove first word if matches
|
||||
unDashedName.split(' ').slice(1).join(' ') :
|
||||
unDashedName;
|
||||
|
|
|
@ -85,7 +85,9 @@ block content
|
|||
.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.dashedName}")= challenge.title
|
||||
a(href="/challenges/#{challenge.dashedName}")
|
||||
span.capitalize= challenge.type + ': '
|
||||
span= challenge.title
|
||||
|
||||
else
|
||||
.row
|
||||
|
@ -93,7 +95,9 @@ block content
|
|||
span.negative-10
|
||||
.col-xs-12.col-sm-9.col-md-10
|
||||
li.large-p.negative-10
|
||||
a(href="/challenges/#{challenge.dashedName}")= challenge.title
|
||||
a(href="/challenges/#{challenge.dashedName}")
|
||||
span.capitalize= challenge.type + ': '
|
||||
span= challenge.title
|
||||
|
||||
//#announcementModal.modal(tabindex='-1')
|
||||
// .modal-dialog.animated.fadeInUp.fast-animation
|
||||
|
|
Loading…
Reference in New Issue