Ad minimal map for iframe loading
This commit is contained in:
@ -228,6 +228,7 @@ function getSuperBlocks$(challenge$, completedChallenges) {
|
|||||||
return {
|
return {
|
||||||
isBeta,
|
isBeta,
|
||||||
isComingSoon,
|
isComingSoon,
|
||||||
|
isRequired,
|
||||||
name: blockArray[0].block,
|
name: blockArray[0].block,
|
||||||
superBlock: blockArray[0].superBlock,
|
superBlock: blockArray[0].superBlock,
|
||||||
dashedName: dasherize(blockArray[0].block),
|
dashedName: dasherize(blockArray[0].block),
|
||||||
@ -317,7 +318,8 @@ module.exports = function(app) {
|
|||||||
completedZiplineOrBasejump
|
completedZiplineOrBasejump
|
||||||
);
|
);
|
||||||
|
|
||||||
router.get('/map', showMap);
|
router.get('/map', showMap.bind(null, false));
|
||||||
|
router.get('/map-minimal', showMap.bind(null, true));
|
||||||
router.get(
|
router.get(
|
||||||
'/challenges/next-challenge',
|
'/challenges/next-challenge',
|
||||||
returnNextChallenge
|
returnNextChallenge
|
||||||
@ -574,14 +576,15 @@ module.exports = function(app) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function showMap({ user }, res, next) {
|
function showMap(showMinimal, { user }, res, next) {
|
||||||
|
|
||||||
getSuperBlocks$(challenge$, getCompletedChallengeIds(user))
|
getSuperBlocks$(challenge$, getCompletedChallengeIds(user))
|
||||||
.subscribe(
|
.subscribe(
|
||||||
superBlocks => {
|
superBlocks => {
|
||||||
res.render('map/show', {
|
res.render('map/show', {
|
||||||
superBlocks,
|
superBlocks,
|
||||||
title: 'A Map to Learn to Code and Become a Software Engineer'
|
title: 'A Map to Learn to Code and Become a Software Engineer',
|
||||||
|
showMinimal
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
next
|
next
|
||||||
|
@ -5,6 +5,7 @@ html(lang='en')
|
|||||||
include partials/stylesheets
|
include partials/stylesheets
|
||||||
body.no-top-and-bottom-margins.full-screen-body-background
|
body.no-top-and-bottom-margins.full-screen-body-background
|
||||||
include partials/scripts
|
include partials/scripts
|
||||||
|
if !showMinimal
|
||||||
include partials/navbar
|
include partials/navbar
|
||||||
include partials/flash
|
include partials/flash
|
||||||
block content
|
block content
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
extends ../layout-wide
|
extends ../layout-wide
|
||||||
block content
|
block content
|
||||||
|
if !showMinimal
|
||||||
.row
|
.row
|
||||||
.col-xs-12.col-md-6.col-md-offset-3
|
.col-xs-12.col-md-6.col-md-offset-3
|
||||||
ul
|
ul
|
||||||
|
Reference in New Issue
Block a user