-
Notifications
You must be signed in to change notification settings - Fork 134
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
Week 10 - Zoe & Kelly #86
Open
jacquelinekellyhunt
wants to merge
64
commits into
Technigo:main
Choose a base branch
from
zoe-lindqvist:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
64 commits
Select commit
Hold shift + click to select a range
0f1ea33
initial commit
zoe-lindqvist 55aa0eb
initial commit
zoe-lindqvist 66f8112
initial commit
zoe-lindqvist bd126fd
components
zoe-lindqvist 3f24b5f
App
zoe-lindqvist d4d8398
Add photos
jacquelinekellyhunt b71d636
preliminary logic
zoe-lindqvist 7de5646
Merge branch 'main' of https://github.com/zoe-lindqvist/project-surve…
zoe-lindqvist d509a3d
Merged zoeBranch into main
zoe-lindqvist c64358b
Add a star
jacquelinekellyhunt b2dd5f8
Add confirmation page
jacquelinekellyhunt 310be4e
Add organising of folder
jacquelinekellyhunt 5dca520
Edit welcome page
jacquelinekellyhunt a7ca32d
Merge pull request #1 from zoe-lindqvist/addStar
zoe-lindqvist bad1ef1
Add nice welcome page
jacquelinekellyhunt 39dce0d
Resize the text
jacquelinekellyhunt 843bbc0
Merge pull request #2 from zoe-lindqvist/heroimage
jacquelinekellyhunt 45c0e82
questionsHeader
zoe-lindqvist f69fd50
Merge pull request #3 from zoe-lindqvist/questionHeader
jacquelinekellyhunt f42b16e
Add first question
jacquelinekellyhunt 4710826
Merge branch 'main' into question
jacquelinekellyhunt 1b8c3b5
Merge pull request #4 from zoe-lindqvist/question
zoe-lindqvist 3bc113e
Clean
jacquelinekellyhunt 14d33b5
Merge pull request #5 from zoe-lindqvist/clean
zoe-lindqvist d65ab62
confirmation HTML
zoe-lindqvist 82ddbb7
Merge pull request #6 from zoe-lindqvist/semanticHTML
zoe-lindqvist 328ebab
color contrast - accessibility
zoe-lindqvist 0e471a6
semantic structure + aria labels
zoe-lindqvist d0515aa
centered container to be responsive on small screens
zoe-lindqvist a7e389a
Merge pull request #7 from zoe-lindqvist/colorContrast
jacquelinekellyhunt 53f5f79
Merge pull request #9 from zoe-lindqvist/responsiveDesign
jacquelinekellyhunt 885d738
Merge pull request #8 from zoe-lindqvist/semanticHTML
jacquelinekellyhunt fa9a7e7
Resolve errors
jacquelinekellyhunt 5443ae9
Rebasing
jacquelinekellyhunt 018136e
Add a second question
jacquelinekellyhunt fdd512c
Merge pull request #10 from zoe-lindqvist/restructure
zoe-lindqvist 12a2e23
QuestionThree
zoe-lindqvist 57e0ad3
question3
zoe-lindqvist 88a649f
test
zoe-lindqvist 929bbb8
Question 2
jacquelinekellyhunt 277015d
Merge pull request #12 from zoe-lindqvist/restructure
jacquelinekellyhunt bc29986
Change color
jacquelinekellyhunt b435814
Merge pull request #11 from zoe-lindqvist/zoeQuestions
jacquelinekellyhunt 487a358
change color
zoe-lindqvist ae30a0e
question 4
zoe-lindqvist 570a99c
Merge pull request #13 from zoe-lindqvist/questionThreeFour
jacquelinekellyhunt 3e8b2d3
question 5
zoe-lindqvist 2345e87
Merge pull request #14 from zoe-lindqvist/questionThreeFour
jacquelinekellyhunt f26f0a8
question 6
zoe-lindqvist e4ec9f1
Merge pull request #15 from zoe-lindqvist/questionThreeFour
zoe-lindqvist 0760148
question 7
zoe-lindqvist 95276be
Merge pull request #16 from zoe-lindqvist/questionThreeFour
jacquelinekellyhunt 78998d4
Question eight
jacquelinekellyhunt f708e74
Final push
jacquelinekellyhunt e375256
Progress bar bug
jacquelinekellyhunt c6673b9
Merge pull request #17 from zoe-lindqvist/progress_bar
zoe-lindqvist e184137
Update Header.jsx
zoe-lindqvist ea69bf8
Update Header.jsx
zoe-lindqvist cd9754f
header
zoe-lindqvist f95fd74
header
zoe-lindqvist 68d5bf6
responsive
zoe-lindqvist 7591a4c
Merge pull request #18 from zoe-lindqvist/Z
jacquelinekellyhunt b5fa7ac
Fix media queries
jacquelinekellyhunt 10a9cc2
Merge pull request #19 from zoe-lindqvist/media
zoe-lindqvist 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
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,13 @@ | ||
html, | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
height: 100%; | ||
overflow-y: auto; | ||
} | ||
|
||
body { | ||
width: 100vw; | ||
height: 100vh; | ||
overflow-y: auto; | ||
} |
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 |
---|---|---|
@@ -1,3 +1,70 @@ | ||
export const App = () => { | ||
return <div>Find me in src/app.jsx!</div>; | ||
/* eslint-disable no-unused-vars */ | ||
import React, { useState } from "react"; | ||
import WelcomePage from "./components/WelcomeFolder/WelcomePage.jsx"; | ||
import QuestionOne from "./components/QuestionOne/QuestionOne"; | ||
import QuestionTwo from "./components/QuestionTwo/QuestionTwo.jsx"; | ||
import QuestionThree from "./components/QuestionThree/QuestionThree.jsx"; | ||
import QuestionFour from "./components/QuestionFour/QuestionFour.jsx"; | ||
import QuestionFive from "./components/QuestionFive/QuestionFive.jsx"; | ||
import QuestionSix from "./components/QuestionSix/QuestionSix.jsx"; | ||
import QuestionSeven from "./components/QuestionSeven/QuestionSeven.jsx"; | ||
import QuestionEight from "./components/QuestionEight/QuestionEight.jsx"; | ||
import ConfirmationPage from "./components/ConfirmationFolder/ConfirmationPage.jsx"; | ||
|
||
import "./App.css"; | ||
|
||
const App = () => { | ||
const [startQuiz, setStartQuiz] = useState(false); | ||
const [currentQuestion, setCurrentQuestion] = useState(0); | ||
const [score, setScore] = useState(160); | ||
|
||
const handleStartQuiz = () => { | ||
setStartQuiz(true); | ||
}; | ||
|
||
const handleNextQuestion = () => { | ||
setCurrentQuestion(currentQuestion + 1); | ||
}; | ||
|
||
const handleScoreChange = (pointsToDeduct) => { | ||
setScore(score - pointsToDeduct); // This is for the passing down the function to handle the end score | ||
}; | ||
|
||
return ( | ||
<div className="App"> | ||
{!startQuiz ? ( | ||
<WelcomePage onStartQuiz={handleStartQuiz} /> | ||
) : ( | ||
<> | ||
{currentQuestion === 0 && ( | ||
<QuestionOne onNext={handleNextQuestion} onScoreChange={handleScoreChange} /> | ||
)} | ||
{currentQuestion === 1 && ( | ||
<QuestionTwo onNext={handleNextQuestion} onScoreChange={handleScoreChange} /> | ||
)} | ||
{currentQuestion === 2 && ( | ||
<QuestionThree onNext={handleNextQuestion} onScoreChange={handleScoreChange} /> | ||
)} | ||
{currentQuestion === 3 && ( | ||
<QuestionFour onNext={handleNextQuestion} onScoreChange={handleScoreChange} /> | ||
)} | ||
{currentQuestion === 4 && ( | ||
<QuestionFive onNext={handleNextQuestion} onScoreChange={handleScoreChange} /> | ||
)} | ||
{currentQuestion === 5 && ( | ||
<QuestionSix onNext={handleNextQuestion} onScoreChange={handleScoreChange} /> | ||
)} | ||
{currentQuestion === 6 && ( | ||
<QuestionSeven onNext={handleNextQuestion} onScoreChange={handleScoreChange} /> | ||
)} | ||
{currentQuestion === 7 && ( | ||
<QuestionEight onNext={handleNextQuestion} onScoreChange={handleScoreChange} /> | ||
)} | ||
{currentQuestion === 8 && <ConfirmationPage score={score} />} | ||
</> | ||
)} | ||
</div> | ||
); | ||
}; | ||
|
||
export default App; |
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.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
.confirmation-container { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
min-height: 100vh; /* Allow the container to grow */ | ||
background-color: #ffffff; | ||
text-align: center; | ||
overflow-y: auto; /* Enable vertical scrolling */ | ||
padding: 20px; /* Add padding for small screens */ | ||
} | ||
|
||
.confirmation-logo { | ||
width: 120px; | ||
margin-bottom: 20px; | ||
} | ||
|
||
.confirmation-star { | ||
width: 400px; | ||
height: auto; | ||
margin-bottom: 20px; | ||
} | ||
|
||
.confirmation-title { | ||
font-size: 36px; | ||
font-weight: bold; | ||
color: #2c2c2c; | ||
margin-bottom: 10px; | ||
} | ||
|
||
.confirmation-subtitle { | ||
font-size: 18px; | ||
color: #7f7f7f; | ||
margin-bottom: 30px; | ||
} | ||
|
||
.score-box { | ||
background-color: #f9f4e7; | ||
border-radius: 20px; | ||
padding: 10px 30px; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
font-size: 24px; | ||
color: #2c2c2c; | ||
} | ||
|
||
.score { | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
/* Media queries for smaller screens */ | ||
@media (max-width: 768px) { | ||
.confirmation-container { | ||
padding: 15px; /* Adjust padding for medium screens */ | ||
} | ||
|
||
.confirmation-star { | ||
width: 300px; /* Reduce star size for medium screens */ | ||
} | ||
|
||
.confirmation-title { | ||
font-size: 30px; /* Adjust title size */ | ||
} | ||
} | ||
|
||
@media (max-width: 480px) { | ||
.confirmation-container { | ||
padding: 10px; /* Reduce padding for small screens */ | ||
} | ||
|
||
.confirmation-star { | ||
width: 250px; /* Further reduce star size for small screens */ | ||
} | ||
|
||
.confirmation-title { | ||
font-size: 24px; /* Further reduce title size */ | ||
} | ||
|
||
.confirmation-subtitle { | ||
font-size: 16px; /* Adjust subtitle size */ | ||
} | ||
} |
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,38 @@ | ||
import React from 'react'; | ||
import './ConfirmationPage.css'; | ||
import starImage from '../../assets/star.png'; | ||
import logoImage from '../../assets/logo.png'; | ||
|
||
const ConfirmationPage = ({ score }) => { | ||
let title = ""; | ||
let subtitle = ""; | ||
|
||
// Determine the title and subtitle based on the score | ||
if (score < 40) { | ||
title = "Good Effort!"; | ||
subtitle = "Maybe next time is the charm!"; | ||
} else if (score >= 40 && score < 80) { | ||
title = "Nice job!"; | ||
subtitle = "Good to have an animal lover among us!"; | ||
} else if (score >= 80 && score < 120) { | ||
title = "Good job!"; | ||
subtitle = "Almost a perfect score, what an expert!"; | ||
} else { | ||
title = "Perfect Scorer!"; | ||
subtitle = "Your flawless quiz performance sets a new standard of excellence!"; | ||
} | ||
Comment on lines
+11
to
+23
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. Cool! I'm curious about what the full score is. 👍 |
||
|
||
return ( | ||
<div className="confirmation-container"> | ||
<img src={logoImage} alt="Quiz Logo" className="confirmation-logo" /> | ||
<img src={starImage} alt="Star" className="confirmation-star" /> | ||
<h1 className="confirmation-title">{title}</h1> | ||
<p className="confirmation-subtitle">{subtitle}</p> | ||
<div className="score-box"> | ||
<span className="score">{score} points</span> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ConfirmationPage; |
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,28 @@ | ||
.Header { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
padding: 10px 30px; | ||
background-color: rgba(255, 255, 255, 0.7); | ||
height: 50px; | ||
border-radius: 50px; | ||
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); | ||
width: 80vw; | ||
margin: 20px auto; | ||
} | ||
|
||
.logo { | ||
height: 50px; | ||
} | ||
|
||
.search-icon { | ||
height: 20px; | ||
cursor: pointer; | ||
} | ||
|
||
.search-button { | ||
background: none; | ||
border: none; | ||
padding: 0; | ||
cursor: pointer; | ||
} |
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 @@ | ||
// eslint-disable-next-line no-unused-vars | ||
import React from "react"; | ||
import logo from "../../assets/logo.png"; | ||
import searchIcon from "../../assets/search.png"; | ||
import "./Header.css"; | ||
|
||
const Header = () => { | ||
return ( | ||
<header className="Header" aria-label="Main header"> | ||
<img src={logo} alt="Paw Pops Logo" className="logo" /> | ||
|
||
<button className="search-button" aria-label="Search"> | ||
<img src={searchIcon} alt="" className="search-icon" /> | ||
Comment on lines
+12
to
+13
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. It seems that the search function is not active. Would like to see how it works! |
||
</button> | ||
</header> | ||
); | ||
}; | ||
|
||
export default Header; |
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.
Consider mobile first design maybe it is good to do oppisite by setting min-width?