Merge pull request #9 from LucidKobold/calender-nav

Added version and pre alpha tag to the navbar.
This commit is contained in:
Lucid Kobold
2021-11-25 19:48:16 -06:00
committed by GitHub

View File

@@ -7,12 +7,17 @@ import {
Flex, Flex,
Menu, Menu,
MenuButton, MenuButton,
VStack,
} from "@chakra-ui/react"; } from "@chakra-ui/react";
import { Icon } from "@iconify/react"; import { Icon } from "@iconify/react";
import DesktopNav from "./DesktopNav"; import DesktopNav from "./DesktopNav";
import MobileNav from "./MobileNav"; import MobileNav from "./MobileNav";
const Header = (): JSX.Element => { const Header = (): JSX.Element => {
const appName = "LCM Potty Chart"
const appVersion = "v0.0.2.3-pre-alpha"
// Add transparency while not at the top of the page. // Add transparency while not at the top of the page.
const [transparentNavbar, setTransparentNavbar] = useState<boolean>(false); const [transparentNavbar, setTransparentNavbar] = useState<boolean>(false);
const lastScroll = useRef<number>(0); const lastScroll = useRef<number>(0);
@@ -94,7 +99,7 @@ const Header = (): JSX.Element => {
h={open ? "125px" : "auto"} h={open ? "125px" : "auto"}
> >
{/* Logo | Site Name */} {/* Logo | Site Name */}
<Flex <HStack
width="100%" width="100%"
justifyContent={{ base: "flex-start", sm: "center" }} justifyContent={{ base: "flex-start", sm: "center" }}
alignItems="center" alignItems="center"
@@ -103,15 +108,19 @@ const Header = (): JSX.Element => {
position="absolute" position="absolute"
ml={4} ml={4}
d={{ base: "flex", lg: "none" }} d={{ base: "flex", lg: "none" }}
spacing="5px"
> >
<Heading as="h1" fontSize="lg"> <Heading as="h1" size="md">
LCM Potty Chart {appName}
</Heading> </Heading>
</Flex> <Heading color="whiteAlpha.500" as="h2" size="sm">
{appVersion}
</Heading>
</HStack>
{/* Desktop Nav Items and Mobile Menu Button */} {/* Desktop Nav Items and Mobile Menu Button */}
<Box h="auto" w="100%" px={4}> <Box h="auto" w="100%" px={4}>
<Flex h={12} alignItems={"center"} justifyContent={"space-between"}> <Flex h={12} alignItems="center" justifyContent="space-between" >
<HStack <HStack
w="100%" w="100%"
h="auto" h="auto"
@@ -120,9 +129,19 @@ const Header = (): JSX.Element => {
> >
<Box w="auto" d={{ base: "flex", lg: "none " }}></Box> <Box w="auto" d={{ base: "flex", lg: "none " }}></Box>
<Box w="100%" d={{ base: "none", lg: "flex" }} m="auto"> <Box w="100%" d={{ base: "none", lg: "flex" }} m="auto">
<HStack
width="100%"
alignItems="center"
height="auto"
spacing="5px"
>
<Heading as="h1" size="md"> <Heading as="h1" size="md">
LCM Potty Chart {appName}
</Heading> </Heading>
<Heading color="whiteAlpha.500" as="h2" size="sm">
{appVersion}
</Heading>
</HStack>
</Box> </Box>
<DesktopNav /> <DesktopNav />
</HStack> </HStack>