diff --git a/.gitignore b/.gitignore index 7e1e8f0e37..295034ac86 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,7 @@ node_modules out/ cache -.now \ No newline at end of file +.now + +# IntelliJ +.idea \ No newline at end of file diff --git a/components/NextComponents/NextStyledNavBar.tsx b/components/NextComponents/NextStyledNavBar.tsx index 5e13186b90..70b8ebd80b 100644 --- a/components/NextComponents/NextStyledNavBar.tsx +++ b/components/NextComponents/NextStyledNavBar.tsx @@ -1,9 +1,10 @@ -import React, { useState } from 'react' -import { themeColor, themeSecondary } from '../../theme' +import React, { useState,useEffect } from 'react' +import { themeColor, themeHotPink, themeSecondary } from '../../theme' import Link from 'next/link' import { Container, Button } from 'react-bootstrap' import SubscribeModal from '../SignupModal' import { useStateValue } from '../../State/globalState' +import generateGlobalDarkModeStyles from "../../css/darkModeStyles"; interface Props { logo?: JSX.Element @@ -16,6 +17,10 @@ const NextStyledNavBar = (props: Props) => { const [{ sideMenuOpen }, dispatch] = useStateValue() const [showSubscribe, setShowSubscribe] = useState(false) + const [isDarkMode, setIsDarkMode] = useState(false); + + const GlobalStyles = generateGlobalDarkModeStyles(isDarkMode); + var rightLinks = [ @@ -27,6 +32,10 @@ const NextStyledNavBar = (props: Props) => { }, */ + { + name: "darkMode", + component:
setIsDarkMode(!isDarkMode)}>{isDarkMode ? "☀" : "🌙"}
+ }, { name: "projects", @@ -106,6 +115,8 @@ const NextStyledNavBar = (props: Props) => {
+ +