diff --git a/src/components/header.js b/src/components/header.js index 8845f84..3d885d2 100644 --- a/src/components/header.js +++ b/src/components/header.js @@ -1,20 +1,25 @@ import React from "react" -import { Link } from "gatsby" import logo from "../images/index/logo_white.png" import "bootstrap/dist/css/bootstrap.css" import "../styles/header.css" import {Navbar, Nav} from "react-bootstrap" -import { globalHistory as history } from '@reach/router' +import { Link } from '@reach/router' -const Header = ( ) => { - let curActive = [' ', ' ', ' ']; - const { location } = history; - if (location.pathname=== '/about'){curActive[0] = 'active';} - if (location.pathname=== '/projects/physics' || location.pathname === '/projects/education' || location.pathname === '/projects/math' || location.pathname === '/projects/software'){curActive[1] = 'active';} - if (location.pathname=== '/partners'){curActive[2] = 'active';} +const NavLink = props => ( + { + return { + style: { + color: isCurrent ? "white" : "rgb(230, 221, 221)" + } + }; + }} + /> +); - return( +const Header = ( ) => (
@@ -22,15 +27,14 @@ const Header = ( ) => {
) -} export default Header diff --git a/src/components/layout.js b/src/components/layout.js index 0aec647..583e46f 100644 --- a/src/components/layout.js +++ b/src/components/layout.js @@ -1,25 +1,31 @@ import React from "react" import PropTypes from "prop-types" +import favicon from "../images/icon.png" +import Helmet from "react-helmet" + import Header from "./header" import Footer from "./footer" +import SEO from "./seo" import "../styles/layout.css" import "../styles/bootstrap.min.css" import "../styles/main.css" import "katex/dist/katex.min.css" -const Layout = ({ children }) => { - return ( +const Layout = ({ children }) => ( <> + + + +
{children}