@@ -4,72 +4,128 @@ import Card from '@material-ui/core/Card';
4
4
import CardActions from '@material-ui/core/CardActions' ;
5
5
import CardContent from '@material-ui/core/CardContent' ;
6
6
import Button from '@material-ui/core/Button' ;
7
- import CssBaseline from '@material-ui/core/CssBaseline' ;
8
7
import Typography from '@material-ui/core/Typography' ;
9
8
import Container from '@material-ui/core/Container' ; import { Link , withRouter , RouteComponentProps } from 'react-router-dom' ;
10
-
11
- // import Grid from '@material-ui/core/Grid';
12
-
13
- // import ComponentPanel from '../components/left/ComponentPanel';
14
- // import HTMLPanel from '../components/left/HTMLPanel';
15
-
16
- // Left-hand portion of the app, where component options are displayed
9
+ import Styling from '../constants/Styling' ;
10
+ import MenuBookIcon from '@material-ui/icons/MenuBook' ;
11
+ import LinkIcon from '@material-ui/icons/Link' ;
12
+ import CodeIcon from '@material-ui/icons/Code' ;
13
+ import AddToPhotosIcon from '@material-ui/icons/AddToPhotos' ;
14
+ import TvIcon from '@material-ui/icons/Tv' ;
15
+ import AccountTreeIcon from '@material-ui/icons/AccountTree' ;
16
+ import AddPhotoAlternateIcon from '@material-ui/icons/AddPhotoAlternate' ;
17
+ import StyleIcon from '@material-ui/icons/Style' ;
18
+ import ColorLensIcon from '@material-ui/icons/ColorLens' ;
17
19
18
20
const useStyles = makeStyles ( {
19
21
root : {
20
- width : 300 ,
21
- height : 300 ,
22
22
display : 'flex' ,
23
- margin : 20
23
+ flexDirection : 'column' ,
24
+ width : 350 ,
25
+ height : 300 ,
26
+ margin : 20 ,
27
+ border : `1px solid ${ Styling . darkBlue } ` ,
28
+ backgroundColor : Styling . tutorialGray ,
29
+ color : 'white' ,
24
30
} ,
25
31
bullet : {
26
32
display : 'inline-block' ,
27
33
margin : '0 2px' ,
28
34
transform : 'scale(0.8)' ,
29
35
} ,
30
36
title : {
31
- fontSize : 24 ,
37
+ color : Styling . darkBlue ,
38
+ fontSize : 28 ,
39
+ fontWeight : 500
32
40
} ,
33
41
pos : {
34
42
marginBottom : 12 ,
35
43
margin : 20
36
44
} ,
45
+ icons : {
46
+ color : Styling . darkBlue ,
47
+ fontSize : 125
48
+ } ,
49
+ pageTitle : {
50
+ fontSize : 100 ,
51
+ color : Styling . darkBlue ,
52
+ boxShadow : '2px 2px' ,
53
+ border : `1px solid ${ Styling . darkBlue } ` ,
54
+ padding : '20px' ,
55
+ backgroundColor : 'white' ,
56
+ } ,
57
+ container : {
58
+ display :'flex' ,
59
+ justifyContent : 'center' ,
60
+ flexDirection : 'column' ,
61
+ alignItems : 'center'
62
+ } ,
63
+ wrapper : {
64
+ display :'flex' ,
65
+ justifyContent : 'center' ,
66
+ flexWrap : 'wrap' ,
67
+ width : '75%'
68
+ } ,
69
+ cardWrapper : {
70
+ display : 'flex' ,
71
+ flexDirection : 'column' ,
72
+ flexBasis : '33.333333%'
73
+ } ,
74
+ cardActions : {
75
+ alignSelf :'center' ,
76
+ justifySelf :'center'
77
+ }
37
78
} ) ;
38
79
39
80
const Tutorial : React . FC < RouteComponentProps > = ( ) => {
40
81
const classes = useStyles ( ) ;
41
82
const topics = [ 'Pages' , 'Route Links' , 'Code Preview' , 'Reusable Components' , 'Canvas' , 'Component Tree' , 'HTML Elements' , 'Styling' , 'Customization' ] ;
42
83
const routes = [ '/pages' , '/links' , '/code-preview' , '/reusable-components' , '/canvas' , '/component-tree' , '/html-elements' , '/styling' , '/customization' ] ;
84
+ const icons = [
85
+ < MenuBookIcon className = { classes . icons } /> ,
86
+ < LinkIcon className = { classes . icons } /> ,
87
+ < CodeIcon className = { classes . icons } /> ,
88
+ < AddToPhotosIcon className = { classes . icons } /> ,
89
+ < TvIcon className = { classes . icons } /> ,
90
+ < AccountTreeIcon className = { classes . icons } /> ,
91
+ < AddPhotoAlternateIcon className = { classes . icons } /> ,
92
+ < StyleIcon className = { classes . icons } /> ,
93
+ < ColorLensIcon className = { classes . icons } /> ,
94
+ ] ;
95
+
96
+ const body = document . querySelector ( 'body' ) ;
97
+ body . style . overflowY = 'auto' ;
98
+ body . style . backgroundColor = Styling . tutorialGray ;
99
+
43
100
const cards = topics . map ( ( topic , i ) => {
44
101
return (
45
- < div style = { { display : 'flex' , flexDirection : 'column' , flexBasis : '33.333333%' } } >
46
- < Card className = { classes . root } variant = "elevation" style = { { display : 'flex' , flexDirection : 'column' } } >
102
+ < div key = { `k ${ i } ` } className = { classes . cardWrapper } >
103
+ < Card className = { classes . root } variant = "elevation" >
47
104
< CardContent >
48
105
< Typography className = { classes . title } >
49
106
{ topic }
50
107
</ Typography >
51
108
</ CardContent >
52
- < CardActions >
53
- < Link to = { routes [ i ] } style = { { textDecoration : 'none' } } >
54
- < Button size = "large" > Learn More </ Button >
55
- </ Link >
109
+ < CardActions className = { classes . cardActions } >
110
+ < Link to = { routes [ i ] } style = { { textDecoration : 'none' } } >
111
+ { icons [ i ] }
112
+ </ Link >
56
113
</ CardActions >
57
114
</ Card >
58
115
</ div >
59
116
)
60
- } )
117
+ } ) ;
118
+
61
119
return (
62
- // <div style={{display:'flex', justifyContent: 'center', flexDirection: 'column', alignItems: 'center'}}>
63
- < Container maxWidth = "xl" style = { { display :'flex' , justifyContent : 'center' , flexDirection : 'column' , alignItems : 'center' } } >
64
- < center > < h1 > Reactype Tutorial</ h1 > </ center >
65
- < div style = { { display :'flex' , justifyContent : 'center' , flexWrap : 'wrap' , width : '75%' } } >
120
+ < Container maxWidth = "xl" className = { classes . container } >
121
+ < h1 className = { classes . pageTitle } > Reactype Tutorial</ h1 >
122
+ < div className = { classes . wrapper } >
66
123
{ cards }
67
124
</ div >
68
- < Link to = { `/` } >
125
+ { /* <Link to={`/`}>
69
126
<button>Application</button>
70
- </ Link >
127
+ </Link> */ }
71
128
</ Container >
72
- // </div>
73
129
) ;
74
130
} ;
75
131
0 commit comments