-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add targeted style for inline code * add dark-mode
- Loading branch information
Showing
16 changed files
with
355 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
// custom typefaces | ||
import ThemeProvider from "./src/context/themeProvider" | ||
|
||
import "typeface-montserrat" | ||
import "typeface-merriweather" | ||
|
||
import "./src/styles/main.scss" | ||
|
||
require("prismjs/themes/prism-tomorrow.css") | ||
require("prismjs/plugins/line-numbers/prism-line-numbers.css") | ||
|
||
export const wrapRootElement = ThemeProvider |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React, { useState } from "react" | ||
|
||
export const ThemeContext = React.createContext({ | ||
changeTheme: () => {}, | ||
isDark: false, | ||
}) | ||
|
||
const ThemeProvider = props => { | ||
const [isDark, setTheme] = useState(false) | ||
|
||
return ( | ||
<ThemeContext.Provider | ||
value={{ | ||
isDark, | ||
changeTheme: () => setTheme(!isDark), | ||
}} | ||
> | ||
{props.children} | ||
</ThemeContext.Provider> | ||
) | ||
} | ||
|
||
export default ({ element }) => <ThemeProvider>{element}</ThemeProvider> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.