Skip to content

Commit

Permalink
Merge pull request #130 from HackHPI/feature/website-2.0-features
Browse files Browse the repository at this point in the history
Added Features
  • Loading branch information
DerCed authored Feb 19, 2024
2 parents 63bd8fc + 0d33ef0 commit ab1c4ec
Show file tree
Hide file tree
Showing 5 changed files with 120 additions and 37 deletions.
2 changes: 2 additions & 0 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ import {TimeTable} from "../src/components/TimeTable/TimeTable";
import {Gallery} from "../src/components/Gallery/Gallery";
import {Faq} from "../src/components/Faq/Faq";
import Team from "../src/components/Team/Team";
import {Features} from "../src/components/Features/Features";

export default function Page() {
return (
<>
<LandingImage2/>
<VerifiedChecker />
<WhatToExpect />
<Features/>
<Sponsors />
<Registration/>
<TimeTable />
Expand Down
72 changes: 72 additions & 0 deletions src/components/Features/Features.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
import {Box, Card, Container, Grid, Typography} from "@mui/material";
import {Campaign, Check, ConfirmationNumber, EmojiEvents, MoneyOff} from "@mui/icons-material";
import React from "react";

export function IconContainer(props) {
return (
<Card sx={{
background: "linear-gradient(45deg, rgba(58,12,163,1) 0%, rgba(114,9,183,1) 100%)",
width: "80%",
aspectRatio: "1 / 1",
display: "flex",
justifyContent: "center",
alignItems: "center",
marginBottom: "1rem"
}}>
{React.cloneElement(props.icon, {sx: {color: "white"}, style: {width: "65%", height: "auto"}})}
</Card>
)
}

export function Features() {

const features = [
{
icon: <MoneyOff/>,
title: "Completely free (including food)",
subtitle: "Yes, completely free! This includes challenges, workshops, networking events, meals/snacks, and everything else during the event!"
},
{
icon: <EmojiEvents/>,
title: "Cash prizes totaling up to €3500",
subtitle: "Up for grabs are cash prizes totaling up to €3500, and among other things, €100 for the best meme of the event."
},
{
icon: <ConfirmationNumber/>,
title: "Free tickets for the Urban Innovation Forum in Berlin",
subtitle: "All participants are invited to attend the Urban Innovation Forum in Berlin on March 20th for FREE, hosted by our partner the Climate Tech Hub."
},
{
icon: <Campaign/>,
title: "Pitch your idea at the Greentech Festival in Berlin",
subtitle: "Two of this year’s HackHPI winning team, will have the opportunity to pitch the results at the startup stage of the Greentech Festival in Berlin on May 18th."
}
]

return (
<Container sx={{paddingBottom: 10, paddingTop: 5}}>
<Grid container spacing={7}>
{features.map((feature, i) => (
<Grid item md={6} key={i}>
<Grid container>
<Grid item xs={2}>
<IconContainer icon={feature.icon}/>
</Grid>
<Grid item xs={10} sx={{display: "flex", alignItems: "center"}}>
<Box>
<Typography variant={"h5"} gutterBottom>
{feature.title}
</Typography>
<Typography variant={"body1"} gutterBottom>
{feature.subtitle}
</Typography>
</Box>
</Grid>
</Grid>
</Grid>
))}

</Grid>
</Container>
)
}
5 changes: 3 additions & 2 deletions src/components/Gallery/Gallery.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,10 @@ export function Gallery() {
<Grid item xs={12} md={12}>
<Box sx={{maxHeight: "30rem", overflowY: "scroll"}}>
<ImageList variant="masonry" cols={3} gap={8}>
{faqs[selectedIndex].items.map((item) => (
<ImageListItem key={item.img}>
{faqs[selectedIndex].items.map((item, i) => (
<ImageListItem key={i}>
<img
key={"img"+i}
srcSet={`${item.src}?w=248&fit=crop&auto=format&dpr=2 2x`}
src={`${item.src}?w=248&fit=crop&auto=format`}
alt={item.title}
Expand Down
76 changes: 42 additions & 34 deletions src/components/Registration/Registration.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,34 +193,39 @@ const teamMembers = [
input: ['Name 1'],
max: 100,
required: false,
name: "team1"
},
{
formLabel: 'Team member 2',
type: 1,
input: ['Name 2'],
max: 100,
required: false,
name: "team2"
},
{
formLabel: 'Team member 3',
type: 1,
input: ['Name 3'],
max: 100,
required: false,
name: "team3"
},
{
formLabel: 'Team member 4',
type: 1,
input: ['Name 4'],
max: 100,
required: false,
name: "team4"
},
{
formLabel: 'Team member 5',
type: 1,
input: ['Name 5'],
max: 100,
required: false,
name: "team5"
},
{
formLabel: '',
Expand Down Expand Up @@ -318,7 +323,7 @@ function Registration() {
case 1:
return <TextField
type="text"
placeholder={input}
placeholder={input[0]}
multiline
minRows={rows}
name={name}
Expand All @@ -341,7 +346,7 @@ function Registration() {
onChange={(event) => handleChange(event.target.name, event.target.value)}>
<MenuItem value=""><em>None</em></MenuItem>
{input.map((item, i) => (
<MenuItem value={i}>{item}</MenuItem>
<MenuItem value={i} key={i}>{item}</MenuItem>
))}
</Select>
case 4:
Expand All @@ -352,14 +357,14 @@ function Registration() {
errorCheck
>
{input.map((item, i) => (
<FormControlLabel value={i} control={<Radio/>} label={item}/>
<FormControlLabel value={i} control={<Radio/>} key={i} label={item}/>
))}
</RadioGroup>
case 5:
return <FormControlLabel
control={<Checkbox name={name} checked={values[name] ?? false}
onChange={(event, value) => handleChange(name, value)}/>}
label={input.join("")}/>
control={<Checkbox name={name} checked={values[name] ?? false}
onChange={(event, value) => handleChange(name, value)}/>}
label={input.join("")}/>

default:
return null
Expand Down Expand Up @@ -446,37 +451,40 @@ function Registration() {

</StepLabel>
<StepContent>
<Grid container spacing={3} md={8} xs={12}>
{step.children ? step.children : step.content.map((item, i) => (
<Grid item md={gridItemSize({name: item.name})} xs={12}>
<FormControl fullWidth>
<FormLabel focused={false}>
{item.formLabel}{item.required ? "*" : ""}
</FormLabel>
{contentForm({
type: item.type,
input: item.input,
rows: item.rows,
name: item.name
})}
<FormHelperText>{item.helperText}</FormHelperText>
</FormControl>
</Grid>
))}
<Grid item xs={12}>
<Stack direction={"row"} spacing={2}>
{renderNextButton(index, step)}
{index === steps.length - 1 ? undefined : <Grid item xs={2}>
<Button disabled={index === 0} onClick={handleBack} color={"inherit"}>
Back
</Button>
<Grid container>
<Grid item md={8} xs={12}>
<Grid container spacing={3}>
{step.children ? step.children : step.content.map((item, i) => (
<Grid item md={gridItemSize({name: item.name})} xs={12} key={i}>
<FormControl fullWidth>
<FormLabel focused={false}>
{item.formLabel}{item.required ? "*" : ""}
</FormLabel>
{contentForm({
type: item.type,
input: item.input,
rows: item.rows,
name: item.name
})}
<FormHelperText>{item.helperText}</FormHelperText>
</FormControl>
</Grid>
))}
<Grid item xs={12}>
<Stack direction={"row"} spacing={2}>
{renderNextButton(index, step)}
{index === steps.length - 1 ? undefined : <Grid item xs={2}>
<Button disabled={index === 0} onClick={handleBack}
color={"inherit"}>
Back
</Button>
</Grid>
}
</Stack>
</Grid>
}
</Stack>


</Grid>
</Grid>

</Grid>
</StepContent>
</Step>
Expand Down
2 changes: 1 addition & 1 deletion src/components/WhatToExpect/WhatToExpect.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function WhatToExpect() {
return (
<HackHPIWrapper>

<Container sx={{paddingTop: 10, paddingBottom: 10}}>
<Container sx={{paddingTop: 10, paddingBottom: 7}}>
<Grid container spacing={6} alignItems={"center"}>
<Grid item xs={12} md={8}>
<Typography variant={"h2"} component={"h1"} gutterBottom>
Expand Down

0 comments on commit ab1c4ec

Please sign in to comment.