Add tutorial content + update styles · matrixdekoder/learn-react-app@5adb79b · GitHub
Skip to content

Commit 5adb79b

Browse files
Add tutorial content + update styles
1 parent 13dba15 commit 5adb79b

12 files changed

Lines changed: 101 additions & 22 deletions

File tree

‎scripts/processMarkdown.js‎

Lines changed: 3 additions & 3 deletions

‎src/exercise/solution/01-helloWorld-solution.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { Component } from 'react';
1+
import React from 'react';
22

33
function HelloWorld(props){
44
return (

‎src/exercise/solution/02-IntroToJSX-solution.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { Component } from 'react';
1+
import React from 'react';
22

33
function HelloWorld(props){
44
return (

‎src/index.css‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,18 @@ body {
1111
code {
1212
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
1313
monospace;
14-
border-radius: 8px;
15-
background-color: #e4d3bc;
14+
border-radius: 5px;
15+
background-color: #ccc7c2;
1616
padding: 0px 5px 0px 5px;
1717
}
1818

19-
a {
19+
blockquote {
20+
border-left: solid 5px #9ba1b1;
21+
padding-left: 20px;
22+
font-style: italic;
23+
}
24+
25+
.App a {
2026
color: #3f51b5;
2127
text-decoration: none;
2228
}
@@ -34,7 +40,9 @@ button {
3440
min-height: 100vh;
3541
/* display: flex; */
3642
/* flex-direction: column; */
37-
font-size: 1.1rem;
43+
font-size: 1rem;
44+
font-weight: 400;
45+
line-height: 24px;
3846
color: black;
3947
}
4048

‎src/setup/AppShell.js‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { Link } from 'react-router-dom';
1919

2020
import { TutorialMetadataApi } from './TutorialMetadataApi';
2121

22-
const drawerWidth = 240;
22+
const drawerWidth = 260;
2323

2424
const styles = theme => ({
2525
root: {
@@ -46,6 +46,11 @@ const styles = theme => ({
4646
hide: {
4747
display: 'none',
4848
},
49+
leftMenuNav: {
50+
color: '#0052CC',
51+
textDecoration: 'none',
52+
fontWeight: '400'
53+
},
4954
drawer: {
5055
width: drawerWidth,
5156
flexShrink: 0,
@@ -140,7 +145,7 @@ class PersistentDrawerLeft extends React.Component {
140145
{TutorialMetadataApi.getTutorialMetadata().map((tutorial, index) => (
141146
<ListItem button key={tutorial.displayName}>
142147
<ListItemText>
143-
<Link onClick={this.handleDrawerClose} to={tutorial.route}>{tutorial.displayName}</Link>
148+
<Link className={classes.leftMenuNav} onClick={this.handleDrawerClose} to={tutorial.route}>{tutorial.displayName}</Link>
144149
</ListItemText>
145150
</ListItem>
146151
))}

‎src/setup/Exercise.jsx‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ const SolutionTitle = styled.div`
1818
`;
1919

2020
class Exercise extends Component {
21-
constructor(props) {
22-
super(props);
23-
}
24-
2521
render() {
2622
const { exercise: { location, solutionLocation } } = this.props;
2723
return (

‎src/setup/Markdown.jsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class Markdown extends Component {
4343
source={s}
4444
renderers={{
4545
code: codeRenderer,
46+
link: linkRenderer
4647
}}
4748
/>
4849
);

‎src/setup/ScrollToTop.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import React, { Component } from 'react';
1+
import React from 'react';
22
import { withRouter } from 'react-router';
33

4-
class ScrollToTop extends Component {
4+
class ScrollToTop extends React.Component {
55
componentDidUpdate(prevProps) {
66
if (this.props.location !== prevProps.location) {
77
window.scrollTo(0, 0);

‎src/setup/renderer/CodeBlock.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Lowlight from 'react-lowlight';
33
import js from 'highlight.js/lib/languages/javascript';
44
import xml from 'highlight.js/lib/languages/xml';
55
import 'highlight.js/styles/default.css';
6-
import 'highlight.js/styles/vs2015.css';
6+
import 'highlight.js/styles/dracula.css';
77

88
Lowlight.registerLanguage('js', js);
99
Lowlight.registerLanguage('xml', xml);

‎src/tutorial/01-HelloWorld.md‎

Lines changed: 69 additions & 2 deletions

0 commit comments

Comments
 (0)