Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
df3d10f
added outline for progress bar
Shaina-Z Apr 7, 2025
1a7cb3d
Fixed issue with Detailed Questions page not displaying
Axel-Rodriguez-Leon Apr 7, 2025
e126a90
updated the updateProgress function
Shaina-Z Apr 9, 2025
3840693
added a feedback for when user has completed questions
Shaina-Z Apr 14, 2025
1cbc6d0
Uploaded progress so far
Axel-Rodriguez-Leon Apr 14, 2025
100792b
added CSS file for BasicQuestions
Shaina-Z Apr 14, 2025
7b9a821
changed color of text
Shaina-Z Apr 14, 2025
dd653a0
added more questions
Shaina-Z Apr 15, 2025
e774eb4
Set up basic state use with the detailed page
Axel-Rodriguez-Leon Apr 15, 2025
5123ff2
Changed detailed questions from multiple choice to multiline text boxes
Axel-Rodriguez-Leon Apr 15, 2025
97f169f
Merge pull request #51 from Shaina-Z/quiz-page
timdoggington Apr 15, 2025
91c0591
Pages can now dynamically move if more content is added to them
Axel-Rodriguez-Leon Apr 15, 2025
60723aa
Merge remote-tracking branch 'origin/fixing-css-Axel-Rodriguez-Leon' …
Shaina-Z Apr 15, 2025
31693a9
added update progress to new questions
Shaina-Z Apr 15, 2025
d134710
fixed checked button error
Shaina-Z Apr 15, 2025
cae12ac
fixed progress bar error
Shaina-Z Apr 15, 2025
c8d3e97
fixed some css
Shaina-Z Apr 15, 2025
ef8f522
removed uneccessary css file
Shaina-Z Apr 15, 2025
dc44d49
fixed function error
Shaina-Z Apr 15, 2025
bd66b19
fixed color of basic question title
Shaina-Z Apr 15, 2025
57bf276
Merge pull request #52 from Shaina-Z/add-progress-bars-shainaz
Shaina-Z Apr 15, 2025
def48cd
potentially fixing action/cache error?
Shaina-Z Apr 15, 2025
15b11f6
reverting fix
Shaina-Z Apr 15, 2025
bd91d4f
potientally fixing deployment error?
Shaina-Z Apr 15, 2025
ce35ff8
fixing linting errors
Shaina-Z Apr 15, 2025
2d82d8c
fixing linting errors
Shaina-Z Apr 15, 2025
c51c67b
fixing warnings
Shaina-Z Apr 15, 2025
9f9db19
fixing deployment issues
Shaina-Z Apr 15, 2025
caa2721
fixing deployment issues
Shaina-Z Apr 16, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
Expand Down
46 changes: 29 additions & 17 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
@import url('https://fonts.googleapis.com/css2?family=Karla:ital,wght@0,200..800;1,200..800&display=swap');

html, body {
margin: 0;
padding: 0;
min-height: 100vh;
overflow-y: auto; /* allows vertical scrolling */
}

.App {
text-align: center;
overflow: auto;
}


Expand All @@ -24,7 +32,7 @@
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
color: black;
}

.App-link {
Expand All @@ -45,10 +53,10 @@
transform: translateY(-82%);
}

.take-quiz-button {
.take-quiz-block {
border-radius: 30px;
position: fixed;
width: 900px;
width: 75%;
padding: 40px;
background-color: darkblue;
color: white;
Expand All @@ -60,13 +68,14 @@
font-size: 45px;
text-align: center;
align-items: center;
margin: 40px auto;
}

.fade-strip {
z-index: 9998;
position: fixed;
width: 100%;
height: 200px;
height: 15%;
top: 5%;
display: flex;
align-items: center;
Expand Down Expand Up @@ -94,7 +103,7 @@
color: white;
}

.basic{
.basic, .detailed{
background-color: #d3dced;
width: 1000px;
padding: 15px;
Expand All @@ -103,14 +112,16 @@
display: grid;
place-items: center;
text-wrap:balance;
top: 46%;
top: unset;
border-style: solid;
position: fixed;
left: 50%;
position: relative;
left: unset;
z-index: 1000;
transform: translateX(-50%);
transform: none;
margin: 40px auto;
}

/*
.detailed{
background-color: #d3dced;
width: 1000px;
Expand All @@ -125,19 +136,20 @@
top: 58%;
left: 50%;
transform: translateX(-50%);
}
}*/

.Detailed-Questions{
text-wrap:balance;
padding:25px;
border-style: solid;
width: 75%;
}

@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
.Detailed-Questions header {
font-size: 1.8rem;
font-weight: bold;
}

.Detailed-Questions small {
font-size: 50%;
}
7 changes: 3 additions & 4 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,15 @@ function App() {
>
Home Page
</Button>
<div className="take-quiz-button" hidden = {isHome}>Take our free career quiz now!</div>
<div className="take-quiz-block" hidden = {isHome}>Take our free career quiz now!</div>
<div hidden={isHome} className="fade-strip">Career Helpi Quiz</div>
<header className="App-header">
<div className="Basic-Questions" hidden={notBasic}>
<BasicQuestions />
</div>
<div className="Detailed-Questions" hidden={notDetailed}>
<DetailedQuestions />
</div>
</div>
</header>
<p className ="basic" style= {{zIndex: 5}} hidden = {isHome}>Not sure where to start? Answer a few small questions to get some starting points on a career path.
<Button style={{backgroundColor: 'darkblue'}}//Flips the visibility of the Basic and Home pages
onClick={() => {
Expand All @@ -95,7 +94,7 @@ function App() {
Detailed Quiz
</Button> </p>


</header>
<a
className="App-link"
href="https://reactjs.org"
Expand Down
41 changes: 27 additions & 14 deletions src/Pages/BasicQuestions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,16 @@ export function BasicQuestions(): React.JSX.Element{
const [answer3, setAnswer3] = useState<string>(QTYPEAANSWER[0]);
const [answer4, setAnswer4] = useState<string>(QTYPEAANSWER[0]);
const [answer5, setAnswer5] = useState<string>(QTYPEAANSWER[0]);

const [progress,setProgress]=useState<number>(0)
function UpdateProgress(){
setProgress(progress+1);
console.log(progress);
}
return(
<span>
<div className="page-wrapper">
<div className = "Basic-Questions">
<header style={{fontSize:40}}> Basic Quiz</header>
<header className="Basic-Title" style={{fontSize:40}}> Basic Quiz</header>
<h3 style={{color: 'white'}}>1. I would like to develop new medicine</h3>
<Form.Group controlId={"Question 1"}>
{QTYPEAANSWER.map((ananswer) => (
Expand All @@ -31,12 +35,13 @@ export function BasicQuestions(): React.JSX.Element{
type={"radio"}
name={"response1"}
key={ananswer}
value={ananswer}
value={answer1}
label={ananswer}
onChange={(e) => {
setAnswer1(e.target.value);
UpdateProgress();
}}
checked={answer1 === ananswer}
//checked={answer1 !== ananswer}
/>
))}
</Form.Group>
Expand All @@ -48,12 +53,13 @@ export function BasicQuestions(): React.JSX.Element{
type={"radio"}
name={"response2"}
key={ananswer2}
value={ananswer2}
value={answer2}
label={ananswer2}
onChange={(e) => {
setAnswer2(e.target.value);
UpdateProgress();
}}
checked={answer2 === ananswer2}
//checked={answer2 !== ananswer2}
/>
))}
</Form.Group>
Expand All @@ -65,12 +71,14 @@ export function BasicQuestions(): React.JSX.Element{
type={"radio"}
name={"response3"}
key={ananswer3}
value={ananswer3}
value={answer3}
label={ananswer3}
onChange={(e) => {
setAnswer3(e.target.value);
setAnswer3(e.target.value
);
UpdateProgress();
}}
checked={answer3 === ananswer3}
//checked={answer3 !== ananswer3}
/>
))}
</Form.Group>
Expand All @@ -82,12 +90,13 @@ export function BasicQuestions(): React.JSX.Element{
type={"radio"}
name={"response4"}
key={ananswer4}
value={ananswer4}
value={answer4}
label={ananswer4}
onChange={(e) => {
setAnswer4(e.target.value);
UpdateProgress();
}}
checked={answer4 === ananswer4}
//checked={answer4 !== ananswer4}
/>
))}
</Form.Group>
Expand All @@ -99,17 +108,21 @@ export function BasicQuestions(): React.JSX.Element{
type={"radio"}
name={"response5"}
key={ananswer5}
value={ananswer5}
value={answer5}
label={ananswer5}
onChange={(e) => {
setAnswer5(e.target.value);
UpdateProgress();
}}
checked={answer5 === ananswer5}
//checked={answer5 !== ananswer5}
/>
))}
</Form.Group>
<progress value={progress} max={7} ></progress>
<div className='Ready' hidden={progress<=7}>Ready to Submit?</div>
</div>
</div>
</span>
)
}
}

Loading