diff --git a/src/components/AnimatedLink.js b/src/components/AnimatedLink.js new file mode 100644 index 00000000..199fb66d --- /dev/null +++ b/src/components/AnimatedLink.js @@ -0,0 +1,48 @@ + +import Link from "./Link"; +import Box from "@mui/material/Box"; + +export const AnimatedLink = ({ + color = "white", + hoverColor = "white", + children, + ...rest + }) => ( + + {children} + + ); + + export default AnimatedLink; + \ No newline at end of file diff --git a/src/components/LogoutButton.js b/src/components/LogoutButton.js index 15b44cf2..f4e31211 100644 --- a/src/components/LogoutButton.js +++ b/src/components/LogoutButton.js @@ -1,6 +1,8 @@ import React from "react"; import { navigate } from "gatsby"; import { triggerLogoutEvent } from "@utils/eventTriggers"; +import IconButton from "@mui/material/IconButton"; +import LogoutIcon from "@mui/icons-material/Logout"; export default class LogoutButton extends React.Component { @@ -15,15 +17,29 @@ export default class } render() { - let { isLoggedUser, styles } = this.props; + let { isLoggedUser, styles, ...rest } = this.props; if (isLoggedUser) { return ( -
- -
+ + + ); } else { return null; diff --git a/src/components/Navbar/template.js b/src/components/Navbar/template.js index ccb3b2c2..c76350c4 100644 --- a/src/components/Navbar/template.js +++ b/src/components/Navbar/template.js @@ -1,109 +1,336 @@ import React, { useState } from "react"; - +import Box from "@mui/material/Box"; +import AppBar from "@mui/material/AppBar" +import Container from "@mui/material/Container"; +import Toolbar from "@mui/material/Toolbar"; +import Drawer, { drawerClasses } from "@mui/material/Drawer"; +import Stack from "@mui/material/Stack"; +import Tooltip from "@mui/material/Tooltip"; +import Typography from "@mui/material/Typography"; +import IconButton from "@mui/material/IconButton"; +import SvgIcon from "@mui/material/SvgIcon"; +import Avatar from "@mui/material/Avatar"; import Link from "../Link"; -import ProfilePopupComponent from "../ProfilePopupComponent"; +import AnimatedLink from "../AnimatedLink"; +import ProfilePopupComponent from "@openeventkit/event-site/src/components/ProfilePopupComponent"; import LogoutButton from "../LogoutButton"; import styles from "../../styles/navbar.module.scss"; -const NavbarTemplate = ({ - data, - summit, - isLoggedUser, - idpLoading, - idpProfile, - updateProfile, - updateProfilePicture, - defaultPath, - logo -}) => { - const [active, setActive] = useState(false); - const [showProfile, setShowProfile] = useState(false); - - const toggleHamburger = () => { - // toggle the active boolean in the state - setActive(!active); - }; - - const handleTogglePopup = () => { - if (showProfile) { - document.body.classList.remove("is-clipped"); - } else { - document.body.classList.add("is-clipped"); - } - setShowProfile(!showProfile); - }; - - const navBarActiveClass = active ? styles.isActive : ""; +import { useLocation } from "@reach/router"; +import useMediaQuery from "@mui/material/useMediaQuery"; - return ( - - - - ); -}; - -export default NavbarTemplate; + + + + } + {isLoggedUser && + + + + } + + + + + + + {pages.map((page) => ( + + + {page.title} + + + ))} + {isLoggedUser && idpProfile && + + + + + + } + {isLoggedUser && + + + + } + + + {isLoggedUser && idpProfile && + + } + + ); + } + export default NavbarTemplate; + \ No newline at end of file