generated from acmucsd/website-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from acmucsd/FAQ
added FAQ page
- Loading branch information
Showing
13 changed files
with
774 additions
and
350 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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import FAQ from '@/sections/FAQ'; | ||
|
||
export default function Home() { | ||
return ( | ||
<main> | ||
<FAQ /> | ||
</main> | ||
); | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,69 @@ | ||
'use client'; | ||
|
||
import { useState } from 'react'; | ||
import Accordion from '@mui/material/Accordion'; | ||
import AccordionSummary from '@mui/material/AccordionSummary'; | ||
import AccordionDetails from '@mui/material/AccordionDetails'; | ||
import Typography from '@mui/material/Typography'; | ||
import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; | ||
import s from './style.module.css'; | ||
import { ThemeProvider, createTheme } from '@mui/material'; | ||
import { DM_Sans } from 'next/font/google'; | ||
|
||
const dmSans = DM_Sans({ subsets: ['latin'] }); | ||
|
||
interface FaqProps { | ||
data: { question: string; answer: string | any }[]; | ||
} | ||
|
||
const theme = createTheme({ | ||
typography: { | ||
fontFamily: dmSans.style.fontFamily, | ||
}, | ||
}); | ||
|
||
export default function FAQ({ data }: FaqProps) { | ||
const [expandedIndex, setExpandedIndex] = useState<number>(-1); | ||
|
||
const handleChange = | ||
(panelIndex: number) => (event: React.SyntheticEvent, newExpanded: boolean) => { | ||
setExpandedIndex(newExpanded ? panelIndex : -1); | ||
}; | ||
|
||
return ( | ||
<ThemeProvider theme={theme}> | ||
{data.map((questionObject, index) => ( | ||
<Accordion | ||
disableGutters | ||
elevation={0} | ||
expanded={expandedIndex === index} | ||
onChange={handleChange(index)} | ||
sx={{ | ||
padding: '1rem', | ||
borderRadius: '0.75rem !important', | ||
boxShadow: 'none', | ||
margin: '20px 0', | ||
'&.Mui-expanded': { | ||
margin: 0, | ||
}, | ||
'&:before': { | ||
display: 'none', | ||
}, | ||
}} | ||
key={questionObject.question} | ||
> | ||
<AccordionSummary expandIcon={<ExpandMoreIcon className={s.header} />}> | ||
<Typography sx={{ fontSize: 20, fontWeight: 'bold' }}> | ||
{questionObject.question} | ||
</Typography> | ||
</AccordionSummary> | ||
<AccordionDetails className={s.description}> | ||
<Typography component="div" sx={{ fontSize: 16 }}> | ||
<div>{questionObject.answer}</div> | ||
</Typography> | ||
</AccordionDetails> | ||
</Accordion> | ||
))} | ||
</ThemeProvider> | ||
); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.header { | ||
background-color: transparent; | ||
font-size: 1.25rem; | ||
font-weight: bolder; | ||
border-color: none; | ||
box-shadow: none; | ||
} | ||
|
||
.description { | ||
font-size: 1rem; | ||
font-weight: bolder; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
const data = { | ||
students: [ | ||
{ | ||
question: 'How can I register for DiamondHacks? Are there any deadlines?', | ||
answer: ( | ||
<p> | ||
You can sign up for DiamondHacks using{' '} | ||
<a | ||
href="https://acmurl.com/diamondhacks-preregister" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
this link | ||
</a> | ||
! Applications are due on April 4th! | ||
</p> | ||
), | ||
}, | ||
{ | ||
question: 'Do I need prior experience in coding to participate?', | ||
answer: | ||
'No, hackers of any experience levels are welcome! DiamondHacks will provide a wide range of project tracks, including tracks for first time hackers.', | ||
}, | ||
{ | ||
question: 'Will DiamondHacks be online or in-person?', | ||
answer: | ||
'DiamondHacks is an in-person hackathon taking place at UC San Diego. Check back soon for details on the venue!', | ||
}, | ||
{ | ||
question: 'Who can attend DiamondHacks? Is there an age limit?', | ||
answer: | ||
'Undergraduate students enrolled in any college/university are eligible to attend DiamondHacks!', | ||
}, | ||
{ | ||
question: 'Where is the schedule of events?', | ||
answer: | ||
'The detailed hackathon schedule will be released soon! For now, hacking is scheduled to start on Saturday at noon and end Sunday evening! We’ll also have lots of fun events, panels, workshops, and activities!', | ||
}, | ||
{ | ||
question: 'Will DiamondHacks cover my lodging or transportation?', | ||
answer: | ||
'Unfortunately, we are unable to offer overnight lodging or transportation reimbursements due to school policy. Venues will close at 9pm and you will be responsible for finding your own lodging.', | ||
}, | ||
{ | ||
question: 'Who can I reach out to for questions or concerns?', | ||
answer: | ||
'Please reach out to [email protected] with any questions or concerns about DiamondHacks!', | ||
}, | ||
], | ||
}; | ||
|
||
export default data; |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import Faq from '../../components/Faq'; | ||
import faqData from './faq'; | ||
import s from './style.module.css'; | ||
|
||
export default function FAQ() { | ||
return ( | ||
<div className={s.background} id="faq"> | ||
<div className={s.faqContainer}> | ||
<h3 className={s.faqTitle}>FAQs</h3> | ||
<div className={s.faqBox}> | ||
<Faq data={faqData.students} /> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.background { | ||
min-height: 100vh; | ||
} | ||
|
||
.faqContainer { | ||
display: flex; | ||
align-items: center; | ||
flex-direction: column; | ||
} | ||
|
||
.faqTitle { | ||
font-size: 4.125rem; | ||
margin-bottom: 3rem; | ||
margin-top: 8rem; | ||
} |
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
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
Oops, something went wrong.