File tree 7 files changed +82
-172
lines changed
7 files changed +82
-172
lines changed Original file line number Diff line number Diff line change
1
+ const red = require ( "@material-ui/core/colors/red" ) . default
2
+ const blue = require ( "@material-ui/core/colors/blue" ) . default
3
+
1
4
module . exports = {
2
5
siteMetadata : {
3
6
title : "Ohjelmoinnin MOOC 2019" ,
@@ -144,6 +147,43 @@ module.exports = {
144
147
{
145
148
resolve : "gatsby-transformer-moocfi-exercises"
146
149
} ,
150
+ {
151
+ resolve : 'gatsby-plugin-material-ui' ,
152
+ options : {
153
+ theme : {
154
+ palette : {
155
+ primary : {
156
+ light : blue [ 300 ] ,
157
+ main : blue [ 500 ] ,
158
+ dark : blue [ 700 ] ,
159
+ } ,
160
+ secondary : {
161
+ light : red [ 300 ] ,
162
+ main : red [ 500 ] ,
163
+ dark : red [ 700 ] ,
164
+ } ,
165
+ } ,
166
+ typography : {
167
+ useNextVariants : true ,
168
+ } ,
169
+ overrides : {
170
+ MuiButton : {
171
+ root : {
172
+ textTransform : "none" ,
173
+ } ,
174
+ } ,
175
+ MuiTypography : {
176
+ body2 : {
177
+ fontSize : "16px" ,
178
+ } ,
179
+ subheading : {
180
+ fontSize : "18px" ,
181
+ } ,
182
+ } ,
183
+ } ,
184
+ }
185
+ }
186
+ } ,
147
187
`gatsby-plugin-meta-redirect` // make sure to put last in the array
148
188
]
149
189
} ;
Original file line number Diff line number Diff line change 5
5
*/
6
6
7
7
// You can delete this file if you're not using it
8
- /* eslint-disable react/no-danger */
9
-
10
- const React = require ( 'react' )
11
- const { renderToString } = require ( 'react-dom/server' )
12
- const JssProvider = require ( 'react-jss/lib/JssProvider' ) . default
13
- const getPageContext = require ( './src/getPageContext' ) . default
14
-
15
- function replaceRenderer ( {
16
- bodyComponent,
17
- replaceBodyHTMLString,
18
- setHeadComponents,
19
- } ) {
20
- // Get the context of the page to collected side effects.
21
- const muiPageContext = getPageContext ( )
22
-
23
- const bodyHTML = renderToString (
24
- < JssProvider registry = { muiPageContext . sheetsRegistry } >
25
- { bodyComponent }
26
- </ JssProvider >
27
- )
28
-
29
- replaceBodyHTMLString ( bodyHTML )
30
- setHeadComponents ( [
31
- < style
32
- type = "text/css"
33
- id = "jss-server-side"
34
- key = "jss-server-side"
35
- dangerouslySetInnerHTML = { {
36
- __html : muiPageContext . sheetsRegistry . toString ( ) ,
37
- } }
38
- /> ,
39
- ] )
40
- }
41
-
42
- exports . replaceRenderer = replaceRenderer
43
-
44
- // It's not ready yet: https://github.com/gatsbyjs/gatsby/issues/8237.
45
- //
46
- // const withRoot = require('./src/withRoot').default;
47
- // const WithRoot = withRoot(props => props.children);
48
-
49
- // exports.wrapRootElement = ({ element }) => {
50
- // return <WithRoot>{element}</WithRoot>;
51
- // };
Original file line number Diff line number Diff line change 19
19
"gatsby-plugin-catch-links" : " ^2.0.9" ,
20
20
"gatsby-plugin-google-analytics" : " ^2.0.8" ,
21
21
"gatsby-plugin-manifest" : " ^2.0.13" ,
22
+ "gatsby-plugin-material-ui" : " ^1.2.4" ,
22
23
"gatsby-plugin-meta-redirect" : " ^1.1.1" ,
23
24
"gatsby-plugin-react-helmet" : " ^3.0.5" ,
24
25
"gatsby-plugin-sharp" : " ^2.0.17" ,
35
36
"gatsby-transformer-remark" : " ^2.1.19" ,
36
37
"interactjs" : " ^1.3.4" ,
37
38
"jquery" : " ^3.3.1" ,
38
- "pdf-slideshow" : " ^0.1.4" ,
39
39
"moment" : " ^2.24.0" ,
40
+ "pdf-slideshow" : " ^0.1.4" ,
40
41
"prismjs" : " ^1.15.0" ,
41
42
"react" : " ^16.7.0" ,
42
43
"react-dom" : " ^16.7.0" ,
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import ContentArea from "../components/ContentArea"
5
5
import TopBar from "../components/TopBar"
6
6
import { StaticQuery , graphql } from "gatsby"
7
7
import * as store from "store"
8
- import withMaterialUiRoot from "./withMaterialUiRoot"
9
8
import Pheromones from "../util/pheromones"
10
9
import styled from "styled-components"
11
10
@@ -30,6 +29,7 @@ import {
30
29
MEDIUM_LARGE_BREAKPOINT ,
31
30
SMALL_MEDIUM_BREAKPOINT ,
32
31
} from "../util/constants"
32
+ import withSimpleErrorBoundary from "../util/withSimpleErrorBoundary"
33
33
34
34
fontAwesomeConfig . autoAddCss = false
35
35
@@ -169,4 +169,4 @@ class Layout extends React.Component {
169
169
}
170
170
}
171
171
172
- export default withMaterialUiRoot ( Layout )
172
+ export default withSimpleErrorBoundary ( Layout )
You can’t perform that action at this time.
0 commit comments