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