From 09de5d18b52cb58800403ca321c6dc64e179505c Mon Sep 17 00:00:00 2001 From: cedoor Date: Fri, 20 Oct 2023 12:55:50 +0100 Subject: [PATCH 1/2] feat(website): create navbar component --- apps/website/public/next.svg | 1 - apps/website/public/semaphore-logo.svg | 13 ++++++ apps/website/public/vercel.svg | 1 - apps/website/src/app/page.tsx | 23 ++++++---- apps/website/src/components/Container.tsx | 11 +++++ apps/website/src/components/Navbar.tsx | 46 ++++++++++++++++++++ apps/website/src/icons/IconArrowUpRight.tsx | 12 ++--- apps/website/src/icons/IconBook.tsx | 12 ++--- apps/website/src/icons/IconBox.tsx | 12 ++--- apps/website/src/icons/IconChevronRight.tsx | 12 ++--- apps/website/src/icons/IconCli.tsx | 12 ++--- apps/website/src/icons/IconCommunity.tsx | 12 ++--- apps/website/src/icons/IconDiscord.tsx | 12 ++--- apps/website/src/icons/IconEye.tsx | 12 ++--- apps/website/src/icons/IconEyelash.tsx | 12 ++--- apps/website/src/icons/IconGroup.tsx | 12 ++--- apps/website/src/icons/IconManageUsers.tsx | 12 ++--- apps/website/src/icons/IconPSE.tsx | 12 ++--- apps/website/src/icons/IconSemaphore.tsx | 12 ++--- apps/website/src/icons/IconSemaphoreLogo.tsx | 12 ++--- apps/website/src/icons/IconTree.tsx | 12 ++--- apps/website/src/icons/IconUser.tsx | 12 ++--- apps/website/src/styles/components/Link.ts | 14 +++++- 23 files changed, 145 insertions(+), 156 deletions(-) delete mode 100644 apps/website/public/next.svg create mode 100644 apps/website/public/semaphore-logo.svg delete mode 100644 apps/website/public/vercel.svg create mode 100644 apps/website/src/components/Container.tsx create mode 100644 apps/website/src/components/Navbar.tsx diff --git a/apps/website/public/next.svg b/apps/website/public/next.svg deleted file mode 100644 index 5174b28c5..000000000 --- a/apps/website/public/next.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/website/public/semaphore-logo.svg b/apps/website/public/semaphore-logo.svg new file mode 100644 index 000000000..82ab73c3e --- /dev/null +++ b/apps/website/public/semaphore-logo.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/apps/website/public/vercel.svg b/apps/website/public/vercel.svg deleted file mode 100644 index d2f842227..000000000 --- a/apps/website/public/vercel.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/website/src/app/page.tsx b/apps/website/src/app/page.tsx index aed2e5076..03de3e533 100644 --- a/apps/website/src/app/page.tsx +++ b/apps/website/src/app/page.tsx @@ -1,15 +1,20 @@ +"use client" + import { Heading, Text, VStack } from "@chakra-ui/react" +import Container from "../components/Container" export default function Home() { return ( - - - Anonymous interactions - - - Using zero knowledge, users can prove their group membership
- and send signals such as votes or endorsements without revealing their original identity. -
-
+ + + + Anonymous interactions + + + Using zero knowledge, users can prove their group membership
+ and send signals such as votes or endorsements without revealing their original identity. +
+
+
) } diff --git a/apps/website/src/components/Container.tsx b/apps/website/src/components/Container.tsx new file mode 100644 index 000000000..650f8b68b --- /dev/null +++ b/apps/website/src/components/Container.tsx @@ -0,0 +1,11 @@ +import { Container as _Container, ContainerProps } from "@chakra-ui/react" +import Navbar from "./Navbar" + +export default function Container({ children }: ContainerProps) { + return ( + <_Container maxW="1440px" px="20"> + + {children} + + ) +} diff --git a/apps/website/src/components/Navbar.tsx b/apps/website/src/components/Navbar.tsx new file mode 100644 index 000000000..94f7055fe --- /dev/null +++ b/apps/website/src/components/Navbar.tsx @@ -0,0 +1,46 @@ +"use client" + +import { HStack, Image, Link } from "@chakra-ui/react" +import { usePathname } from "next/navigation" +import IconArrowUpRight from "../icons/IconArrowUpRight" + +export default function Navbar() { + const pathname = usePathname() + + return ( + + Semaphore logo + + + Projects + + + Learn + + + Build + + + Documentation + + + + Github + + + + + ) +} diff --git a/apps/website/src/icons/IconArrowUpRight.tsx b/apps/website/src/icons/IconArrowUpRight.tsx index a57275593..e12b78a90 100644 --- a/apps/website/src/icons/IconArrowUpRight.tsx +++ b/apps/website/src/icons/IconArrowUpRight.tsx @@ -1,15 +1,9 @@ -import { Icon } from "@chakra-ui/react" +import { Icon, IconProps } from "@chakra-ui/react" import React from "react" -export type IconArrowUpRightProps = { - width?: number - height?: number - color?: string -} - -export default function IconArrowUpRight({ width, height, color }: IconArrowUpRightProps): JSX.Element { +export default function IconArrowUpRight(props: IconProps): JSX.Element { return ( - + + + + ) diff --git a/apps/website/src/icons/IconCli.tsx b/apps/website/src/icons/IconCli.tsx index 05631cd57..45b5a0697 100644 --- a/apps/website/src/icons/IconCli.tsx +++ b/apps/website/src/icons/IconCli.tsx @@ -1,15 +1,9 @@ -import { Icon } from "@chakra-ui/react" +import { Icon, IconProps } from "@chakra-ui/react" import React from "react" -export type IconCliProps = { - width?: number - height?: number - color?: string -} - -export default function IconCli({ width, height, color }: IconCliProps): JSX.Element { +export default function IconCli(props: IconProps): JSX.Element { return ( - + + + + + + + + + + + + ({ + borderBottomColor: "transparent", + borderBottomWidth: "2px", + pb: "5px", + pt: "6px", + _hover: { borderBottomColor: "ceruleanBlue" } + }) } } From 7ca4fb969f68541dac3ee0e47ea66dcd73bb4848 Mon Sep 17 00:00:00 2001 From: cedoor Date: Fri, 20 Oct 2023 16:11:21 +0100 Subject: [PATCH 2/2] refactor(website): add navlink variant to all navbar links --- apps/website/src/components/Navbar.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/website/src/components/Navbar.tsx b/apps/website/src/components/Navbar.tsx index 94f7055fe..92d242558 100644 --- a/apps/website/src/components/Navbar.tsx +++ b/apps/website/src/components/Navbar.tsx @@ -32,11 +32,11 @@ export default function Navbar() { > Build - + Documentation - + Github