diff --git a/components/global-header.tsx b/components/global-header.tsx index 1217b780d..3b083bd60 100644 --- a/components/global-header.tsx +++ b/components/global-header.tsx @@ -1,17 +1,7 @@ -import { - Box, - Container, - Flex, - IconButton, - Image, - Link, - Menu, - MenuButton, MenuItem, - MenuList, - Stack, - Text -} from '@chakra-ui/react'; +import { Box, CloseButton, Container, Flex, IconButton, Image, Link, Stack, Text } from '@chakra-ui/react'; import { HamburgerIcon } from '@chakra-ui/icons'; +import { useState } from 'react'; +import siteConfig from '../content/site.json'; type MenuLinkProps = { text: string; @@ -48,27 +38,49 @@ function DesktopMenuLinks() { } function MobileMenuLinks() { + const [isOpen, setIsOpen] = useState(false); + return ( - - + } + color='white' cursor='pointer' + h='auto' + bg='transparent' + _hover={{ bg: 'transparent' }} + _active={{ bg: 'transparent' }} + _focus={{ bg: 'transparent' }} + onClick={() => setIsOpen(true)} /> - - Roadmaps - Guides - Videos - Subscribe - - + + {isOpen && ( + + Roadmaps + Guides + Videos + YouTube + Subscribe + setIsOpen(false)} pos='fixed' top='3px' right='15px' size='lg' /> + + )} + ); } diff --git a/components/page-header.tsx b/components/page-header.tsx index 2809ff5cb..6a97df0e9 100644 --- a/components/page-header.tsx +++ b/components/page-header.tsx @@ -11,12 +11,12 @@ export function PageHeader(props: PageHeaderProps) { const { title, subtitle, children } = props; return ( - + diff --git a/pages/guides/components/guide-grid-item.tsx b/pages/guides/components/guide-grid-item.tsx index 834565a72..64d26323e 100644 --- a/pages/guides/components/guide-grid-item.tsx +++ b/pages/guides/components/guide-grid-item.tsx @@ -2,6 +2,7 @@ import { Badge, Box, Heading, Link, Text } from '@chakra-ui/react'; type GuideGridItemProps = { title: string; + href: string; subtitle: string; date: string; isNew?: boolean; @@ -14,17 +15,17 @@ const bgColorList = [ ]; export function GuideGridItem(props: GuideGridItemProps) { - const { title, subtitle, date, isNew = false, colorIndex = 0 } = props; + const { title, subtitle, date, isNew = false, colorIndex = 0, href } = props; return ( - + {isNew && New} {date} {title} {subtitle} - + ); } diff --git a/pages/guides/index.tsx b/pages/guides/index.tsx index 18a779a76..83e8ed2e1 100644 --- a/pages/guides/index.tsx +++ b/pages/guides/index.tsx @@ -25,12 +25,13 @@ export default function Guides(props: GuidesProps) { {recentGuides.map((recentGuide, counter) => (