mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-21 21:48:42 +00:00
fix(submissions): badge and score color
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
2c17fba818
commit
79b9b50da1
@ -519,10 +519,10 @@ class UOJSubmission {
|
||||
echo '<span class="fs-5">';
|
||||
if ($actual_score == 100) {
|
||||
// rgb(0, 204, 0)
|
||||
echo '<span class="badge text-white bg-success">', 'Accepted', '</span>';
|
||||
echo '<span class="badge text-white uoj-accepted-badge">', 'Accepted', '</span>';
|
||||
} else {
|
||||
// rgb(204, 0, 0)
|
||||
echo '<span class="badge text-white bg-danger">', 'Unaccepted', '</span>';
|
||||
echo '<span class="badge text-white uoj-unaccepted-badge">', 'Unaccepted', '</span>';
|
||||
}
|
||||
echo '</span>';
|
||||
}
|
||||
|
@ -503,6 +503,16 @@ form.form-horizontal {
|
||||
}
|
||||
}
|
||||
|
||||
/* Submissions List */
|
||||
|
||||
.uoj-accepted-badge {
|
||||
background-color: rgb(20 184 48) !important;
|
||||
}
|
||||
|
||||
.uoj-unaccepted-badge {
|
||||
background-color: rgb(219 53 53) !important;
|
||||
}
|
||||
|
||||
/* Submission Page */
|
||||
|
||||
.submission-layout {
|
||||
|
@ -110,11 +110,11 @@ function htmlspecialchars(str)
|
||||
|
||||
function getColOfScore(score) {
|
||||
if (score == 0) {
|
||||
return ColorConverter.toStr(ColorConverter.toRGB(new HSV(0, 100, 80)));
|
||||
return ColorConverter.toStr(ColorConverter.toRGB(new HSV(0, 76, 86)));
|
||||
} else if (score == 100) {
|
||||
return ColorConverter.toStr(ColorConverter.toRGB(new HSV(120, 100, 80)));
|
||||
return ColorConverter.toStr(ColorConverter.toRGB(new HSV(130, 89, 72)));
|
||||
} else {
|
||||
return ColorConverter.toStr(ColorConverter.toRGB(new HSV(30 + score * 60 / 100, 100, 90)));
|
||||
return ColorConverter.toStr(ColorConverter.toRGB(new HSV(30 + score * 60 / 100, 83, 89)));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user