Skip to content
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

Character spacing on various pages #49

Merged
merged 1 commit into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 4 additions & 15 deletions src/Components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,13 @@ function Footer() {
<div>
<h4>Read/watch more Shoujo! 😝 Thanks for checking out the page!</h4>
<p>
<a href="https://github.com/bbland1/Quiz-App/#readme">
Open Source Code
<FontAwesomeIcon icon={faGithub} />
</a>{' '}
|{' '}
<a href="https://www.linkedin.com/in/bbland1/">
Made by: bbland1
<FontAwesomeIcon icon={faLinkedin} />
</a>{' '}
|{' '}
<a href="https://vercel.com">
Hosted with Vercel
<FontAwesomeIcon icon={faCaretUp} />
<a href="https://github.com/bbland1/Quiz-App/#readme">Source Code <FontAwesomeIcon icon={faGithub} />
</a> | <a href="https://www.linkedin.com/in/bbland1/">Developer: bbland1 <FontAwesomeIcon icon={faLinkedin} />
</a> | <a href="https://vercel.com">Hosted Vercel <FontAwesomeIcon icon={faCaretUp} />
</a>
</p>
<p>
&copy; 2022-
{new Date().getFullYear()} bbland1
&copy; 2022 - {new Date().getFullYear()} bbland1
</p>
</div>
</footer>
Expand Down
12 changes: 1 addition & 11 deletions src/Components/Links/LinksPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,7 @@ function Links() {
<div>
<h2>Other links</h2>
<p>
All the synopsis for the manga used in the quiz were taken from with
<a href="https://myanimelist.net" target="_blank" rel="noopener noreferrer" data-testid="MAL-Link">
My Anime List
</a>
or
<a href="https://anilist.co/" target="_blank" rel="noopener noreferrer" data-testid="Anilist-Link">
Anilist
</a>
. Below are some interesting reads that were linked in the
<span>What Is Shoujo?</span>
video above.
All the synopsis for the manga used in the quiz were taken from with <a href="https://myanimelist.net" target="_blank" rel="noopener noreferrer" data-testid="MAL-Link">My Anime List</a> or <a href="https://anilist.co/" target="_blank" rel="noopener noreferrer" data-testid="Anilist-Link">Anilist</a>. Below are some interesting reads that were linked in the <span>What Is Shoujo?</span> video above.
</p>
<ul>
<li>
Expand Down
27 changes: 12 additions & 15 deletions src/Components/QuizItems/QuizLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import './quiz.css';

function QuizLogic() {
// State Properties of the quiz
const [currentQuestion, setCurrentQuestion] = useState(0);
const [showFinalScore, setShowFinalScore] = useState(false);
const [score, setScore] = useState(0);
const [ currentQuestion, setCurrentQuestion ] = useState(0);
const [ showFinalScore, setShowFinalScore ] = useState(false);
const [ score, setScore ] = useState(0);

// giving functionality

Expand All @@ -15,7 +15,7 @@ function QuizLogic() {
// check if the users clicked answer returns true (the correct answer)
if (isCorrect) {
// adds the value of the question to the current state of the score
setScore(score + questions[currentQuestion].questionValue);
setScore(score + questions[ currentQuestion ].questionValue);
}

// determines the position of the next question in the array adding 1 to the idex of the current question
Expand Down Expand Up @@ -77,8 +77,7 @@ function QuizLogic() {
<div className="question-card func-button final-score">
<h2>{finalScoreWords}</h2>
<h3>
You got a {scorePercentage}
%!
You got a {scorePercentage}%!
</h3>
<h3>
{score} out of {questions.length} correct
Expand All @@ -101,24 +100,22 @@ function QuizLogic() {
</h3>
)}
<h4>
Question
{currentQuestion + 1} of
{questions.length}
Question {currentQuestion + 1} of {questions.length}
</h4>
<div className="question-info">
<h2 className="question-text">{questions[currentQuestion].questionText}</h2>
{questions[currentQuestion].question_img !== null && (
<img src={questions[currentQuestion].question_img} alt="" className="question-img" />
<h2 className="question-text">{questions[ currentQuestion ].questionText}</h2>
{questions[ currentQuestion ].question_img !== null && (
<img src={questions[ currentQuestion ].question_img} alt="" className="question-img" />
)}
{questions[currentQuestion].question_description !== null && (
{questions[ currentQuestion ].question_description !== null && (
<p className="synopsis">
<em>{questions[currentQuestion].question_description}</em>
<em>{questions[ currentQuestion ].question_description}</em>
</p>
)}
</div>
<div className="answer-text">
<ul>
{questions[currentQuestion].answersOptions.map((answerOption) => (
{questions[ currentQuestion ].answersOptions.map((answerOption) => (
<button type="button" key={answerOption.id} onClick={() => handleAnswerClick(answerOption.isCorrect)}>
{answerOption.answerText}
</button>
Expand Down