Skip to content

Commit 1010be4

Browse files
erikvansebillej-atkins
authored andcommitted
Fix getstarted buttons
1 parent 95489cd commit 1010be4

2 files changed

Lines changed: 36 additions & 23 deletions

File tree

src/components/getstarted.js

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
import {
2+
Accordion,
3+
AccordionItem,
4+
AccordionButton,
5+
AccordionPanel,
6+
AccordionIcon,
27
Box,
38
Button,
49
Container,
@@ -17,32 +22,48 @@ import { Heading } from '@/components/mdx'
1722

1823
export const GetStarted = () => {
1924
const getstarted = React.useMemo(() => data, [])
25+
const [activeIndex, setActiveIndex] = React.useState(null)
2026
return (
2127
<Box id={'getstarted'} as='section'>
2228
<Container maxW='container.lg' centerContent>
2329
<Heading as='h1' size='2xl'>
2430
Get started as
2531
</Heading>
2632

27-
<Box my={8}>
33+
<Box my={0} width='100%'>
2834
<Grid
29-
templateColumns={`repeat(${getstarted.length}, minmax(auto, max-content))`}
35+
templateColumns={`repeat(${getstarted.length}, 1fr)`}
3036
gap={6}
31-
my={4}
32-
justifyContent='center'
37+
my={0}
38+
width='100%'
3339
>
34-
{getstarted.map((getstarted, index) => (
40+
{getstarted.map((item, index) => (
3541
<Button
36-
useExternalIcon
37-
as={Link}
38-
// variant={'outline'}
39-
colorScheme={'blue'}
40-
href='{getstarted.url}'
42+
key={index}
43+
bg='blue.400'
44+
color='white'
45+
_hover={{ bg: 'blue.700' }}
46+
borderRadius='md'
47+
width='100%'
48+
height='64px'
49+
fontSize='2xl'
50+
fontWeight='bold'
51+
onClick={() =>
52+
setActiveIndex(activeIndex === index ? null : index)
53+
}
54+
display='flex'
55+
alignItems='center'
56+
justifyContent='center'
4157
>
42-
{getstarted.name}
58+
{item.name}
4359
</Button>
4460
))}
4561
</Grid>
62+
{activeIndex !== null && (
63+
<Box mt={4} width='100%'>
64+
<Text fontSize={'lg'}>{getstarted[activeIndex].text}</Text>
65+
</Box>
66+
)}
4667
</Box>
4768
</Container>
4869
</Box>

src/data/getstarted.js

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,18 @@
11
export const GetStarted = [
22
{
33
name: 'Learner',
4-
// logo_light: '/funders-logos/UUlogo.png',
5-
// logo_dark: '/funders-logos/UUlogo_dia.png',
6-
// url: 'https://www.uu.nl/en',
4+
text: 'As a learner, you will ...',
75
},
86
{
97
name: 'Educator',
10-
// logo_light: '/funders-logos/NIOZlogo.png',
11-
// logo_dark: '/funders-logos/NIOZlogo.png',
12-
// url: 'https://www.nioz.nl/en',
8+
text: 'As an educator, you can use the VirtualShip to ...',
139
},
1410
{
1511
name: 'Researcher',
16-
// logo_light: '/funders-logos/NKOlogo.png',
17-
// logo_dark: '/funders-logos/NKOlogo.png',
18-
// url: 'https://www.nko.nl/en',
12+
text: 'As a researcher, you can use the VirtualShip to ...',
1913
},
2014
{
2115
name: 'Developer',
22-
// logo_light: '/funders-logos/NKOlogo.png',
23-
// logo_dark: '/funders-logos/NKOlogo.png',
24-
// url: 'https://www.nko.nl/en',
16+
text: 'As a developer, you can help improve VirtualShip by ...',
2517
},
2618
]

0 commit comments

Comments
 (0)