From b71ae4c5d95a8129ae9659b98ae23f57e64f3f03 Mon Sep 17 00:00:00 2001 From: cedoor Date: Tue, 7 Nov 2023 12:34:02 +0000 Subject: [PATCH 1/3] refactor(website): make navbar responsive --- apps/website/src/components/Navbar.tsx | 133 ++++++++++++-------- apps/website/src/components/NavbarLinks.tsx | 61 +++++++++ apps/website/src/icons/IconMenu.tsx | 10 ++ apps/website/src/icons/IconThumbsUp.tsx | 13 ++ 4 files changed, 164 insertions(+), 53 deletions(-) create mode 100644 apps/website/src/components/NavbarLinks.tsx create mode 100644 apps/website/src/icons/IconMenu.tsx create mode 100644 apps/website/src/icons/IconThumbsUp.tsx diff --git a/apps/website/src/components/Navbar.tsx b/apps/website/src/components/Navbar.tsx index 15b0dd011..9037e4dc1 100644 --- a/apps/website/src/components/Navbar.tsx +++ b/apps/website/src/components/Navbar.tsx @@ -1,67 +1,94 @@ "use client" -import { Heading, HStack, Link } from "@chakra-ui/react" -import NextLink from "next/link" -import { usePathname } from "next/navigation" +import { + Box, + Divider, + Drawer, + DrawerBody, + DrawerCloseButton, + DrawerContent, + DrawerFooter, + DrawerOverlay, + HStack, + Heading, + IconButton, + Link, + Text, + VStack, + useDisclosure +} from "@chakra-ui/react" import Image from "next/image" -import IconArrowUpRight from "../icons/IconArrowUpRight" +import NextLink from "next/link" +import IconDiscord from "../icons/IconDiscord" +import IconMenu from "../icons/IconMenu" +import IconThumbsUp from "../icons/IconThumbsUp" +import NavbarLinks from "./NavbarLinks" export default function Navbar() { - const pathname = usePathname() + const { isOpen, onOpen, onClose } = useDisclosure() return ( - Semaphore logo + + Semaphore logo + + + Semaphore icon + - - - - Projects - - - - - Learn - - - - - Build - - - - - - Documentation - - - - - - - - Github - - - - + + + + } + /> + + + + + + + + + + + + + + + + + + + + + Discord + + + + + + + + + Give feedback about the website + + + + + + Copyright © 2023 Ethereum Foundation + + + + + ) } diff --git a/apps/website/src/components/NavbarLinks.tsx b/apps/website/src/components/NavbarLinks.tsx new file mode 100644 index 000000000..bf9473433 --- /dev/null +++ b/apps/website/src/components/NavbarLinks.tsx @@ -0,0 +1,61 @@ +"use client" + +import { HStack, Heading, Link } from "@chakra-ui/react" +import NextLink from "next/link" +import { usePathname } from "next/navigation" +import IconArrowUpRight from "../icons/IconArrowUpRight" + +export default function NavbarLinks() { + const pathname = usePathname() + + return ( + <> + + + Projects + + + + + Learn + + + + + Build + + + + + + Documentation + + + + + + + + Github + + + + + + ) +} diff --git a/apps/website/src/icons/IconMenu.tsx b/apps/website/src/icons/IconMenu.tsx new file mode 100644 index 000000000..f286bf868 --- /dev/null +++ b/apps/website/src/icons/IconMenu.tsx @@ -0,0 +1,10 @@ +import { Icon, IconProps } from "@chakra-ui/react" +import React from "react" + +export default function IconMenu(props: IconProps): JSX.Element { + return ( + + + + ) +} diff --git a/apps/website/src/icons/IconThumbsUp.tsx b/apps/website/src/icons/IconThumbsUp.tsx new file mode 100644 index 000000000..862d47dbb --- /dev/null +++ b/apps/website/src/icons/IconThumbsUp.tsx @@ -0,0 +1,13 @@ +import { Icon, IconProps } from "@chakra-ui/react" +import React from "react" + +export default function IconThumbsUp(props: IconProps): JSX.Element { + return ( + + + + ) +} From b3d35b7d8e58b369639f716e4e898a539c759ec0 Mon Sep 17 00:00:00 2001 From: cedoor Date: Tue, 7 Nov 2023 12:50:27 +0000 Subject: [PATCH 2/3] refactor(website): make footbar responsive --- apps/website/src/components/Footer.tsx | 45 +++++++++++++++++--------- 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/apps/website/src/components/Footer.tsx b/apps/website/src/components/Footer.tsx index 48152e326..e78a29d40 100644 --- a/apps/website/src/components/Footer.tsx +++ b/apps/website/src/components/Footer.tsx @@ -1,14 +1,16 @@ -import { Divider, Heading, HStack, Link, Text, VStack } from "@chakra-ui/react" +import { Divider, Heading, HStack, Link, Stack, Text, VStack } from "@chakra-ui/react" import Image from "next/image" import NextLink from "next/link" import IconArrowUpRight from "../icons/IconArrowUpRight" import IconDiscord from "../icons/IconDiscord" +import IconThumbsUp from "../icons/IconThumbsUp" export default function Footer() { return ( - - Semaphore logo - + + Semaphore logo + + Projects @@ -48,22 +50,33 @@ export default function Footer() { - + - - - - - Discord - - - + + + + + + Discord + + + + + + + + + Give feedback about the website + + + - - Copyright © 2023 Ethereum Foundation - + + Copyright © 2023 Ethereum Foundation + + ) } From e739a9abb0e1950a5753c6d2e460b3baf6186287 Mon Sep 17 00:00:00 2001 From: Cedoor Date: Tue, 7 Nov 2023 16:12:27 +0000 Subject: [PATCH 3/3] Update apps/website/src/components/Navbar.tsx Co-authored-by: Vivian Plasencia --- apps/website/src/components/Navbar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/website/src/components/Navbar.tsx b/apps/website/src/components/Navbar.tsx index 9037e4dc1..9b6dd5b6f 100644 --- a/apps/website/src/components/Navbar.tsx +++ b/apps/website/src/components/Navbar.tsx @@ -52,7 +52,7 @@ export default function Navbar() { - +