File tree Expand file tree Collapse file tree 3 files changed +30
-1
lines changed
website/src/components/posts/CollegeAdmissions/essay Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -186,6 +186,7 @@ export default function EssayContainer() {
186186 return (
187187 < div className = "essay-container" >
188188 < div className = "essay-container essay-background" >
189+ < div > The score is { essayScore . toFixed ( 2 ) } </ div >
189190 < div >
190191 < ScoreBar essayScore = { essayScore } />
191192 </ div >
Original file line number Diff line number Diff line change 11import React from "react" ;
2+ import "./essay.css" ;
23
34export default function ScoreBar ( props ) {
5+ const scale = 2 ;
6+ const shift = 0 ;
7+ let scaledScore = props . essayScore * scale + shift ;
8+ scaledScore = scaledScore < 0 ? 0 : scaledScore > 100 ? 100 : scaledScore ;
9+
410 return (
5- < div > The score is { props . essayScore . toFixed ( 2 ) } (Will be a bar later)</ div >
11+ < div class = "score-bar" >
12+ < div class = "score-bar-circle" style = { { left : scaledScore + "%" } } > </ div >
13+ </ div >
614 ) ;
715}
Original file line number Diff line number Diff line change 1111 border-radius : 15px ;
1212}
1313
14+ .score-bar {
15+ display : block;
16+ height : 5px ;
17+ width : 450px ;
18+ background : white;
19+ position : relative;
20+ margin-top : 15px ;
21+ margin-bottom : 15px ;
22+ }
23+
24+ .score-bar-circle {
25+ position : absolute;
26+ height : 20px ;
27+ width : 20px ;
28+ border-radius : 10px ;
29+ background : black;
30+ left : 50% ;
31+ top : -7.5px ;
32+ }
33+
1434.written-essay {
1535 margin : 2vh 0 ;
1636 background-color : white;
You can’t perform that action at this time.
0 commit comments