Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Mar 9, 2021. It is now read-only.

Commit 981a49b

Browse files
author
z
committed
basic design in place for subjects
1 parent 326de94 commit 981a49b

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

pages/learn/subject.js

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import React from 'react';
22
import fetch from 'isomorphic-unfetch';
3+
import { space } from 'styled-system';
4+
import { Flex, Box } from 'grid-emotion';
5+
import styled from 'react-emotion';
36

7+
import { baseContainer } from '../../utils/base.styles';
48
import Layout from '../../components/common/layout';
59
import BannerSection from '../../components/learn/subject-banner';
610
import SyllabusTree from '../../components/learn/syllabus-tree/syllabus-tree-container';
@@ -10,6 +14,12 @@ import { laravelSyllabus } from '../../utils/mock-data';
1014

1115
const defaultChapter = laravelSyllabus[0].chapters[0].url;
1216

17+
const Container = styled.section`
18+
${baseContainer};
19+
${space};
20+
border: 1px solid #b9b9b9;
21+
min-height: 80vh;
22+
`;
1323
export default class Subject extends React.Component {
1424
constructor(props) {
1525
super(props);
@@ -48,8 +58,17 @@ export default class Subject extends React.Component {
4858
subTitle="Web Development"
4959
icon="devicon-laravel-plain colored"
5060
/>
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>
5372
</Layout>
5473
);
5574
}

0 commit comments

Comments
 (0)