fix /learn layout

This commit is contained in:
Thibault Duplessis 2019-05-01 15:59:27 +07:00
parent 5b20cbeabd
commit e4189c95fe
4 changed files with 11 additions and 5 deletions

View file

@ -6,6 +6,9 @@ $mq-col3: $mq-col3-uniboard;
@include breakpoint($mq-col2) {
--main-max-width: auto;
}
&.learn-full {
--main-max-width: 100%;
}
}
.learn {

View file

@ -6,7 +6,3 @@
@import 'screen';
@import 'side-map';
@import 'side-home';
#main-wrap {
--main-max-width: 100%;
}

View file

@ -68,7 +68,11 @@ function titleVerbosityClass(title) {
}
module.exports = function(ctrl) {
return m('div.learn.learn--map', [
return m('div.learn.learn--map', {
config: function(_, isUpdate) {
if (!isUpdate) $('#main-wrap').addClass('learn-full');
}
}, [
m('div.learn__side', ctrl.opts.side.view()),
m('div.learn__main.learn-stages', [
stages.categs.map(function(categ) {

View file

@ -34,6 +34,9 @@ module.exports = function(ctrl) {
var level = ctrl.level;
return m('div', {
config: function(_, isUpdate) {
if (!isUpdate) $('#main-wrap').removeClass('learn-full');
},
class: 'learn learn--run ' + stage.cssClass + ' ' + level.blueprint.cssClass +
(level.vm.starting ? ' starting' : '') +
(level.vm.completed && !level.blueprint.nextButton ? ' completed' : '') +