removed ssr
This commit is contained in:
parent
d9985ba00d
commit
e4e1871454
@ -1,19 +1,21 @@
|
||||
import React from "react"
|
||||
import {Link} from "gatsby"
|
||||
import logo from "../../images/dataforge/df_logo.png"
|
||||
import { globalHistory as history } from '@reach/router'
|
||||
|
||||
import logo from "../../images/dataforge/df_logo.png"
|
||||
import "../../styles/dataforge/header.css"
|
||||
import "../../styles/bootstrap.min.css"
|
||||
import {Navbar, Nav} from "react-bootstrap"
|
||||
|
||||
const Header = () => {
|
||||
let curActive = [' ', ' ', ' ', ' ', ' ', ' '];
|
||||
if (document.location.pathname === '/dataforge/news'){curActive[0] = 'active';}
|
||||
if (document.location.pathname === '/dataforge/docs'){curActive[1] = 'active';}
|
||||
if (document.location.pathname === '/dataforge/modules'){curActive[2] = 'active';}
|
||||
if (document.location.pathname === '/dataforge/releases'){curActive[3] = 'active';}
|
||||
if (document.location.pathname === '/dataforge/apps'){curActive[4] = 'active';}
|
||||
if (document.location.pathname === '/dataforge/misc'){curActive[5] = 'active';}
|
||||
const { location } = history;
|
||||
if (location.pathname === '/dataforge/news'){curActive[0] = 'active';}
|
||||
if (location.pathname === '/dataforge/docs'){curActive[1] = 'active';}
|
||||
if (location.pathname === '/dataforge/modules'){curActive[2] = 'active';}
|
||||
if (location.pathname === '/dataforge/releases'){curActive[3] = 'active';}
|
||||
if (location.pathname === '/dataforge/apps'){curActive[4] = 'active';}
|
||||
if (location.pathname === '/dataforge/misc'){curActive[5] = 'active';}
|
||||
|
||||
return(
|
||||
<header id="df">
|
||||
|
@ -1,17 +1,19 @@
|
||||
import React from "react"
|
||||
import { Link } from "gatsby"
|
||||
import { globalHistory as history } from '@reach/router'
|
||||
import { push as Menu } from "react-burger-menu"
|
||||
|
||||
const SideBar = ( props ) => {
|
||||
let curActive = [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '];
|
||||
if (document.location.pathname === '/dataforge/docs/'){curActive[0] = 'active';}
|
||||
if (document.location.pathname === '/dataforge/docs/meta'){curActive[1] = 'active';}
|
||||
if (document.location.pathname === '/dataforge/docs/framework'){curActive[2] = 'active';}
|
||||
if (document.location.pathname === '/dataforge/docs/data_flow'){curActive[3] = 'active';}
|
||||
if (document.location.pathname === '/dataforge/docs/envelopes'){curActive[4] = 'active';}
|
||||
if (document.location.pathname === '/dataforge/docs/storage'){curActive[5] = 'active';}
|
||||
if (document.location.pathname === '/dataforge/docs/control'){curActive[6] = 'active';}
|
||||
if (document.location.pathname === '/dataforge/docs/extensions'){curActive[7] = 'active';}
|
||||
var { location } = history;
|
||||
if (location.pathname === '/dataforge/docs/'){curActive[0] = 'active';}
|
||||
if (location.pathname === '/dataforge/docs/meta'){curActive[1] = 'active';}
|
||||
if (location.pathname === '/dataforge/docs/framework'){curActive[2] = 'active';}
|
||||
if (location.pathname === '/dataforge/docs/data_flow'){curActive[3] = 'active';}
|
||||
if (location.pathname === '/dataforge/docs/envelopes'){curActive[4] = 'active';}
|
||||
if (location.pathname === '/dataforge/docs/storage'){curActive[5] = 'active';}
|
||||
if (location.pathname === '/dataforge/docs/control'){curActive[6] = 'active';}
|
||||
if (location.pathname === '/dataforge/docs/extensions'){curActive[7] = 'active';}
|
||||
return(
|
||||
<Menu {...props}>
|
||||
<Link className="menu-item" id={`${curActive[0]}`} to="./dataforge/docs/">1 - How to read this documentation</Link>
|
||||
|
@ -5,12 +5,14 @@ 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'
|
||||
|
||||
const Header = () => {
|
||||
const Header = ( ) => {
|
||||
let curActive = [' ', ' ', ' '];
|
||||
if (document.location.pathname === '/about'){curActive[0] = 'active';}
|
||||
if (document.location.pathname === '/projects/physics' || document.location.pathname === '/projects/education' || document.location.pathname === '/projects/math' || document.location.pathname === '/projects/software'){curActive[1] = 'active';}
|
||||
if (document.location.pathname === '/partners'){curActive[2] = 'active';}
|
||||
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';}
|
||||
|
||||
return(
|
||||
<header>
|
||||
|
Loading…
Reference in New Issue
Block a user