Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ export default function EssayContainer() {
return (
<div className="essay-container">
<div className="essay-container essay-background">
<div>The score is {essayScore.toFixed(2)}</div>
<div>
<ScoreBar essayScore={essayScore} />
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
import React from "react";
import "./essay.css";

export default function ScoreBar(props) {
const scale = 2;
const shift = 0;
let scaledScore = props.essayScore * scale + shift;
scaledScore = scaledScore < 0 ? 0 : scaledScore > 100 ? 100 : scaledScore;

return (
<div>The score is {props.essayScore.toFixed(2)} (Will be a bar later)</div>
<div class="score-bar">
<div class="score-bar-circle" style={{ left: scaledScore + "%" }}></div>
</div>
);
}
20 changes: 20 additions & 0 deletions website/src/components/posts/CollegeAdmissions/essay/essay.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,26 @@
border-radius: 15px;
}

.score-bar {
display: block;
height: 5px;
width: 450px;
background: white;
position: relative;
margin-top: 15px;
margin-bottom: 15px;
}

.score-bar-circle {
position: absolute;
height: 20px;
width: 20px;
border-radius: 10px;
background: black;
left: 50%;
top: -7.5px;
}

.written-essay {
margin: 2vh 0;
background-color: white;
Expand Down