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}
>
- )
-}
+)
Layout.propTypes = {
children: PropTypes.node.isRequired,
diff --git a/src/components/seo.js b/src/components/seo.js
new file mode 100644
index 0000000..d8733ce
--- /dev/null
+++ b/src/components/seo.js
@@ -0,0 +1,60 @@
+import React from "react"
+import PropTypes from "prop-types"
+import Helmet from "react-helmet"
+import { useStaticQuery, graphql } from "gatsby"
+
+const SEO = ({ description, lang, meta, title }) => {
+ const { site } = useStaticQuery(
+ graphql`
+ query {
+ site {
+ siteMetadata {
+ title
+ description
+ }
+ }
+ }
+ `
+ )
+
+ const metaDescription = description || site.siteMetadata.description
+
+ return (
+
+ )
+}
+
+SEO.defaultProps = {
+ lang: `ru`,
+ meta: [],
+ description: ``,
+}
+
+SEO.propTypes = {
+ description: PropTypes.string,
+ lang: PropTypes.string,
+ meta: PropTypes.arrayOf(PropTypes.object),
+ title: PropTypes.string.isRequired,
+}
+
+export default SEO
diff --git a/src/styles/header.css b/src/styles/header.css
index 58694bd..72e0752 100644
--- a/src/styles/header.css
+++ b/src/styles/header.css
@@ -3,12 +3,11 @@
a.nav-link { margin-top: 25px; max-height: 62px;}
a.nav-link:hover { background-color: rgb(20, 142, 161); }
a.nav-link a:hover { color: white; text-decoration: none; }
-a.nav-link a#active {
+a[aria-current="page"] {
color: white;
background-color: rgb(20, 142, 161);
padding-top: 12px;
- padding-bottom: 20px;
- }
+}
a.nav-link a {
padding: 12px;
color: rgb(212, 212, 212);
@@ -19,7 +18,7 @@ a.nav-link a {
/* -------------- logo ----------------------- */
img#logo { opacity: 0.7; margin-top: 20px;}
img#logo:hover { opacity: 1;}
-a[aria-current="page"] img#logo { opacity: 1; margin-top: 20px; }
+a[aria-current="page"] img#logo { opacity: 1; margin-top: 20px; background-color: rgb(52,58,64); }
/* ------------------------------------------- */
/* ----- collapse show ---------------------- */
@@ -29,8 +28,7 @@ a[aria-current="page"] img#logo { opacity: 1; margin-top: 20px; }
color: white;
background-color: rgb(20, 142, 161);
padding-top: 11px;
- padding-bottom: 12px;
- }
+ padding-bottom: 12px; }
}
button.navbar-toggler.collapsed { margin-top: 0px; margin-left: 15px; }
@@ -57,3 +55,9 @@ div#navbarSupportedContent.navbar-collapse.collapse.show img#logo{ margin: auto;
width: 100%;
margin: 0;
padding: 0; }
+
+
+@media (max-width: 769px) {
+ a[aria-current="page"] img#logo { margin-top: 0; margin-left: 0; padding-left: 15px }
+ a[aria-current="page"] { padding-top: 0 }
+ }
\ No newline at end of file