diff --git a/src/App.js b/src/App.js index ac44cd3..b08da2c 100755 --- a/src/App.js +++ b/src/App.js @@ -19,10 +19,17 @@ class App extends React.Component { super(props); this.state = { count: 5, - posts1: [] + posts1: [], + isDark: false } } + isDarkTheme = (dark) => { + this.setState({ + isDark: dark + }) + } + componentDidMount() { var newPosts = []; const posts = markdownFiles.forEach( @@ -96,8 +103,10 @@ class App extends React.Component { return (
- - + + ( + + )} />
diff --git a/src/Components/Herocontent.js b/src/Components/Herocontent.js index d1de961..71b7b6b 100755 --- a/src/Components/Herocontent.js +++ b/src/Components/Herocontent.js @@ -1,7 +1,7 @@ import React, { Fragment } from 'react'; import Main from './Main'; -const Herocontent = () => ( +const Herocontent = (props) => (
@@ -32,7 +32,7 @@ const Herocontent = () => (
-
+
); diff --git a/src/Components/Main.js b/src/Components/Main.js index 54033ae..736c501 100755 --- a/src/Components/Main.js +++ b/src/Components/Main.js @@ -18,7 +18,7 @@ class Main extends React.Component { render() { return ( -
+
{ titleMetaData.map((title) =>
diff --git a/src/Components/Navigation.js b/src/Components/Navigation.js index a692784..22941a2 100755 --- a/src/Components/Navigation.js +++ b/src/Components/Navigation.js @@ -1,13 +1,13 @@ import React from "react"; import { Link } from 'react-router-dom'; -const Navigation = () => { +const Navigation = (props) => { const [currentmode, changeState] = React.useState("Light Mode"); const DocBody = document.getElementById("Apptheme"); const changemode = () => { currentmode === "Light Mode" - ? ((DocBody.className = "thememain-dark"), changeState("Dark Mode")) - : ((DocBody.className = "thememain-white "), changeState("Light Mode")); + ? ((DocBody.className = "thememain-dark"), changeState("Dark Mode"), props.dark(true)) + : ((DocBody.className = "thememain-white "), changeState("Light Mode"), props.dark(false)); }; return (
diff --git a/src/style.css b/src/style.css index 4aad62c..37129eb 100755 --- a/src/style.css +++ b/src/style.css @@ -37,6 +37,10 @@ background: #fff; } +.thememain-white h3 { + color: #333; +} + .thememain-white .thememain-header { background: linear-gradient(165deg, #6e60cc, #484389); color: #fff;