@@ -8,110 +8,110 @@ import Image from '../commons/Image';
8
8
import { royalBlue } from '../../utils/Colors'
9
9
10
10
const styles = theme => ( {
11
- root : {
12
- padding : '3rem 2rem 1rem 2rem' ,
13
- [ theme . breakpoints . up ( 'sm' ) ] : {
14
- padding : '3rem 4rem 1rem 4rem'
15
- } ,
16
- [ theme . breakpoints . up ( 'md' ) ] : {
17
- padding : '3rem 5rem 1rem 5rem'
18
- } ,
11
+ root : {
12
+ padding : '3rem 2rem 1rem 2rem' ,
13
+ [ theme . breakpoints . up ( 'sm' ) ] : {
14
+ padding : '3rem 4rem 1rem 4rem'
19
15
} ,
20
- title : {
21
- marginBottom : '2rem' ,
22
- [ theme . breakpoints . up ( 'sm' ) ] : {
23
- marginBottom : '2rem'
24
- } ,
16
+ [ theme . breakpoints . up ( 'md' ) ] : {
17
+ padding : '3rem 5rem 1rem 5rem'
25
18
} ,
26
- programsContainer : {
27
- maxWidth : 1440 ,
28
- margin : '1rem auto'
19
+ } ,
20
+ title : {
21
+ marginBottom : '2rem' ,
22
+ [ theme . breakpoints . up ( 'sm' ) ] : {
23
+ marginBottom : '2rem'
29
24
} ,
30
- programImageContainer : {
31
- padding : 12 ,
32
- [ theme . breakpoints . up ( 'sm' ) ] : {
33
- paddingRight : 14
34
- } ,
25
+ } ,
26
+ programsContainer : {
27
+ maxWidth : 1440 ,
28
+ margin : '1rem auto'
29
+ } ,
30
+ programImageContainer : {
31
+ padding : 12 ,
32
+ [ theme . breakpoints . up ( 'sm' ) ] : {
33
+ paddingRight : 14
35
34
} ,
36
- programImage : {
37
- width : '100%' ,
38
- height : 150 ,
39
- [ theme . breakpoints . up ( 'sm' ) ] : {
40
- height : 225
41
- } ,
42
- [ theme . breakpoints . up ( 'md' ) ] : {
43
- height : 175
44
- } ,
45
- [ theme . breakpoints . up ( 'lg' ) ] : {
46
- height : 225
47
- } ,
35
+ } ,
36
+ programImage : {
37
+ width : '100%' ,
38
+ height : 150 ,
39
+ [ theme . breakpoints . up ( 'sm' ) ] : {
40
+ height : 225
48
41
} ,
49
- programTitle : {
50
- color : royalBlue
42
+ [ theme . breakpoints . up ( 'md' ) ] : {
43
+ height : 175
51
44
} ,
52
- programDescriptionContainer : {
53
- padding : 12 ,
54
- [ theme . breakpoints . up ( 'sm' ) ] : {
55
- paddingLeft : 14
56
- } ,
45
+ [ theme . breakpoints . up ( 'lg' ) ] : {
46
+ height : 225
57
47
} ,
48
+ } ,
49
+ programTitle : {
50
+ color : royalBlue
51
+ } ,
52
+ programDescriptionContainer : {
53
+ padding : 12 ,
54
+ [ theme . breakpoints . up ( 'sm' ) ] : {
55
+ paddingLeft : 14
56
+ } ,
57
+ } ,
58
58
} )
59
59
60
60
class UpcomingProgramsComponent extends Component {
61
- programsContainer = ( classes , programsData ) => {
62
- const programs = programsData . edges
61
+ programsContainer = ( classes , programsData ) => {
62
+ const programs = programsData . edges
63
63
64
- return (
65
- programs . map ( ( program , index ) => (
66
- < React . Fragment >
67
- < Grid item
68
- className = { classes . programImageContainer }
69
- xs = { 12 } md = { 5 }
70
- >
71
- < Image filename = { program . node . frontmatter . image . relativePath } classProps = { classes . programImage } />
72
- </ Grid >
64
+ return (
65
+ programs . map ( ( program , index ) => (
66
+ < React . Fragment >
67
+ < Grid item
68
+ className = { classes . programImageContainer }
69
+ xs = { 12 } md = { 5 }
70
+ >
71
+ < Image filename = { program . node . frontmatter . image . relativePath } classProps = { classes . programImage } />
72
+ </ Grid >
73
73
74
- < Grid item
75
- className = { classes . programDescriptionContainer }
76
- xs = { 12 } md = { 6 }
77
- >
78
- < Typography className = { classes . programTitle } variant = "h6" gutterBottom > { program . node . frontmatter . name } </ Typography >
79
- < Typography className = { classes . programDescription } variant = "body1" gutterBottom >
80
- { program . node . frontmatter . description }
81
- </ Typography >
82
- < Typography className = { classes . programPeriod } variant = "body1" color = "textSecondary" >
83
- Period: { program . node . frontmatter . period }
84
- </ Typography >
85
- </ Grid >
86
- </ React . Fragment >
87
- ) )
88
- )
89
- }
74
+ < Grid item
75
+ className = { classes . programDescriptionContainer }
76
+ xs = { 12 } md = { 6 }
77
+ >
78
+ < Typography className = { classes . programTitle } variant = "h6" gutterBottom > { program . node . frontmatter . name } </ Typography >
79
+ < Typography className = { classes . programDescription } variant = "body1" gutterBottom >
80
+ { program . node . frontmatter . description }
81
+ </ Typography >
82
+ < Typography className = { classes . programPeriod } variant = "body1" color = "textSecondary" >
83
+ Period: { program . node . frontmatter . period }
84
+ </ Typography >
85
+ </ Grid >
86
+ </ React . Fragment >
87
+ ) )
88
+ )
89
+ }
90
90
91
- render ( ) {
92
- const { programs } = this . props ;
93
- const { classes } = this . props ;
91
+ render ( ) {
92
+ const { programs } = this . props ;
93
+ const { classes } = this . props ;
94
94
95
- return (
96
- < div className = { classes . root } >
97
- < Typography
98
- className = { classes . title }
99
- variant = "h5"
100
- align = "center"
101
- >
102
- Upcoming Programs
95
+ return (
96
+ < div className = { classes . root } >
97
+ < Typography
98
+ className = { classes . title }
99
+ variant = "h5"
100
+ align = "center"
101
+ >
102
+ Upcoming Programs
103
103
</ Typography >
104
104
105
- < Grid container
106
- className = { classes . programsContainer }
107
- justify = "center"
108
- direction = "row"
109
- >
110
- { this . programsContainer ( classes , programs ) }
111
- </ Grid >
112
- </ div >
113
- )
114
- }
105
+ < Grid container
106
+ className = { classes . programsContainer }
107
+ justify = "center"
108
+ direction = "row"
109
+ >
110
+ { this . programsContainer ( classes , programs ) }
111
+ </ Grid >
112
+ </ div >
113
+ )
114
+ }
115
115
}
116
116
117
117
export default withStyles ( styles ) ( UpcomingProgramsComponent ) ;
0 commit comments