summaryrefslogtreecommitdiff
path: root/components/topnav.tsx
diff options
context:
space:
mode:
authorMichał Sapka <michal@sapka.me>2023-01-02 22:12:38 +0100
committerMichał Sapka <michal@sapka.me>2023-01-02 22:12:38 +0100
commit679e6588d1ef6709f9e579f8ab2fa1b3ad2ac9d8 (patch)
treefe99580d72ae2f8a2b6dd4f97e8009fe616591c0 /components/topnav.tsx
parent8b1cecc8f08e8145173c94f6236cf843073a37f4 (diff)
feat: remove old
Diffstat (limited to 'components/topnav.tsx')
-rw-r--r--components/topnav.tsx81
1 files changed, 0 insertions, 81 deletions
diff --git a/components/topnav.tsx b/components/topnav.tsx
deleted file mode 100644
index e84ef73..0000000
--- a/components/topnav.tsx
+++ /dev/null
@@ -1,81 +0,0 @@
-import {
- Link,
- Box,
- HStack,
- Icon,
- IconButton,
- Menu,
- MenuButton,
- MenuList,
- MenuItem,
- Container,
- useMediaQuery,
- useColorModeValue
-} from '@chakra-ui/react'
-import { GiHamburgerMenu } from "react-icons/gi"
-import { DiGithubBadge } from "react-icons/di"
-import ThemeToggleButton from "../components/toggle_theme_button"
-import Image from "../lib/next_image"
-
-import LogoLight from "../public/images/logo_light.png"
-import LogoDark from "../public/images/logo_dark.png"
-
-function MobileNav() {
- return <>
- <Menu>
- <MenuButton as={IconButton} icon={<GiHamburgerMenu/>}>
- Action
- </MenuButton>
- <MenuList>
- <MenuItem icon={<DiGithubBadge/>}>View source</MenuItem>
- </MenuList>
- </Menu>
- </>
-}
-
-function DesktopNav() {
- return <HStack>
- <Box flex="1">
- <Link variant="topnav-link" href="https://github.com/michalsapka/michal-sapka-pl"> <Icon as={DiGithubBadge}/> Source code</Link>
- </Box>
- </HStack>
-}
-
-
-export default function Navbar() {
- const [isMobile] = useMediaQuery("(max-width: 768px)")
- return <Box
- as="header"
- position="fixed"
- backdropFilter="auto"
- backdropBlur="6px"
- backdropBrightness={useColorModeValue("1.1", "1")}
- width="100%"
- pt="5px"
- zIndex="9000"
- >
- <Container
- maxW="xl"
- mt="0"
- mb="1"
- >
- <HStack>
- <Box minW="170px" h={["22px", "22px", "30px", "30px"]} flex="0" >
- <Image
- height="24px"
- width="165px"
- quality="100"
- src={useColorModeValue(LogoLight, LogoDark)}
- />
- </Box>
- <Box flex="1">
- {isMobile ? null : <DesktopNav/>}
- </Box>
- <ThemeToggleButton/>
- {isMobile ? <MobileNav/> : null}
- </HStack>
- </Container>
- </Box>
-}
-
-