@@ -12,12 +12,14 @@ const styles = {
1212page :{
1313backgroundColor :'white' ,
1414position :'relative' as 'relative' ,
15+ height :'auto' ,
16+ width :'100%' ,
17+ } ,
18+ content :{
1519display :'flex' as 'flex' ,
1620flexDirection :'column' as 'column' ,
1721padding :0 ,
1822paddingBottom :'5rem' ,
19- height :'auto' ,
20- width :'100%' ,
2123} ,
2224header :{
2325height :'2rem' ,
@@ -26,13 +28,11 @@ const styles = {
2628lineHeight :'1rem' ,
2729padding :'10px 1rem' ,
2830} ,
29- content :{
31+ text :{
3032padding :'0rem 1rem' ,
3133paddingBottom :'1rem' ,
3234} ,
33- tasks :{
34- paddingBottom :'5rem' ,
35- } ,
35+ tasks :{ } ,
3636steps :{
3737padding :'1rem 1rem' ,
3838} ,
@@ -101,63 +101,66 @@ const Level = ({ level, onContinue, onLoadSolution, processes, testStatus }: Pro
101101
102102return (
103103< div css = { styles . page } >
104- < div css = { styles . header } >
105- < span > Learn</ span >
106- </ div >
107104< div css = { styles . content } >
108- < h2 css = { styles . title } > { level . title } </ h2 >
109- < Markdown > { level . content || '' } </ Markdown >
110- </ div >
105+ < div css = { styles . header } >
106+ < span > Learn</ span >
107+ </ div >
108+ < div css = { styles . text } >
109+ < h2 css = { styles . title } > { level . title } </ h2 >
110+ < Markdown > { level . content || '' } </ Markdown >
111+ </ div >
111112
112- { level . steps . length ?(
113- < div css = { styles . tasks } >
114- < div css = { styles . header } > Tasks</ div >
115- < div css = { styles . steps } >
116- { level . steps . map ( ( step :( G . Step & { status :T . ProgressStatus } ) | null , index :number ) => {
117- if ( ! step ) {
118- return null
119- }
120- return (
121- < Step
122- key = { step . id }
123- order = { index + 1 }
124- status = { step . status }
125- content = { step . content }
126- onLoadSolution = { onLoadSolution }
127- />
128- )
129- } ) }
113+ { level . steps . length ?(
114+ < div css = { styles . tasks } >
115+ < div css = { styles . header } > Tasks</ div >
116+ < div css = { styles . steps } >
117+ { level . steps . map ( ( step :( G . Step & { status :T . ProgressStatus } ) | null , index :number ) => {
118+ if ( ! step ) {
119+ return null
120+ }
121+ return (
122+ < Step
123+ key = { step . id }
124+ order = { index + 1 }
125+ status = { step . status }
126+ content = { step . content }
127+ onLoadSolution = { onLoadSolution }
128+ />
129+ )
130+ } ) }
131+ </ div >
130132</ div >
131- </ div >
132- ) :null }
133- < div ref = { pageBottomRef } />
133+ ) :null }
134134
135- { ( testStatus || processes . length > 0 ) && (
136- < div css = { styles . processes } >
137- < ProcessMessages processes = { processes } testStatus = { testStatus } />
138- </ div >
139- ) }
135+ < div ref = { pageBottomRef } />
140136
141- < div css = { styles . nux } >
142- < NuxTutorial onLoadSolution = { onLoadSolution } />
143- </ div >
137+ { ( testStatus || processes . length > 0 ) && (
138+ < div css = { styles . processes } >
139+ < ProcessMessages processes = { processes } testStatus = { testStatus } />
140+ </ div >
141+ ) }
144142
145- < div css = { styles . footer } >
146- < span >
147- { typeof level . index === 'number' ?`${ level . index + 1 } . ` :'' }
148- { level . title }
149- </ span >
150- < span >
151- { level . status === 'COMPLETE' || ! level . steps . length ?(
152- < Button type = "primary" onClick = { onContinue } >
153- Continue
154- </ Button >
155- ) :(
156- < span css = { styles . taskCount } >
157- { currentStep } of{ level . steps . length } tasks
158- </ span >
159- ) }
160- </ span >
143+ < div css = { styles . nux } >
144+ < NuxTutorial onLoadSolution = { onLoadSolution } />
145+ </ div >
146+
147+ < div css = { styles . footer } >
148+ < span >
149+ { typeof level . index === 'number' ?`${ level . index + 1 } . ` :'' }
150+ { level . title }
151+ </ span >
152+ < span >
153+ { level . status === 'COMPLETE' || ! level . steps . length ?(
154+ < Button type = "primary" onClick = { onContinue } >
155+ Continue
156+ </ Button >
157+ ) :(
158+ < span css = { styles . taskCount } >
159+ { currentStep } of{ level . steps . length } tasks
160+ </ span >
161+ ) }
162+ </ span >
163+ </ div >
161164</ div >
162165</ div >
163166)