Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the coming soon label. #85

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions components/donateButton.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import Link from 'next/link'
import { Button } from '@chakra-ui/react'

export default function DonateButton() {
const handleClick = () => {
window.open('https://opencollective.com/open-austin', '_blank')
}

return (
<Link
href="https://opencollective.com/open-austin"
target="_blank"
rel="noreferrer"
passHref
<Button
variant="primary"
display={{ base: 'none', md: 'inline-flex' }}
onClick={handleClick}
>
<Button variant="primary" display={{ base: 'none', md: 'inline-flex' }} as="a">
Donate
</Button>
</Link>
Donate
</Button>
)
}
65 changes: 34 additions & 31 deletions components/header.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Image from 'next/image'
import Image from 'next/image';
import {
Box,
Flex,
Expand All @@ -14,19 +14,19 @@ import {
useColorModeValue,
useDisclosure,
Badge,
} from '@chakra-ui/react'
} from '@chakra-ui/react';
import {
HamburgerIcon,
CloseIcon,
ChevronDownIcon,
ChevronRightIcon,
} from '@chakra-ui/icons'
import DonateButton from './donateButton'
import DarkModeSwitch from './darkModeSwitch'
import { Link as NextLink } from './link'
} from '@chakra-ui/icons';
import DonateButton from './donateButton';
import DarkModeSwitch from './darkModeSwitch';
import { Link as NextLink } from './link';

export const Header = () => {
const { isOpen, onToggle } = useDisclosure()
const { isOpen, onToggle } = useDisclosure();

return (
<Box>
Expand Down Expand Up @@ -55,7 +55,7 @@ export const Header = () => {
aria-label={'Toggle Navigation'}
/>
</Flex>
<Flex flex={{ base: 1 }} justify={{ base: 'center', md: 'start' }}>
<Flex flex={{ base9: 1 }} justify={{ base: 'center', md: 'start' }}>
<Link href="/">
<Image
alt="Open Austin's logo; a five-pointed star in orange and black"
Expand Down Expand Up @@ -85,13 +85,13 @@ export const Header = () => {
<MobileNav />
</Collapse>
</Box>
)
}
);
};

const DesktopNav = () => {
const linkColor = useColorModeValue('gray.600', 'gray.200')
const linkHoverColor = useColorModeValue('gray.800', 'white')
const popoverContentBgColor = useColorModeValue('white', 'gray.800')
const linkColor = useColorModeValue('gray.600', 'gray.200');
const linkHoverColor = useColorModeValue('gray.800', 'white');
const popoverContentBgColor = useColorModeValue('white', 'gray.800');

return (
<Stack direction={'row'} spacing={8} align="center">
Expand Down Expand Up @@ -136,8 +136,8 @@ const DesktopNav = () => {
</Box>
))}
</Stack>
)
}
);
};

const DesktopSubNav = ({ label, href, subLabel, wip }: NavItem) => {
return (
Expand Down Expand Up @@ -190,8 +190,8 @@ const DesktopSubNav = ({ label, href, subLabel, wip }: NavItem) => {
</Flex>
</Stack>
</Link>
)
}
);
};

const MobileNav = () => {
return (
Expand All @@ -204,11 +204,11 @@ const MobileNav = () => {
<MobileNavItem key={navItem.label} {...navItem} />
))}
</Stack>
)
}
);
};

const MobileNavItem = ({ label, children, href }: NavItem) => {
const { isOpen, onToggle } = useDisclosure()
const { isOpen, onToggle } = useDisclosure();

return (
<Stack layerStyle="ns" onClick={children && onToggle}>
Expand Down Expand Up @@ -264,17 +264,17 @@ const MobileNavItem = ({ label, children, href }: NavItem) => {
</Stack>
</Collapse>
</Stack>
)
}
);
};

type NavItem = {
label: string
subLabel?: string
children?: Array<NavItem>
href?: string
external?: boolean
wip?: boolean
}
label: string;
subLabel?: string;
children?: Array<NavItem>;
href?: string;
external?: boolean;
wip?: boolean;
};

const NAV_ITEMS: ReadonlyArray<NavItem> = [
{
Expand Down Expand Up @@ -307,8 +307,9 @@ const NAV_ITEMS: ReadonlyArray<NavItem> = [
children: [
{
label: 'Join Slack',
href: 'https://slack.open-austin.org/',
href: '#',
external: true,
wip: true,
},
{
label: 'Onboarding',
Expand Down Expand Up @@ -346,4 +347,6 @@ const NAV_ITEMS: ReadonlyArray<NavItem> = [
},
],
},
]
];

export default Header;
Loading