-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
slighty better for mobile, and has better styling, but needs work
- Loading branch information
Showing
9 changed files
with
5,708 additions
and
448 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,109 +1,127 @@ | ||
import { | ||
Box, | ||
Button, | ||
Image, | ||
Grid, | ||
Heading, | ||
Text, | ||
} from 'theme-ui'; | ||
import { Box, Image, Grid, Heading, Text } from 'theme-ui'; | ||
|
||
const Threebox = () => { | ||
return( | ||
<Grid columns= {[1,1,1,3]}gap = {[50,5,20,0]} sx={{ | ||
mt: '5vh', | ||
width: 'fit-content', | ||
minheight: '40vh', | ||
resize: 'both', | ||
px: '3vw', | ||
textAlign: 'center', | ||
justifyContent: 'center', | ||
flexDirection: 'row', | ||
alignItems: 'center', | ||
backgroundColor: 'rgba(0, 0, 0, 0.31)', | ||
borderRadius: '1rem', | ||
mx: '32px', | ||
mb: '5vh', | ||
padding: '2vh', | ||
}}> | ||
<Box sx={{ | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
display: 'flex', | ||
flexDirection: 'column', | ||
mx: '1vw', | ||
paddingTop: ['0rem', '2rem'], | ||
borderRadius: '20px', | ||
}}> | ||
<Heading as="h4" sx={{ | ||
fontFamily: 'var(--font-inter)', | ||
fontWeight: 900, | ||
fontSize: ['1rem', '1.5vw'], | ||
paddingBottom: '1.2rem', | ||
color: 'white', | ||
textShadow: '0px 4px 4px rgba(0, 0, 0, 0.25)' | ||
} }>Design a PCB</Heading> | ||
<Image sx={{ | ||
width:['28vh', '26vw'], | ||
height:['32vh', '28vw'], | ||
borderRadius: '10px', | ||
paddingBottom: '2rem', | ||
fill: 'true' | ||
}} | ||
src = "https://cloud-qonvrpxwd-hack-club-bot.vercel.app/0image.png" | ||
></Image> | ||
|
||
</Box> | ||
<Box sx={{ | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
display: 'flex', | ||
flexDirection: 'column', | ||
paddingTop: ['1rem', '2rem'], | ||
mx: '1vw', | ||
|
||
textShadow: '0px 4px 4px rgba(0, 0, 0, 0.25)' | ||
}}> | ||
<Heading as="h4" sx={{ | ||
fontFamily: 'var(--font-inter)', | ||
fontWeight: 900, | ||
fontSize: ['1rem', '1.5vw'], | ||
color: 'white', | ||
paddingBottom: '1.2rem' | ||
} }>Design Art</Heading> | ||
<Image sx={{ | ||
width:['28vh', '26vw'], | ||
height:['32vh', '28vw'], | ||
borderRadius: '10px', | ||
paddingBottom: '2rem' | ||
}} src="https://cloud-go1uacpkk-hack-club-bot.vercel.app/0image.png"></Image> | ||
</Box> | ||
<Box sx={{ | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
display: 'flex', | ||
mx: '1vw', | ||
|
||
flexDirection: 'column', | ||
paddingTop: ['0rem', '2rem'], | ||
}}> | ||
<Heading as="h4" sx={{ | ||
fontFamily: 'var(--font-inter)', | ||
fontWeight: 900, | ||
fontSize: ['1rem', '1.5vw'], | ||
paddingBottom: '1.2rem', | ||
color: 'white', | ||
textShadow: '0px 4px 4px rgba(0, 0, 0, 0.25)' | ||
} }>Create Firmware</Heading> | ||
<Image sx={{ | ||
width:['28vh', '26vw'], | ||
height:['32vh', '28vw'], | ||
borderRadius: '10px', | ||
paddingBottom: ['1rem', '2rem'] | ||
}} | ||
src = "https://cloud-ix9a26xw1-hack-club-bot.vercel.app/0image.png" | ||
></Image> | ||
</Box> | ||
</Grid> | ||
) | ||
return ( | ||
<Grid columns={[1, 1, 1, 3]} gap={[20, 20, 20]} sx={{ | ||
mt: '3vh', | ||
maxwidth: '20rem', | ||
px: ['0.5rem', '1rem', '1.5rem'], | ||
textAlign: 'center', | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
backgroundColor: 'rgba(0, 0, 0, 0.31)', | ||
borderRadius: '1rem', | ||
mx: 'auto', | ||
mb: '5vh', | ||
padding: '2.5vh', | ||
}}> | ||
<Box sx={{ | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
display: 'flex', | ||
flexDirection: 'column', | ||
mx: '1vw', | ||
paddingTop: ['1rem', '2rem'], | ||
borderRadius: '20px', | ||
backgroundColor: 'rgba(255, 255, 255, 0.1)', | ||
padding: '1rem', | ||
overflow: 'hidden', | ||
}}> | ||
<Heading as="h4" sx={{ | ||
fontFamily: 'var(--font-inter)', | ||
fontWeight: 900, | ||
fontSize: ['1rem', '1.5vw'], | ||
paddingBottom: '1rem', | ||
color: 'white', | ||
textShadow: '0px 4px 4px rgba(0, 0, 0, 0.25)' | ||
}}>Design a PCB</Heading> | ||
<Image sx={{ | ||
width: '100%', | ||
height: '300px', | ||
borderRadius: '10px', | ||
paddingBottom: '1rem', | ||
objectFit: 'contain', | ||
}} | ||
src="https://cloud-qonvrpxwd-hack-club-bot.vercel.app/0image.png" | ||
/> | ||
<Text sx={{ | ||
fontFamily: 'var(--font-inter)', | ||
fontSize: ['0.8rem', '1rem'], | ||
color: 'white', | ||
textShadow: '0px 4px 4px rgba(0, 0, 0, 0.25)' | ||
}}>Create your own PCB design and bring it to life!</Text> | ||
</Box> | ||
<Box sx={{ | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
display: 'flex', | ||
flexDirection: 'column', | ||
mx: '1vw', | ||
paddingTop: ['1rem', '2rem'], | ||
borderRadius: '20px', | ||
backgroundColor: 'rgba(255, 255, 255, 0.1)', | ||
padding: '1rem', | ||
overflow: 'hidden', | ||
}}> | ||
<Heading as="h4" sx={{ | ||
fontFamily: 'var(--font-inter)', | ||
fontWeight: 900, | ||
fontSize: ['1rem', '1.5vw'], | ||
paddingBottom: '1rem', | ||
color: 'white', | ||
textShadow: '0px 4px 4px rgba(0, 0, 0, 0.25)' | ||
}}>Design Art</Heading> | ||
<Image sx={{ | ||
width: '100%', | ||
height: '300px', | ||
borderRadius: '10px', | ||
paddingBottom: '1rem', | ||
objectFit: 'contain', | ||
}} src="https://cloud-go1uacpkk-hack-club-bot.vercel.app/0image.png" /> | ||
<Text sx={{ | ||
fontFamily: 'var(--font-inter)', | ||
fontSize: ['0.8rem', '1rem'], | ||
color: 'white', | ||
textShadow: '0px 4px 4px rgba(0, 0, 0, 0.25)' | ||
}}>Create stunning art for your PCB design!</Text> | ||
</Box> | ||
<Box sx={{ | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
display: 'flex', | ||
flexDirection: 'column', | ||
mx: '1vw', | ||
paddingTop: ['1rem', '2rem'], | ||
borderRadius: '20px', | ||
backgroundColor: 'rgba(255, 255, 255, 0.1)', | ||
padding: '1rem', | ||
overflow: 'hidden', | ||
}}> | ||
<Heading as="h4" sx={{ | ||
fontFamily: 'var(--font-inter)', | ||
fontWeight: 900, | ||
fontSize: ['1rem', '1.5vw'], | ||
paddingBottom: '1rem', | ||
color: 'white', | ||
textShadow: '0px 4px 4px rgba(0, 0, 0, 0.25)' | ||
}}>Create Firmware</Heading> | ||
<Image sx={{ | ||
width: '100%', | ||
height: '300px', | ||
borderRadius: '10px', | ||
paddingBottom: '1rem', | ||
objectFit: 'contain', | ||
}} | ||
src="https://cloud-ix9a26xw1-hack-club-bot.vercel.app/0image.png" | ||
/> | ||
<Text sx={{ | ||
fontFamily: 'var(--font-inter)', | ||
fontSize: ['0.8rem', '1rem'], | ||
color: 'white', | ||
textShadow: '0px 4px 4px rgba(0, 0, 0, 0.25)' | ||
}}>Develop firmware to control your PCB!</Text> | ||
</Box> | ||
</Grid> | ||
) | ||
} | ||
export default Threebox; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,42 @@ | ||
/** @jsxImportSource theme-ui */ | ||
import { useState } from 'react'; | ||
import React, { useState } from 'react'; | ||
|
||
const FAQItem = ({ question, answer }) => { | ||
interface DropdownProps { | ||
label: string; | ||
options: string[]; | ||
} | ||
|
||
const Dropdown: React.FC<DropdownProps> = ({ label, options }) => { | ||
const [isOpen, setIsOpen] = useState(false); | ||
|
||
return ( | ||
<div | ||
sx={{ | ||
borderBottom: '1px solid #ddd', | ||
padding: '16px 0', | ||
}} | ||
> | ||
<button | ||
<div className="relative inline-block text-left w-full"> | ||
<button | ||
className="flex justify-between w-full rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" | ||
onClick={() => setIsOpen(!isOpen)} | ||
sx={{ | ||
display: 'flex', | ||
justifyContent: 'space-between', | ||
alignItems: 'center', | ||
width: '100%', | ||
background: 'none', | ||
border: 'none', | ||
padding: 0, | ||
fontSize: '18px', | ||
fontWeight: 'bold', | ||
color: '#333', | ||
cursor: 'pointer', | ||
textAlign: 'left', | ||
':hover': { | ||
color: '#0070f3', | ||
}, | ||
}} | ||
> | ||
{question} | ||
<span | ||
sx={{ | ||
transform: isOpen ? 'rotate(90deg)' : 'rotate(0)', | ||
transition: 'transform 0.2s', | ||
}} | ||
> | ||
▶ | ||
</span> | ||
{label} | ||
<svg className="w-5 h-5 ml-2 -mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> | ||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M19 9l-7 7-7-7" /> | ||
</svg> | ||
</button> | ||
|
||
{isOpen && ( | ||
<p | ||
sx={{ | ||
marginTop: '8px', | ||
fontSize: '16px', | ||
color: '#555', | ||
lineHeight: 1.6, | ||
}} | ||
> | ||
{answer} | ||
</p> | ||
<div className="absolute mt-2 w-full rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5"> | ||
<div className="py-1" role="menu" aria-orientation="vertical" aria-labelledby="options-menu"> | ||
{options.map((option, index) => ( | ||
<button | ||
key={index} | ||
className="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 w-full text-left" | ||
role="menuitem" | ||
> | ||
{option} | ||
</button> | ||
))} | ||
</div> | ||
</div> | ||
)} | ||
</div> | ||
); | ||
}; | ||
|
||
const FAQ = ({ items }) => { | ||
return ( | ||
<div | ||
sx={{ | ||
maxWidth: '600px', | ||
margin: '0 auto', | ||
padding: '16px', | ||
}} | ||
> | ||
{items.map((item, index) => ( | ||
<FAQItem key={index} question={item.question} answer={item.answer} /> | ||
))} | ||
</div> | ||
); | ||
}; | ||
|
||
export default FAQ; | ||
export default Dropdown; |
Oops, something went wrong.