2022-01-16 22:27:55 +00:00
|
|
|
import React from "react";
|
|
|
|
import {
|
|
|
|
chakra,
|
|
|
|
Box,
|
|
|
|
Flex,
|
|
|
|
VisuallyHidden,
|
|
|
|
HStack,
|
|
|
|
Button,
|
|
|
|
useDisclosure,
|
|
|
|
VStack,
|
|
|
|
IconButton,
|
|
|
|
CloseButton,
|
|
|
|
Container,
|
|
|
|
Image,
|
|
|
|
useColorModeValue,
|
|
|
|
} from "@chakra-ui/react";
|
|
|
|
import Dark from "components/header/dark";
|
2022-02-18 17:19:05 +00:00
|
|
|
import {
|
|
|
|
IoApps,
|
|
|
|
IoBookOutline,
|
|
|
|
IoCloseSharp,
|
|
|
|
IoLogoGithub,
|
|
|
|
IoLogoTwitter,
|
|
|
|
} from "react-icons/io5";
|
2022-01-16 22:27:55 +00:00
|
|
|
import Link from "next/link";
|
|
|
|
import Hover from "animations/hover";
|
2022-02-18 17:19:05 +00:00
|
|
|
import Show from "animations/show";
|
|
|
|
import { BiLinkExternal } from "react-icons/bi";
|
2022-01-16 22:27:55 +00:00
|
|
|
|
|
|
|
const Header = () => {
|
|
|
|
const mobileNav = useDisclosure();
|
|
|
|
const bg = useColorModeValue("#fffffe", "#16161a");
|
2022-02-18 17:19:05 +00:00
|
|
|
const border = useColorModeValue("0", "1px");
|
|
|
|
const borderRadius = useColorModeValue("10px", "0");
|
|
|
|
|
2022-01-16 22:27:55 +00:00
|
|
|
return (
|
|
|
|
<>
|
2022-02-18 17:19:05 +00:00
|
|
|
<Box
|
2022-01-16 22:27:55 +00:00
|
|
|
w="full"
|
|
|
|
bg={bg}
|
2022-02-18 17:19:05 +00:00
|
|
|
mt="5"
|
|
|
|
mb="5"
|
|
|
|
px={{ base: 3, md: 5 }}
|
|
|
|
py="3"
|
|
|
|
pb="3"
|
|
|
|
borderRadius={borderRadius}
|
|
|
|
borderBottomWidth={border}
|
|
|
|
shadow="sm"
|
2022-01-16 22:27:55 +00:00
|
|
|
pos="sticky"
|
2022-02-18 17:19:05 +00:00
|
|
|
top="2"
|
2022-01-16 22:27:55 +00:00
|
|
|
zIndex="1000"
|
|
|
|
>
|
2022-02-18 17:19:05 +00:00
|
|
|
<Show>
|
2022-01-16 22:27:55 +00:00
|
|
|
<Flex alignItems="center" justifyContent="space-between" mx="auto">
|
2022-01-21 22:30:32 +00:00
|
|
|
<Hover>
|
|
|
|
<Link href="/" passHref>
|
2022-01-16 22:27:55 +00:00
|
|
|
<Flex cursor="pointer">
|
|
|
|
<chakra.a title="iconr" display="flex" alignItems="center">
|
|
|
|
<Image
|
2022-01-21 22:30:32 +00:00
|
|
|
src="/images/logo.png"
|
2022-01-16 22:27:55 +00:00
|
|
|
boxSize="25px"
|
|
|
|
alt="iconr logo"
|
|
|
|
/>
|
|
|
|
<VisuallyHidden>iconr</VisuallyHidden>
|
|
|
|
</chakra.a>
|
|
|
|
<chakra.h1
|
2022-02-18 17:19:05 +00:00
|
|
|
fontSize="2xl"
|
2022-01-16 22:27:55 +00:00
|
|
|
fontWeight="bold"
|
|
|
|
fontFamily="Eina-Bold"
|
|
|
|
ml="3"
|
|
|
|
>
|
|
|
|
iconr
|
|
|
|
</chakra.h1>
|
|
|
|
</Flex>
|
2022-01-21 22:30:32 +00:00
|
|
|
</Link>
|
|
|
|
</Hover>
|
2022-01-16 22:27:55 +00:00
|
|
|
<HStack display="flex" alignItems="center">
|
|
|
|
<HStack
|
|
|
|
spacing={2}
|
|
|
|
color="brand.500"
|
|
|
|
display={{ base: "none", md: "inline-flex" }}
|
|
|
|
>
|
|
|
|
<Link
|
|
|
|
href="https://github.com/pheralb/iconr/tree/main/public/library"
|
|
|
|
passHref
|
|
|
|
>
|
2022-02-18 17:19:05 +00:00
|
|
|
<Button
|
|
|
|
variant="ghost"
|
|
|
|
rightIcon={<BiLinkExternal />}
|
|
|
|
fontWeight="light"
|
|
|
|
>
|
|
|
|
Library
|
|
|
|
</Button>
|
2022-01-16 22:27:55 +00:00
|
|
|
</Link>
|
2022-01-21 22:30:32 +00:00
|
|
|
<Link href="https://twitter.com/iconrhq" passHref>
|
|
|
|
<IconButton
|
|
|
|
aria-label="Twitter profile"
|
|
|
|
bg="transparent"
|
|
|
|
border="0"
|
|
|
|
variant="outline"
|
|
|
|
icon={<IoLogoTwitter size="25" />}
|
|
|
|
/>
|
|
|
|
</Link>
|
2022-01-16 22:27:55 +00:00
|
|
|
<Link href="https://github.com/pheralb/iconr" passHref>
|
|
|
|
<IconButton
|
|
|
|
aria-label="Github Repository"
|
|
|
|
bg="transparent"
|
|
|
|
border="0"
|
|
|
|
variant="outline"
|
|
|
|
icon={<IoLogoGithub size="25" />}
|
|
|
|
/>
|
|
|
|
</Link>
|
|
|
|
<Dark />
|
|
|
|
</HStack>
|
|
|
|
<Box display={{ base: "inline-flex", md: "none" }}>
|
|
|
|
<IconButton
|
|
|
|
display={{ base: "flex", md: "none" }}
|
|
|
|
aria-label="Open menu"
|
|
|
|
fontSize="20px"
|
|
|
|
variant="ghost"
|
|
|
|
icon={<IoApps />}
|
|
|
|
onClick={mobileNav.onOpen}
|
|
|
|
/>
|
|
|
|
<VStack
|
|
|
|
pos="absolute"
|
2022-02-18 17:19:05 +00:00
|
|
|
borderWidth="2px"
|
2022-01-16 22:27:55 +00:00
|
|
|
bg={bg}
|
|
|
|
top={0}
|
|
|
|
left={0}
|
|
|
|
right={0}
|
|
|
|
display={mobileNav.isOpen ? "flex" : "none"}
|
|
|
|
flexDirection="column"
|
2022-02-18 17:19:05 +00:00
|
|
|
pt="4"
|
2022-01-16 22:27:55 +00:00
|
|
|
pb={4}
|
|
|
|
spacing={3}
|
|
|
|
rounded="sm"
|
|
|
|
shadow="sm"
|
|
|
|
>
|
2022-02-18 17:19:05 +00:00
|
|
|
<Button
|
|
|
|
bg="transparent"
|
|
|
|
border="0"
|
|
|
|
variant="outline"
|
|
|
|
leftIcon={<IoCloseSharp size="25" />}
|
|
|
|
fontWeight="light"
|
2022-01-16 22:27:55 +00:00
|
|
|
onClick={mobileNav.onClose}
|
2022-02-18 17:19:05 +00:00
|
|
|
>
|
|
|
|
Close
|
|
|
|
</Button>
|
2022-01-16 22:27:55 +00:00
|
|
|
<Link
|
|
|
|
href="https://github.com/pheralb/iconr/tree/main/public/library"
|
|
|
|
passHref
|
|
|
|
>
|
2022-02-18 17:19:05 +00:00
|
|
|
<Button
|
|
|
|
bg="transparent"
|
|
|
|
border="0"
|
|
|
|
variant="outline"
|
|
|
|
leftIcon={<IoBookOutline size="25" />}
|
|
|
|
fontWeight="light"
|
|
|
|
>
|
|
|
|
Library
|
|
|
|
</Button>
|
2022-01-16 22:27:55 +00:00
|
|
|
</Link>
|
|
|
|
<Link href="https://github.com/pheralb/iconr" passHref>
|
2022-02-18 17:19:05 +00:00
|
|
|
<Button
|
2022-01-16 22:27:55 +00:00
|
|
|
bg="transparent"
|
|
|
|
border="0"
|
|
|
|
variant="outline"
|
2022-02-18 17:19:05 +00:00
|
|
|
leftIcon={<IoLogoGithub size="25" />}
|
|
|
|
fontWeight="light"
|
|
|
|
>
|
|
|
|
Github
|
|
|
|
</Button>
|
2022-01-16 22:27:55 +00:00
|
|
|
</Link>
|
|
|
|
<Dark />
|
|
|
|
</VStack>
|
|
|
|
</Box>
|
|
|
|
</HStack>
|
|
|
|
</Flex>
|
2022-02-18 17:19:05 +00:00
|
|
|
</Show>
|
|
|
|
</Box>
|
2022-01-16 22:27:55 +00:00
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default Header;
|