File tree Expand file tree Collapse file tree 6 files changed +57
-13
lines changed
Expand file tree Collapse file tree 6 files changed +57
-13
lines changed Original file line number Diff line number Diff line change @@ -84,9 +84,18 @@ button {
8484 padding : 1rem 2rem ;
8585 color : var (--text-color );
8686 cursor : pointer;
87+ transition : filter 0.3s , scale 0.3s ;
8788
8889 & .disabled {
8990 opacity : 0.5 ;
9091 filter : grayscale (0.8 );
9192 }
93+
94+ & : hover {
95+ filter : brightness (1.15 );
96+ }
97+
98+ & : active {
99+ scale : 0.9 ;
100+ }
92101}
Original file line number Diff line number Diff line change @@ -11,9 +11,9 @@ export const FinalView = () => {
1111
1212 return (
1313 < >
14- < article className = "quiz final-view" >
14+ < section className = "quiz final-view" >
1515 < Score />
16- </ article >
16+ </ section >
1717 { showResults && (
1818 < >
1919 < Results />
Original file line number Diff line number Diff line change @@ -20,20 +20,33 @@ export const Score = () => {
2020 ? '¡Buen intento!'
2121 : '¡Sigue practicando!' ;
2222 return (
23- < section className = "score" >
23+ < article className = "score" >
2424 < h2 className = "message" > { message } </ h2 >
25+ < div className = "score-circles" >
26+ < div >
27+ < span >
28+ { score } / { shuffleQuestions . length }
29+ </ span >
30+ </ div >
31+ < div >
32+ < span > { percentage . toFixed ( ) } %</ span >
33+ </ div >
34+ </ div >
2535 < p >
26- Has contestado { score } preguntas correctamente de un total de{ ' ' }
36+ Has contestado correctamente { score } preguntas de un total de{ ' ' }
2737 { shuffleQuestions . length } , consiguiendo un porcentaje de acierto de (
2838 { percentage . toFixed ( ) } %).
2939 </ p >
30- < button
31- onClick = { ( ) => setShowResults ( true ) }
32- hidden = { showResults === true }
33- >
34- Ver resultados
35- </ button >
36- < button onClick = { handleRestart } > Jugar de nuevo</ button >
37- </ section >
40+
41+ < div className = "buttons" >
42+ < button
43+ onClick = { ( ) => setShowResults ( true ) }
44+ hidden = { showResults === true }
45+ >
46+ Ver resultados
47+ </ button >
48+ < button onClick = { handleRestart } > Jugar de nuevo</ button >
49+ </ div >
50+ </ article >
3851 ) ;
3952} ;
Original file line number Diff line number Diff line change 88 h2 {
99 font-size : 2.2rem ;
1010 }
11+
12+ .score-circles {
13+ display : flex;
14+ column-gap : 1rem ;
15+
16+ div {
17+ background-color : var (--info-color );
18+ border-radius : 50% ;
19+ width : 5rem ;
20+ aspect-ratio : 1 ;
21+ display : grid;
22+ place-items : center;
23+ font-size : 1.25rem ;
24+ font-weight : bold;
25+ }
26+ }
1127}
Original file line number Diff line number Diff line change @@ -16,7 +16,9 @@ export const Quiz = () => {
1616 { currentQuestion + 1 } / { shuffleQuestions . length }
1717 </ span >
1818
19- < h2 > { shuffleQuestions [ currentQuestion ] . question } </ h2 >
19+ < h2 className = "question-title" >
20+ { shuffleQuestions [ currentQuestion ] . question }
21+ </ h2 >
2022
2123 < Answers />
2224
Original file line number Diff line number Diff line change 1616 padding : 0.3rem 0.6rem ;
1717 border-radius : 16px ;
1818 }
19+
20+ .question-title {
21+ padding-inline-end : 70px ;
22+ }
1923}
You can’t perform that action at this time.
0 commit comments