From 6dbc701f47718093cf99f527bf0177ad0ceb6e5c Mon Sep 17 00:00:00 2001 From: Anton Mushnin Date: Mon, 14 Nov 2022 17:38:00 +0300 Subject: [PATCH 1/3] account menu --- frontend/src/components/AccountIconButton.js | 25 +++++++++-------- frontend/styles/styles.css | 29 ++++++++++++++++++++ 2 files changed, 43 insertions(+), 11 deletions(-) diff --git a/frontend/src/components/AccountIconButton.js b/frontend/src/components/AccountIconButton.js index 85033857..a39daa80 100644 --- a/frontend/src/components/AccountIconButton.js +++ b/frontend/src/components/AccountIconButton.js @@ -6,7 +6,6 @@ import { MenuList, MenuItem, MenuGroup, - MenuDivider, IconButton, chakra, Portal, @@ -33,20 +32,24 @@ const AccountIconButton = (props) => { /> - Security +
Security
- API tokens +
+ API tokens +
- {ui.isMobileView && SITEMAP.map((item, idx) => { if (item.type !== PAGETYPE.FOOTER_CATEGORY && item.children) { @@ -65,14 +68,14 @@ const AccountIconButton = (props) => { ); } })} - - { logout(); }} > Logout - +
diff --git a/frontend/styles/styles.css b/frontend/styles/styles.css index a447c426..b8543673 100644 --- a/frontend/styles/styles.css +++ b/frontend/styles/styles.css @@ -267,3 +267,32 @@ code { linear-gradient(to right, transparent 6px, white 6px), linear-gradient(to bottom, #444 1px, transparent 1px); } + + +.desktop-menu-item { + color: white; + font-weight: 400; + padding-left: 0px; + padding-right: 0px; + margin-bottom: 10px; + height: 22px; + cursor: pointer; +} + +.desktop-menu-item:hover { + color: #F56646; + font-weight: 700; +} + +/* to dont change div size when bolding text. +Need 'title' attr in the longest item's tag*/ +.desktop-menu-item::after { + display: block; + content: attr(title); + font-weight: 700; + height: 1px; + color: transparent; + overflow: hidden; + visibility: hidden; +} + From be00baca14216e6ce61070f4fc745adee8cc7390 Mon Sep 17 00:00:00 2001 From: Anton Mushnin Date: Mon, 14 Nov 2022 21:09:31 +0300 Subject: [PATCH 2/3] navbars sizes --- frontend/src/components/AppNavbar.js | 4 +-- frontend/src/components/LandingNavbar.js | 35 +++++++++++++++++------- frontend/src/components/Navbar.js | 6 ++-- frontend/src/core/constants.js | 2 +- 4 files changed, 31 insertions(+), 16 deletions(-) diff --git a/frontend/src/components/AppNavbar.js b/frontend/src/components/AppNavbar.js index 53450384..44a68bea 100644 --- a/frontend/src/components/AppNavbar.js +++ b/frontend/src/components/AppNavbar.js @@ -107,7 +107,7 @@ const AppNavbar = () => { <> {!ui.isMobileView && ( <> - + { /> - + {SITEMAP.map((item, idx) => { if ( diff --git a/frontend/src/components/LandingNavbar.js b/frontend/src/components/LandingNavbar.js index d49932a4..c874e2ca 100644 --- a/frontend/src/components/LandingNavbar.js +++ b/frontend/src/components/LandingNavbar.js @@ -13,6 +13,8 @@ import { MenuList, MenuItem, Portal, + Box, + Text, } from "@chakra-ui/react"; import { ChevronDownIcon, HamburgerIcon } from "@chakra-ui/icons"; import useModals from "../core/hooks/useModals"; @@ -78,6 +80,7 @@ const LandingNavbar = () => { variant="link" href={item.path} color="black" + fontSize="16px" isActive={!!(router.pathname === item.path)} > {item.title} @@ -89,6 +92,7 @@ const LandingNavbar = () => { as={Button} rightIcon={} color="white" + fontSize="16px" _expanded={{ color: "white" }} > {item.title} @@ -116,6 +120,7 @@ const LandingNavbar = () => { m={0} color="white" fontWeight="400" + fontSize="16px" px="0px" mb="10px" h="22px" @@ -141,17 +146,24 @@ const LandingNavbar = () => { {ui.isLoggedIn && ( - + + App + + )} {!ui.isLoggedIn && ( @@ -160,9 +172,12 @@ const LandingNavbar = () => { variant="solid" onClick={() => toggleModal({ type: MODAL_TYPES.SIGNUP })} size="sm" - fontWeight="bold" + fontWeight="700" borderRadius="2xl" textColor="white" + _hover={{ + backgroundColor: "#F4532F", + }} > Sign up diff --git a/frontend/src/components/Navbar.js b/frontend/src/components/Navbar.js index cde2d082..c4c451f3 100644 --- a/frontend/src/components/Navbar.js +++ b/frontend/src/components/Navbar.js @@ -7,7 +7,7 @@ import LandingNavbar from "./LandingNavbar"; const AppNavbar = React.lazy(() => import("./AppNavbar")); const Navbar = () => { - const { isAppView, isLoggedIn } = useContext(UIContext); + const { isAppView, isLoggedIn, isMobileView } = useContext(UIContext); return ( { zIndex={1} alignItems="center" id="Navbar" - minH="3rem" - maxH="3rem" + minH={isMobileView ? "48px" : "72px"} + maxH={isMobileView ? "48px" : "72px"} bgColor={BACKGROUND_COLOR} borderBottom="1px solid white" direction="row" diff --git a/frontend/src/core/constants.js b/frontend/src/core/constants.js index fec35565..d1c48ca6 100644 --- a/frontend/src/core/constants.js +++ b/frontend/src/core/constants.js @@ -77,7 +77,7 @@ export const SITEMAP = [ children: [ { title: "Docs", - path: "/docs", + path: "https://docs.moonstream.to/", type: PAGETYPE.CONTENT, }, { From 901e85089c811c3c14b5c34616fabf055b40a868 Mon Sep 17 00:00:00 2001 From: Anton Mushnin Date: Mon, 14 Nov 2022 21:16:03 +0300 Subject: [PATCH 3/3] mobile view account button menu --- frontend/src/components/AccountIconButton.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/AccountIconButton.js b/frontend/src/components/AccountIconButton.js index a39daa80..af0577cc 100644 --- a/frontend/src/components/AccountIconButton.js +++ b/frontend/src/components/AccountIconButton.js @@ -57,7 +57,22 @@ const AccountIconButton = (props) => { {item.children.map((child, idx) => { return ( - + {child.title}