From b53b0d4952f5e7d98d91231aba21ee3d06297b40 Mon Sep 17 00:00:00 2001 From: Anton Mushnin Date: Thu, 17 Nov 2022 19:47:38 +0300 Subject: [PATCH 01/11] password input eye --- frontend/public/icons/password.svg | 4 ++-- frontend/src/components/SignIn.js | 5 ++++- frontend/src/components/SignUp.js | 5 ++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/frontend/public/icons/password.svg b/frontend/public/icons/password.svg index e4326abb..a30de671 100644 --- a/frontend/public/icons/password.svg +++ b/frontend/public/icons/password.svg @@ -5,11 +5,11 @@ - + - \ No newline at end of file + diff --git a/frontend/src/components/SignIn.js b/frontend/src/components/SignIn.js index 335526aa..6ae31590 100644 --- a/frontend/src/components/SignIn.js +++ b/frontend/src/components/SignIn.js @@ -70,7 +70,10 @@ const SignIn = ({ toggleModal }) => { type={showPassword ? "text" : "password"} ref={register({ required: "Password is required" })} /> - setShowPassword(!showPassword)}> + setShowPassword(!showPassword)} + style={{ cursor: "pointer" }} + > diff --git a/frontend/src/components/SignUp.js b/frontend/src/components/SignUp.js index 41ee6dfc..a326c40b 100644 --- a/frontend/src/components/SignUp.js +++ b/frontend/src/components/SignUp.js @@ -88,7 +88,10 @@ const SignUp = ({ toggleModal }) => { type={showPassword ? "text" : "password"} ref={register({ required: "Password is required" })} /> - setShowPassword(!showPassword)}> + setShowPassword(!showPassword)} + style={{ cursor: "pointer" }} + > From c640c38fdb99e8375e178d4f5967b20dd3c42050 Mon Sep 17 00:00:00 2001 From: Anton Mushnin Date: Sat, 19 Nov 2022 12:25:42 +0300 Subject: [PATCH 02/11] collapse first p of FAQ --- frontend/pages/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/pages/index.js b/frontend/pages/index.js index 0269f6c7..da402252 100644 --- a/frontend/pages/index.js +++ b/frontend/pages/index.js @@ -721,7 +721,7 @@ const Homepage = () => { FAQ - + Date: Sat, 19 Nov 2022 12:27:46 +0300 Subject: [PATCH 03/11] adjust navbar height --- frontend/src/components/LandingNavbar.js | 9 +-------- frontend/src/components/Navbar.js | 4 ++-- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/frontend/src/components/LandingNavbar.js b/frontend/src/components/LandingNavbar.js index d76ab26b..f3365a03 100644 --- a/frontend/src/components/LandingNavbar.js +++ b/frontend/src/components/LandingNavbar.js @@ -4,7 +4,6 @@ import { Button, Image, ButtonGroup, - Spacer, Link, Flex, Menu, @@ -36,7 +35,7 @@ const LandingNavbar = () => { { )} - {ui.isLoggedIn && ui.isMobileView && ( - <> - - - - )} ); }; diff --git a/frontend/src/components/Navbar.js b/frontend/src/components/Navbar.js index c4c451f3..255f0831 100644 --- a/frontend/src/components/Navbar.js +++ b/frontend/src/components/Navbar.js @@ -15,8 +15,8 @@ const Navbar = () => { zIndex={1} alignItems="center" id="Navbar" - minH={isMobileView ? "48px" : "72px"} - maxH={isMobileView ? "48px" : "72px"} + minH={isMobileView && !isAppView ? "89px" : "72px"} + maxH={isMobileView && !isAppView ? "89px" : "72px"} bgColor={BACKGROUND_COLOR} borderBottom="1px solid white" direction="row" From 224610088a6804380effbcd4354aca11856d95e3 Mon Sep 17 00:00:00 2001 From: Anton Mushnin Date: Sat, 19 Nov 2022 12:28:44 +0300 Subject: [PATCH 04/11] calculate hidden navbar top --- frontend/src/components/Scrollable.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/Scrollable.js b/frontend/src/components/Scrollable.js index 42368f67..635aa35c 100644 --- a/frontend/src/components/Scrollable.js +++ b/frontend/src/components/Scrollable.js @@ -27,10 +27,11 @@ const Scrollable = (props) => { } } + const navbar = document.getElementById("Navbar"); if (dir === -1) { - document.getElementById("Navbar").style.top = "-48px"; + navbar.style.top = `${-navbar.offsetHeight}px`; } else { - document.getElementById("Navbar").style.top = "-0"; + navbar.style.top = "-0"; } setY(currentScroll); if (currentScroll > scrollDepth) { @@ -69,6 +70,7 @@ const Scrollable = (props) => { ref={scrollerRef} overflowY="scroll" onScroll={(e) => handleScroll(e)} + // pt="72px" > {props.children} From 9f02ee21b0b12914441a4912b30332427615e5da Mon Sep 17 00:00:00 2001 From: Anton Mushnin Date: Sat, 19 Nov 2022 12:32:13 +0300 Subject: [PATCH 05/11] mobile navbar --- frontend/src/components/LandingBarMobile.js | 97 +++++++++++++++++++-- 1 file changed, 91 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/LandingBarMobile.js b/frontend/src/components/LandingBarMobile.js index 17948e8f..9e988555 100644 --- a/frontend/src/components/LandingBarMobile.js +++ b/frontend/src/components/LandingBarMobile.js @@ -1,18 +1,46 @@ import React, { useContext } from "react"; import RouterLink from "next/link"; -import { Image, Link, Flex, Spacer, Text, Box } from "@chakra-ui/react"; -import { PRIMARY_MOON_LOGO_URL } from "../core/constants"; +import { + Button, + Image, + ButtonGroup, + Spacer, + Link, + Flex, + Menu, + MenuButton, + MenuList, + MenuItem, + Portal, + Text, + Box, +} from "@chakra-ui/react"; + +import { PAGETYPE, SITEMAP, PRIMARY_MOON_LOGO_URL } from "../core/constants"; import { MODAL_TYPES } from "../core/providers/OverlayProvider/constants"; import useModals from "../core/hooks/useModals"; import UIContext from "../core/providers/UIProvider/context"; import PlainButton from "./atoms/PlainButton"; +import ChakraAccountIconButton from "./AccountIconButton"; const LandingBarMobile = () => { const ui = useContext(UIContext); const { toggleModal } = useModals(); return ( - - + + { style={{ marginRight: "12px", fontSize: "14px", + padding: "2px 10px", }} onClick={() => toggleModal({ type: MODAL_TYPES.SIGNUP })} > @@ -52,7 +81,7 @@ const LandingBarMobile = () => { {ui.isLoggedIn && ( { h="25px" textAlign="center" fontSize="14px" - // pb="5px" > App )} + {ui.isLoggedIn && ui.isMobileView && ( + <> + + + )} + + {SITEMAP.map((item, idx) => { + return ( + + {item.type !== PAGETYPE.FOOTER_CATEGORY && item.children && ( + + + {item.title} + + + + {item.children.map((child, idx) => ( + + + {child.title} + + + ))} + + + + )} + + ); + })} + ); }; From fee4e748616a7da89f53b4dce08e87203f624e82 Mon Sep 17 00:00:00 2001 From: Anton Mushnin Date: Sat, 19 Nov 2022 12:32:27 +0300 Subject: [PATCH 06/11] remove unused var --- frontend/src/components/NewDashboardChart.js | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/src/components/NewDashboardChart.js b/frontend/src/components/NewDashboardChart.js index 1416e872..0ce7e68b 100644 --- a/frontend/src/components/NewDashboardChart.js +++ b/frontend/src/components/NewDashboardChart.js @@ -244,7 +244,6 @@ const NewDashboardChart = () => { )} dropdownItem={(item) => { - const badgeColor = color(`${item.color}`); return ( From 9ba9e591697100f5046f1eb578e01d81f0862ddb Mon Sep 17 00:00:00 2001 From: Anton Mushnin Date: Sat, 19 Nov 2022 12:33:20 +0300 Subject: [PATCH 07/11] add menuButton to chakra theme --- frontend/src/Theme/MenuButton/index.js | 26 ++++++++++++++++++++++++++ frontend/src/Theme/theme.js | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 frontend/src/Theme/MenuButton/index.js diff --git a/frontend/src/Theme/MenuButton/index.js b/frontend/src/Theme/MenuButton/index.js new file mode 100644 index 00000000..1d156888 --- /dev/null +++ b/frontend/src/Theme/MenuButton/index.js @@ -0,0 +1,26 @@ +const mobileVariant = () => { + return { + _active: { + backgroundColor: "black.300 !important", + color: "white", + textDecoration: "none", + }, + _focus: { + backgroundColor: "black.300", + color: "white", + textDecoration: "none", + }, + color: "white", + fontSize: "sm", + margin: "0px", + padding: "0px", + }; +}; + +const MenuButton = { + variants: { + mobile: mobileVariant, + }, +}; + +export default MenuButton; diff --git a/frontend/src/Theme/theme.js b/frontend/src/Theme/theme.js index 5cabd994..00adea8a 100644 --- a/frontend/src/Theme/theme.js +++ b/frontend/src/Theme/theme.js @@ -2,6 +2,7 @@ import { extendTheme } from "@chakra-ui/react"; import Button from "./Button"; import Tag from "./Tag"; import Menu from "./Menu"; +import MenuButton from "./MenuButton"; import Input from "./Input"; // import Spinner from "./Spinner"; import NumberInput from "./NumberInput"; @@ -59,6 +60,7 @@ const theme = extendTheme({ Spinner, Tooltip, Heading, + MenuButton, }, fonts: { From 72caf9695eef5846cf01f1c95897354ed0b6f017 Mon Sep 17 00:00:00 2001 From: Anton Mushnin Date: Sat, 19 Nov 2022 12:34:52 +0300 Subject: [PATCH 08/11] ajusting top of landing pages --- frontend/pages/contact/index.js | 1 + frontend/pages/features/index.js | 1 + frontend/pages/privacy-policy/index.js | 2 +- frontend/pages/status/index.js | 1 + frontend/pages/team/index.js | 2 +- frontend/pages/tos/index.js | 4 ++-- frontend/pages/whitepapers.js | 4 +++- 7 files changed, 10 insertions(+), 5 deletions(-) diff --git a/frontend/pages/contact/index.js b/frontend/pages/contact/index.js index 4bc5b9d3..e264ddbd 100644 --- a/frontend/pages/contact/index.js +++ b/frontend/pages/contact/index.js @@ -38,6 +38,7 @@ const Contact = () => { textColor="black" bgColor="white" position="relative" + pt="72px" > { id="container" maxW="container.xl" px={["10%", "10%", "7%", "0"]} + mt="72px" >