1
1
import React from 'react' ;
2
2
import fetch from 'isomorphic-unfetch' ;
3
+ import { space } from 'styled-system' ;
4
+ import { Flex , Box } from 'grid-emotion' ;
5
+ import styled from 'react-emotion' ;
3
6
7
+ import { baseContainer } from '../../utils/base.styles' ;
4
8
import Layout from '../../components/common/layout' ;
5
9
import BannerSection from '../../components/learn/subject-banner' ;
6
10
import SyllabusTree from '../../components/learn/syllabus-tree/syllabus-tree-container' ;
@@ -10,6 +14,12 @@ import { laravelSyllabus } from '../../utils/mock-data';
10
14
11
15
const defaultChapter = laravelSyllabus [ 0 ] . chapters [ 0 ] . url ;
12
16
17
+ const Container = styled . section `
18
+ ${ baseContainer } ;
19
+ ${ space } ;
20
+ border: 1px solid #b9b9b9;
21
+ min-height: 80vh;
22
+ ` ;
13
23
export default class Subject extends React . Component {
14
24
constructor ( props ) {
15
25
super ( props ) ;
@@ -48,8 +58,17 @@ export default class Subject extends React.Component {
48
58
subTitle = "Web Development"
49
59
icon = "devicon-laravel-plain colored"
50
60
/>
51
- < SyllabusTree data = { laravelSyllabus } changeChapter = { this . changeChapter } />
52
- < MarkedJS loading = { this . state . loading } markdown = { this . state . chapterContent } />
61
+ < Container my = { [ 2 , 4 ] } >
62
+ < Flex column = { false } px = { [ 2 , 2 , 2 , 0 ] } >
63
+ < Box width = { [ 0.2 ] } >
64
+ < div > Table of content</ div >
65
+ < SyllabusTree data = { laravelSyllabus } changeChapter = { this . changeChapter } />
66
+ </ Box >
67
+ < Box width = { [ 0.8 ] } >
68
+ < MarkedJS loading = { this . state . loading } markdown = { this . state . chapterContent } />
69
+ </ Box >
70
+ </ Flex >
71
+ </ Container >
53
72
</ Layout >
54
73
) ;
55
74
}
0 commit comments