-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d738457
commit 3768b9c
Showing
26 changed files
with
1,792 additions
and
46 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
110 changes: 110 additions & 0 deletions
110
apps/dapp/src/components/Pages/Nexus/Quests/FirstQuest/Quiz/CollectSlide.tsx
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,110 @@ | ||
import styled from 'styled-components'; | ||
import { Button } from 'components/Button/Button'; | ||
import Image from 'components/Image/Image'; | ||
import Slide from './Slide'; | ||
import nexusCloseBook from 'assets/images/nexus/nexusicons_closebook.png'; | ||
|
||
type CollectSlideProps = { | ||
passed: boolean; | ||
tryAgainButtonClickHandler?: () => void; | ||
collectShardButtonClickHandler?: () => void; | ||
}; | ||
|
||
// TODO: Try again should go back to the beginning and reset the entire state | ||
// TODO: Collect shard should handle the actual claiming of the shard | ||
|
||
const CollectSlide = ({ passed, tryAgainButtonClickHandler, collectShardButtonClickHandler }: CollectSlideProps) => { | ||
return ( | ||
<Slide headerText={''}> | ||
{passed && ( | ||
<> | ||
<TextContainer> | ||
<CollectShardContainer> | ||
TEMPLAR, YOU ARE DESERVING. <br /> | ||
AS A SCHOLAR OF THE TEMPLE, <br /> | ||
YOU ARE REWARDED FOR YOUR PERSEVERANCE IN <br /> | ||
THE QUEST FOR KNOWLEDGE. | ||
<ImageContainer> | ||
<Image width={100} src={nexusCloseBook} /> | ||
</ImageContainer> | ||
</CollectShardContainer> | ||
</TextContainer> | ||
<ButtonsContainer> | ||
<StyledButton onClick={collectShardButtonClickHandler}>COLLECT SHARD</StyledButton> | ||
</ButtonsContainer> | ||
</> | ||
)} | ||
{!passed && ( | ||
<> | ||
<TextContainer> | ||
TEMPLAR, YOU ARE ARE NOT READY. <br /> | ||
FRET NOT, ALL ARE GIVEN ANOTHER CHANCE <br /> | ||
TO PROVE THEY ARE DESERVING. <br /> | ||
GO BACK AND TRY AGAIN. <br /> | ||
</TextContainer> | ||
<ButtonsContainer> | ||
<StyledButton onClick={tryAgainButtonClickHandler}>TRY AGAIN</StyledButton> | ||
</ButtonsContainer> | ||
</> | ||
)} | ||
</Slide> | ||
); | ||
}; | ||
|
||
const ImageContainer = styled.div` | ||
border: 2px solid; | ||
border-radius: 10px; | ||
display: flex; | ||
padding: 10px; | ||
align-items: center; | ||
margin-top: 10px; | ||
border: 1.5px solid #BD7B4F;; | ||
border-radius: 10px; | ||
`; | ||
|
||
const CollectShardContainer = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
`; | ||
|
||
const ButtonsContainer = styled.div` | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-between; | ||
`; | ||
|
||
const TextContainer = styled.div` | ||
border: 0.0625rem solid ${(props) => props.color ?? props.theme.palette.brand}; | ||
border-radius: 16px; | ||
padding: 4rem; | ||
width: 1056px; | ||
text-align: center; | ||
line-height: 40px; | ||
margin-top: 200px; | ||
background: radial-gradient( | ||
58.56% 58.56% at 50% 49.88%, | ||
rgba(193, 177, 177, 0.12) 38.54%, | ||
rgba(193, 177, 177, 0) 100% | ||
); | ||
font-size: 20px; | ||
`; | ||
|
||
const StyledButton = styled(Button)` | ||
width: 224px; | ||
height: 61px; | ||
background: linear-gradient(180deg, #504f4f 45.31%, #0c0b0b 100%); | ||
border: 1px solid #bd7b4f; | ||
border-radius: 25px; | ||
color: #ffffff; | ||
margin-top: 80px; | ||
margin-bottom: 20px; | ||
&:hover { | ||
border: 1px solid; | ||
border-image-source: linear-gradient(0deg, #ffdec9, #ffdec9), linear-gradient(0deg, #d9a37d, #d9a37d); | ||
} | ||
`; | ||
|
||
export default CollectSlide; |
65 changes: 65 additions & 0 deletions
65
apps/dapp/src/components/Pages/Nexus/Quests/FirstQuest/Quiz/FinalSlide.tsx
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,65 @@ | ||
import styled from 'styled-components'; | ||
import { Button } from 'components/Button/Button'; | ||
import Slide from './Slide'; | ||
|
||
type FinalSlideProps = { | ||
backButtonClickHandler: () => void; | ||
submitButtonClickHandler: () => void; | ||
}; | ||
const FinalSlide = ({ backButtonClickHandler, submitButtonClickHandler }: FinalSlideProps) => { | ||
return ( | ||
<Slide headerText={'End Quiz'}> | ||
<TextContainer> | ||
YOU HAVE REACHED THE END OF THE QUIZ. <br /> | ||
CLICK SUBMIT TO FINALISE YOUR SCORE. | ||
<br /> | ||
GO BACK IF YOU ARE NOT READY TO ASCEND. <br /> | ||
</TextContainer> | ||
<ButtonsContainer> | ||
<StyledButton onClick={backButtonClickHandler}>BACK</StyledButton> | ||
<StyledButton onClick={submitButtonClickHandler}>SUBMIT</StyledButton> | ||
</ButtonsContainer> | ||
</Slide> | ||
); | ||
}; | ||
|
||
const ButtonsContainer = styled.div` | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-between; | ||
`; | ||
|
||
const TextContainer = styled.div` | ||
border: 0.0625rem solid ${(props) => props.color ?? props.theme.palette.brand}; | ||
border-radius: 16px; | ||
padding: 4rem; | ||
width: 1056px; | ||
text-align: center; | ||
line-height: 40px; | ||
margin-top: 200px; | ||
background: radial-gradient( | ||
58.56% 58.56% at 50% 49.88%, | ||
rgba(193, 177, 177, 0.12) 38.54%, | ||
rgba(193, 177, 177, 0) 100% | ||
); | ||
font-size: 20px; | ||
`; | ||
|
||
const StyledButton = styled(Button)` | ||
width: 174px; | ||
height: 61px; | ||
background: linear-gradient(180deg, #504f4f 45.31%, #0c0b0b 100%); | ||
border: 1px solid #bd7b4f; | ||
border-radius: 25px; | ||
color: #ffffff; | ||
margin-right: 20px; | ||
margin-top: 80px; | ||
margin-bottom: 20px; | ||
&:hover { | ||
border: 1px solid; | ||
border-image-source: linear-gradient(0deg, #ffdec9, #ffdec9), linear-gradient(0deg, #d9a37d, #d9a37d); | ||
} | ||
`; | ||
|
||
export default FinalSlide; |
52 changes: 52 additions & 0 deletions
52
apps/dapp/src/components/Pages/Nexus/Quests/FirstQuest/Quiz/FirstSlide.tsx
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 @@ | ||
import styled from 'styled-components'; | ||
import { Button } from 'components/Button/Button'; | ||
import Slide from './Slide'; | ||
|
||
type FirstSlideProps = { | ||
startButtonClickHandler: () => void; | ||
}; | ||
|
||
const FirstSlide = ({ startButtonClickHandler }: FirstSlideProps) => { | ||
return ( | ||
<Slide headerText={"Start Quiz"}> | ||
<TextContainer> | ||
Templar, you’ve made it this far. <br /> | ||
Your journey has only just begun through the hallways of Temple. <br /> | ||
The Library is but the first step in a lifetime of learning. <br /> | ||
But, first, answer these riddles so we know you truly are one of us. <br /> | ||
The Temple rewards its Scholars. | ||
</TextContainer> | ||
<SlideStartButton onClick={startButtonClickHandler}>Start</SlideStartButton> | ||
</Slide> | ||
); | ||
}; | ||
|
||
const TextContainer = styled.div` | ||
border: 0.0625rem solid ${(props) => props.color ?? props.theme.palette.brand}; | ||
border-radius: 16px; | ||
padding: 4rem; | ||
width: 1056px; | ||
text-align: center; | ||
line-height: 40px; | ||
margin-top: 200px; | ||
background: radial-gradient(58.56% 58.56% at 50% 49.88%, rgba(193, 177, 177, 0.12) 38.54%, rgba(193, 177, 177, 0) 100%); | ||
font-size: 20px; | ||
`; | ||
|
||
const SlideStartButton = styled(Button)` | ||
width: 174px; | ||
height: 61px; | ||
background: linear-gradient(180deg, #504f4f 45.31%, #0c0b0b 100%); | ||
border: 1px solid #BD7B4F; | ||
border-radius: 25px; | ||
color: #ffffff; | ||
margin-top: 80px; | ||
margin-bottom: 20px; | ||
&:hover { | ||
border: 1px solid; | ||
border-image-source: linear-gradient(0deg, #FFDEC9, #FFDEC9), linear-gradient(0deg, #D9A37D, #D9A37D); | ||
} | ||
`; | ||
|
||
export default FirstSlide; |
58 changes: 58 additions & 0 deletions
58
apps/dapp/src/components/Pages/Nexus/Quests/FirstQuest/Quiz/ProgressBar.tsx
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,58 @@ | ||
import styled from 'styled-components'; | ||
|
||
type QuestionSlideProps = { | ||
questionNumber: number; | ||
totalQuestions: number; | ||
}; | ||
|
||
const ProgressBar = ({ questionNumber, totalQuestions }: QuestionSlideProps) => { | ||
const percentProgress = questionNumber / totalQuestions; | ||
console.log(percentProgress); | ||
return ( | ||
<ParentContainer> | ||
<ProgressContainer> | ||
<ProgressIndicator percentProgress={percentProgress} /> | ||
</ProgressContainer> | ||
<QuestionStatus> | ||
{questionNumber}/{totalQuestions} | ||
</QuestionStatus> | ||
</ParentContainer> | ||
); | ||
}; | ||
|
||
const ParentContainer = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
width: 1000px; | ||
position: relative; | ||
`; | ||
|
||
const QuestionStatus = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
margin-top: 25px; | ||
font-size: 24px; | ||
line-height: 30px; | ||
`; | ||
|
||
const ProgressContainer = styled.div` | ||
box-sizing: border-box; | ||
width: 1000px; | ||
height: 10px; | ||
border: 1px solid #bd7b4f; | ||
border-radius: 20px; | ||
`; | ||
|
||
interface ProgressIndicatorProps { | ||
percentProgress: number; | ||
} | ||
|
||
const ProgressIndicator = styled.div<ProgressIndicatorProps>` | ||
width: ${props => (props.percentProgress * 1000)}px; | ||
height: 10px; | ||
background: #bd7b4f; | ||
border-radius: 20px; | ||
`; | ||
|
||
export default ProgressBar; |
Oops, something went wrong.