-
Notifications
You must be signed in to change notification settings - Fork 95
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
Feat/partnership #96
Feat/partnership #96
Changes from 22 commits
4503fc1
f564d2c
cedbe81
66b2584
360ad79
7f12cbe
e1accc9
64b0102
bb3f961
53b4b0b
b97022f
20650c5
4c62dc1
5edb34f
8e659fc
84250b4
a034489
df3eeb2
703fd90
f038114
6e55ba9
712b9b6
f4f26f3
e3af5ba
9bd2ef3
4754547
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React, { FunctionComponent, ReactNode } from "react"; | ||
import styles from "../../styles/components/box.module.css"; | ||
|
||
type BoxProps = { | ||
children: ReactNode; | ||
}; | ||
|
||
const Box: FunctionComponent<BoxProps> = ({ children }) => { | ||
return <div className={styles.container}>{children}</div>; | ||
}; | ||
|
||
export default Box; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React, { FunctionComponent } from "react"; | ||
import styles from "../../../styles/components/stats.module.css"; | ||
import Box from "../box"; | ||
|
||
type StatElementProps = { | ||
name: string; | ||
value: string; | ||
}; | ||
|
||
const StatElement: FunctionComponent<StatElementProps> = ({ name, value }) => { | ||
return ( | ||
<div className={styles.statElement}> | ||
<Box> | ||
<p className={styles.statValue}>{value}</p> | ||
<p className={styles.statName}>{name}</p> | ||
</Box> | ||
</div> | ||
); | ||
}; | ||
|
||
export default StatElement; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React, { FunctionComponent } from "react"; | ||
import styles from "../../../styles/components/stats.module.css"; | ||
import StatElement from "./statElement"; | ||
|
||
type StatsProps = { | ||
title: string; | ||
stats: { | ||
name: string; | ||
value: string; | ||
}[]; | ||
}; | ||
|
||
const Stats: FunctionComponent<StatsProps> = ({ title, stats }) => { | ||
return ( | ||
<div className={styles.container}> | ||
<h2 className={styles.title}>{title}</h2> | ||
<div className={styles.elementsContainer}> | ||
{stats.map((elt, index) => ( | ||
<StatElement | ||
key={`stats_${index}`} | ||
name={elt.name} | ||
value={elt.value} | ||
/> | ||
))} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Stats; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import shapeStyles from "../../../styles/components/shapes.module.css"; | ||
import VerticalBar from "../../shapes/verticalBar"; | ||
import OnScrollIntoView from "../../animations/onScrollIntoView"; | ||
import styles from "../../../styles/components/steps.module.css"; | ||
import React, { FunctionComponent } from "react"; | ||
|
||
type StepElementProps = { | ||
index: number; | ||
step: Step; | ||
subTitleBefore?: boolean; | ||
steps: Step[]; | ||
}; | ||
|
||
const StepElement: FunctionComponent<StepElementProps> = ({ | ||
index, | ||
step, | ||
subTitleBefore = false, | ||
steps, | ||
}) => { | ||
return ( | ||
<div className={styles.cardContainer}> | ||
<div className={styles.barsContainer}> | ||
<img className={styles.icon} src={step.icon} /> | ||
{index !== steps.length - 1 && ( | ||
<div className={styles.verticalBarContainer}> | ||
<VerticalBar /> | ||
</div> | ||
)} | ||
</div> | ||
<OnScrollIntoView animation="slideInFromTop"> | ||
<div key={"step_card_" + index} className={styles.card}> | ||
<div className={(subTitleBefore && styles.subTitleBefore) || ""}> | ||
{[ | ||
<h1 key={`step_${index}_title`} className={styles.title}> | ||
{step.title} | ||
</h1>, | ||
<h2 key={`step_${index}_subtitle`} className={styles.subtitle}> | ||
{step.subtitle} | ||
</h2>, | ||
].sort(() => (subTitleBefore ? -1 : 1))} | ||
<p className={styles.description}>{step.description}</p> | ||
</div> | ||
<div className={styles.overlay}> | ||
{step.overlay ? step.overlay : null} | ||
</div> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. { step.overlay ?
<div className={styles.overlay}>
step.overlay
</div> : null
} There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. C'est mieux ça nous fait une div en moins |
||
<div> | ||
<img className={styles.banner} src={step.banner} /> | ||
</div> | ||
</div> | ||
</OnScrollIntoView> | ||
</div> | ||
); | ||
}; | ||
|
||
export default StepElement; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import React, { FunctionComponent } from "react"; | ||
import styles from "../../../styles/components/steps.module.css"; | ||
import StepElement from "./stepElement"; | ||
|
||
type StepsProps = { | ||
subTitleBefore?: boolean; | ||
steps: Step[]; | ||
}; | ||
|
||
const Steps: FunctionComponent<StepsProps> = ({ | ||
subTitleBefore = false, | ||
steps, | ||
}) => { | ||
return ( | ||
<div className={styles.container}> | ||
<div className={styles.cards}> | ||
{steps.map((step, index) => ( | ||
<StepElement | ||
index={index} | ||
step={step} | ||
subTitleBefore={subTitleBefore} | ||
key={"step_" + index} | ||
steps={steps} | ||
/> | ||
))} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Steps; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import React, { FunctionComponent } from "react"; | ||
import styles from "../../../styles/components/titles.module.css"; | ||
import Corner from "../../shapes/corner"; | ||
import Squares from "../../shapes/squares"; | ||
|
||
type CategoryTitleProps = { | ||
title: string; | ||
subtitle: string; | ||
corner?: CornerStyle; | ||
squares?: SquareStyle; | ||
}; | ||
|
||
const CategoryTitle: FunctionComponent<CategoryTitleProps> = ({ | ||
title, | ||
subtitle, | ||
corner, | ||
squares, | ||
}) => { | ||
return ( | ||
<div className={styles.container}> | ||
{corner && ( | ||
<div className={[styles.corner, styles[corner]].join(" ")}> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pq tu dois mettre deux classes je ne comprend pas ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Parfois le symbole n'est pas au même endroit. Du coup la première classes "corner" applique le style commun à tous les corners, et l'autre, qui est dynamique va prendre des valeurs telles que "bottomLeft" etc Après c'est la seule idée qui m'est venue à l'esprit. Mais si tu as une autre idée je suis carrément preneur, car j'ai un peu tendance à abuser sur les classes There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok je vois donc là ici pour moi tu dois typer le corner de manière à ce qu'on comprenne que ce n'est pas une string mais un de cette manière on comprend à quoi ça sert. |
||
<Corner /> | ||
</div> | ||
)} | ||
{squares && ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pareil sur le type de square. |
||
<div className={[styles.squares, styles[squares]].join(" ")}> | ||
<Squares /> | ||
</div> | ||
)} | ||
<p className={styles.categorySubtitle}>{subtitle}</p> | ||
<h2 className={styles.categoryTitle}>{title}</h2> | ||
</div> | ||
); | ||
}; | ||
|
||
export default CategoryTitle; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import React, { FunctionComponent } from "react"; | ||
import styles from "../../../styles/components/titles.module.css"; | ||
import Corner from "../../shapes/corner"; | ||
import Squares from "../../shapes/squares"; | ||
|
||
type MainTitleProps = { | ||
title: string; | ||
highlighted: string; | ||
subtitle: string; | ||
corner?: CornerStyle; | ||
squares?: SquareStyle; | ||
}; | ||
|
||
const MainTitle: FunctionComponent<MainTitleProps> = ({ | ||
title, | ||
highlighted, | ||
subtitle, | ||
corner = null, | ||
squares = null, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Ce = est là pour dire Si tu veux ne pas en avoir autant ne pas mettre le composant. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah oui pardon, j'avais enlevé de l'autre composant, mais apparemment j'ai oublié celui ci |
||
}) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. type |
||
return ( | ||
<div className={[styles.container, styles.mainTitleContainer].join(" ")}> | ||
{corner && ( | ||
<div className={[styles.corner, styles[corner]].join(" ")}> | ||
<Corner /> | ||
</div> | ||
)} | ||
{squares && ( | ||
<div className={[styles.squares, styles[squares]].join(" ")}> | ||
<Squares /> | ||
</div> | ||
)} | ||
|
||
<h2 className={styles.mainTitle}> | ||
{title} <strong>{highlighted}</strong> | ||
</h2> | ||
<p className={styles.mainSubtitle}>{subtitle}</p> | ||
</div> | ||
); | ||
}; | ||
export default MainTitle; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import React, { FunctionComponent } from "react"; | ||
import { useInView } from "react-intersection-observer"; | ||
import styles from "../../styles/components/animations.module.css"; | ||
|
||
type OnScrollIntoViewProps = { | ||
animation?: string; | ||
children: React.ReactNode; | ||
callback?: () => void; | ||
}; | ||
|
||
const OnScrollIntoView: FunctionComponent<OnScrollIntoViewProps> = ({ | ||
animation = "", | ||
children, | ||
callback, | ||
}) => { | ||
const [ref, inView] = useInView({ | ||
triggerOnce: true, | ||
rootMargin: "-100px 0px", | ||
onChange: () => callback && callback(), | ||
}); | ||
|
||
return ( | ||
<div | ||
ref={ref} | ||
className={[styles[animation], inView && styles.active].join(" ")} | ||
> | ||
{children} | ||
</div> | ||
); | ||
}; | ||
|
||
export default OnScrollIntoView; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import React from "react"; | ||
import Steps from "../../UI/steps/steps"; | ||
import CategoryTitle from "../../UI/titles/categoryTitle"; | ||
import Crosses from "../../shapes/crosses"; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ne pas sauter de ligne ici |
||
import styles from "../../../styles/components/pages/home/howToParticipate.module.css"; | ||
|
||
const HowToParticipate = () => { | ||
return ( | ||
<section> | ||
<CategoryTitle | ||
title="How to Participate ?" | ||
subtitle="Engage in the Starknet Experience: Unlock New Possibilities" | ||
corner="topLeft" | ||
/> | ||
<div className={styles.stepsContainer}> | ||
<Steps | ||
subTitleBefore={true} | ||
steps={[ | ||
{ | ||
title: "Get Your Stark Domain", | ||
subtitle: "01", | ||
description: | ||
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.", | ||
icon: "/icons/starknet.svg", | ||
banner: "/visuals/getYourStarkDomain.webp", | ||
}, | ||
{ | ||
title: "Collect NFTs in Starknet Quest", | ||
subtitle: "02", | ||
description: | ||
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.", | ||
icon: "/icons/crown.svg", | ||
banner: "/visuals/collectNFTsInStarknetQuest.webp", | ||
}, | ||
{ | ||
title: "Build your Starknet Land", | ||
subtitle: "03", | ||
description: | ||
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.", | ||
icon: "/icons/verified.svg", | ||
banner: "/visuals/buildYourStarknetLand.webp", | ||
}, | ||
]} | ||
/> | ||
<Crosses xDecal={-300} /> | ||
</div> | ||
</section> | ||
); | ||
}; | ||
|
||
export default HowToParticipate; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from "react"; | ||
import styles from "../../styles/components/shapes.module.css"; | ||
|
||
const Corner = () => { | ||
return ( | ||
<svg | ||
className={[styles.shape, styles.corner].join(" ")} | ||
width="23" | ||
height="23" | ||
viewBox="0 0 23 23" | ||
fill="none" | ||
> | ||
<path d="M22 1L1 1L1 22" strokeWidth="2" strokeLinecap="round" /> | ||
</svg> | ||
); | ||
}; | ||
|
||
export default Corner; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from "react"; | ||
import styles from "../../styles/components/shapes.module.css"; | ||
|
||
const Cross = () => { | ||
return ( | ||
<svg | ||
className={[styles.shape, styles.corner].join(" ")} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Au lieu d'utiliser Je trouve ça plus clean tu en penses quoi ? Si toi aussi let's go changer tous tes |
||
width="9" | ||
height="9" | ||
viewBox="0 0 9 9" | ||
fill="none" | ||
> | ||
<path | ||
d="M1 8.5L8.5 1M1.5 1L8.5 8.5" | ||
stroke="#66666F" | ||
strokeLinecap="round" | ||
/> | ||
</svg> | ||
); | ||
}; | ||
|
||
export default Cross; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourquoi cette logique ? C'est trop compliqué encore selon moi. Essayes de penser à qlq chose de plus simple dans le css notamment.