-
Notifications
You must be signed in to change notification settings - Fork 146
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
Refactor Home page and replace current index /quests #962
Merged
Merged
Changes from 13 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
a3bacda
- added markup. WIP page needs to be adaptive
baitcode cb1c4c3
fixup
baitcode 93c16e5
fix
baitcode 4d46911
fixup
baitcode 8ec533b
- links update
baitcode e1dc6c7
fixup
baitcode ee09fcb
reaname to hero
baitcode 1f5056f
rename to hero
baitcode 2e3a4a9
Added CallToAction
baitcode 8be6ab9
Added gsapi library for animations
baitcode 34e6e85
* removed gsapi, added motion
baitcode 29b21bc
some sinplifications
baitcode 9b0e9a4
simpler
baitcode 6c559bb
increased precision of coordinates
baitcode 5c2f170
Review comments fixup
baitcode 360173d
coderabbitai comments fix
baitcode 20cecf0
downgraded eslint
baitcode 4aa7ec1
code rabbit
baitcode b13431f
added mui system
baitcode 3b14957
revert dependency chages
baitcode baeafad
revert deps
baitcode 3efe112
another attempt
baitcode File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,66 @@ | ||
"use client"; | ||
import React, { useContext } from "react"; | ||
import styles from "@styles/Home.module.css"; | ||
import { useRouter } from "next/navigation"; | ||
import HowToParticipate from "@components/pages/home/howToParticipate"; | ||
import Stats from "@components/UI/stats/stats"; | ||
import Blur from "@components/shapes/blur"; | ||
import { QuestsContext } from "@context/QuestsProvider"; | ||
import FeaturedQuest from "@components/UI/featured_banner/featuredQuest"; | ||
import QuestAndCollectionTabs from "@components/pages/home/questAndCollectionTabs"; | ||
import CategoryTitle from "@components/UI/titles/categoryTitle"; | ||
|
||
export default function Page() { | ||
const router = useRouter(); | ||
const { featuredQuest, categories, trendingQuests, quests } = | ||
useContext(QuestsContext); | ||
fricoben marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
return ( | ||
<div className={styles.screen}> | ||
<div className={styles.container}> | ||
<div className={styles.blur1}> | ||
<Blur /> | ||
</div> | ||
<div className={styles.featured_quest_banner_container}> | ||
<FeaturedQuest | ||
heading="Featured" | ||
key={featuredQuest?.id} | ||
title={featuredQuest?.title_card} | ||
onClick={() => router.push(`/quest/${featuredQuest?.id}`)} | ||
imgSrc={featuredQuest?.img_card} | ||
issuer={{ | ||
name: featuredQuest?.issuer ?? "", | ||
logoFavicon: featuredQuest?.logo ?? "", | ||
}} | ||
reward={featuredQuest?.rewards_title} | ||
desc={featuredQuest?.desc} | ||
expiry={featuredQuest?.expiry_timestamp} | ||
questId={featuredQuest?.id} | ||
/> | ||
</div> | ||
fricoben marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<QuestAndCollectionTabs | ||
quests={quests} | ||
categories={categories} | ||
trendingQuests={trendingQuests} | ||
/> | ||
<CategoryTitle | ||
subtitle="Get access to our community" | ||
title="About our quests" | ||
corner="bottomLeft" | ||
squares="bottomRight" | ||
/> | ||
<Stats | ||
stats={[ | ||
{ name: "Quests NFT minted", value: "+1M" }, | ||
{ name: "Unique addresses", value: "398K" }, | ||
{ name: "Unique visitors", value: "+200K" }, | ||
]} | ||
/> | ||
<div className={styles.blur2}> | ||
<Blur green /> | ||
</div> | ||
<HowToParticipate /> | ||
</div> | ||
</div> | ||
fricoben marked this conversation as resolved.
Show resolved
Hide resolved
|
||
); | ||
} |
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,19 @@ | ||
import React, { FunctionComponent } from "react"; | ||
|
||
type CallToActionProps = { | ||
children: React.ReactNode; | ||
}; | ||
|
||
const CallToAction: FunctionComponent<CallToActionProps> = ({ | ||
children | ||
}) => { | ||
|
||
return ( | ||
<div className={`flex flex-row flex-wrap gap-5 items-center justify-center py-12`}> | ||
{ children } | ||
</div> | ||
); | ||
}; | ||
export default CallToAction; | ||
|
||
|
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,36 @@ | ||
import React, { FunctionComponent } from "react"; | ||
baitcode marked this conversation as resolved.
Show resolved
Hide resolved
|
||
import styles from "@styles/components/pages/home/card.module.css"; | ||
import cdnize from "@utils/cdnize"; | ||
import Typography from "@components/UI/typography/typography"; | ||
import { TEXT_TYPE } from "@constants/typography"; | ||
|
||
baitcode marked this conversation as resolved.
Show resolved
Hide resolved
|
||
type CardProps = { | ||
children: React.ReactNode; | ||
imgSrc: string; | ||
title: string; | ||
onClick: () => void; | ||
disabled?: boolean; | ||
}; | ||
|
||
const Card: FunctionComponent<CardProps> = ({ | ||
children, | ||
title, | ||
imgSrc, | ||
onClick, | ||
disabled, | ||
}) => { | ||
return ( | ||
<div className={styles.card} onClick={onClick} aria-disabled={disabled}> | ||
baitcode marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<div | ||
style={{ backgroundImage: `url('${cdnize(imgSrc)}')` }} | ||
className={styles.cardImage} | ||
/> | ||
<div className={`${styles.cardInfos}`}> | ||
<Typography type={TEXT_TYPE.H3} color="secondary" className={styles.cardTitle}>{title}</Typography> | ||
{children} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
fricoben marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
export default Card; |
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,30 @@ | ||
import React, { FunctionComponent } from "react"; | ||
import styles from "@styles/components/pages/home/hero.module.css"; | ||
|
||
import Typography from "../../UI/typography/typography"; | ||
import { TEXT_TYPE } from "@constants/typography"; | ||
import SplitTitle from "./splitTitle"; | ||
|
||
|
||
const Hero: FunctionComponent<{}> = ({}) => ( | ||
baitcode marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<div> | ||
<div className="item-center justify-center pb-4"> | ||
<SplitTitle className="leading-12 pb-2" /> | ||
|
||
<Typography type={TEXT_TYPE.H1} | ||
className={`${styles.header} flex justify-center text-center text-5xl leading-12 text-transparent`}> | ||
WITH STARKNET | ||
</Typography> | ||
</div> | ||
|
||
<Typography type={TEXT_TYPE.BODY_MICRO} color="textGray" | ||
className="max-w-screen-sm text-sm leading-6 text-center"> | ||
Starknet Quest is our gateway to DeFi, offering tools and opportunities | ||
for individuals, DAOs, and protocols to grow their assets and explore Starknet's | ||
full potential. | ||
</Typography> | ||
|
||
</div> | ||
); | ||
baitcode marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
export default Hero; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
delete {``} to use ""