Skip to content

Commit e411302

Browse files
committed
width classes and dynamic penalty times in test info
1 parent 532d98d commit e411302

File tree

2 files changed

+28
-7
lines changed

2 files changed

+28
-7
lines changed

app/pods/components/full-screen-contest-view/template.hbs

+15-6
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<h2 class="text-ellipses">{{contest.name}}</h2>
77
<div class="hoverable ml-3">
88
<i class="fas fa-info-circle round orange font-md pulse-red"></i>
9-
<div class="pop-up">
9+
<div class="pop-up w-350x">
1010
<div class="test-info-popup border-card bg-grey black">
1111
Note:
1212
<ul class="bold">
@@ -20,22 +20,27 @@
2020
</li>
2121
{{#if contest.disallowTabSwitch}}
2222
<li>
23-
Tab Switching Prohibited <span class="red">You will get a penalty of 10 mins in case you switch tab after 3 faults.</span>
23+
Tab Switching Prohibited <span class="red">You will get a penalty of {{contest.tabSwitchPenalty}} mins in case you switch tab after 3 faults.</span>
2424
</li>
2525
{{/if}}
2626
{{#if contest.disallowWindowResize}}
2727
<li>
28-
Window Resizing Prohibited <span class="red">You will get a penalty of 10 mins every 10 secs if your window is not fullscreen.</span>
28+
Window Resizing Prohibited <span class="red">You will get a penalty of {{contest.windowResizePenalty}} mins every 10 secs if your window is not fullscreen.</span>
29+
</li>
30+
{{/if}}
31+
{{#if contest.disallowWindowMove}}
32+
<li>
33+
Window Movement Prohibited <span class="red">You will get a penalty of {{contest.windowMovePenalty}} mins every 10 secs if your window is not fullscreen.</span>
2934
</li>
3035
{{/if}}
3136
{{#if contest.disallowNoFace}}
3237
<li>
33-
Face Detection Enabled <span class="red">You will get a penalty of 10 mins every 5 secs if your face is not visible in camera after 3 faults.</span>
38+
Face Detection Enabled <span class="red">You will get a penalty of {{contest.noFacePenalty}} mins every 5 secs if your face is not visible in camera after 3 faults.</span>
3439
</li>
3540
{{/if}}
3641
{{#if contest.disallowMultipleFaces}}
3742
<li>
38-
Multiple Face Detection Enabled <span class="red">You will get a penalty of 10 mins every 5 secs if multiple faces are visible in camera after 3 faults.</span>
43+
Multiple Face Detection Enabled <span class="red">You will get a penalty of {{contest.multipleFacesPenalty}} mins every 5 secs if multiple faces are visible in camera after 3 faults.</span>
3944
</li>
4045
{{/if}}
4146
</ul>
@@ -77,7 +82,7 @@
7782
{{#if (or attempt.tabSwitchCount attempt.windowResizeCount attempt.noFaceCount attempt.multipleFacesCount)}}
7883
<div class="hoverable pill-sm bg-gradient-pink pulse-red mt-3 py-1 px-2">
7984
<span class="font-xxs">Penalties</span>
80-
<div class="border-card border-dark-pink pop-up w-250x pt-2 px-3">
85+
<div class="border-card border-dark-pink pop-up w-350x l-center pt-2 px-3">
8186
<div class="font-xxs mt-2 red">
8287
{{#if contest.disallowTabSwitch}}
8388
Total Tab Switches: {{or attempt.tabSwitchCount 0}} | {{or attempt.tabSwitchTimePenaltyMinutes 0}} mins deducted
@@ -87,6 +92,10 @@
8792
Total Window Resizes: {{or attempt.windowResizeCount 0}} | {{or attempt.windowResizeTimePenaltyMinutes 0}} mins deducted
8893
{{/if}}
8994
<br>
95+
{{#if contest.disallowWindowMove}}
96+
Total Window Moves: {{or attempt.windowMoveCount 0}} | {{or attempt.windowMoveTimePenaltyMinutes 0}} mins deducted
97+
{{/if}}
98+
<br>
9099
{{#if contest.disallowNoFace}}
91100
Total Face Undetected: {{or attempt.noFaceCount 0}} | {{or attempt.noFaceTimePenaltyMinutes 0}} mins deducted
92101
{{/if}}

app/styles/app.scss

+13-1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,18 @@ body{
7070
width: 250%;
7171
}
7272

73+
.w-300x {
74+
width: 300%;
75+
}
76+
77+
.w-350x {
78+
width: 350%;
79+
}
80+
81+
.l-center {
82+
left: -50%;
83+
}
84+
7385
.top-left {
7486
top: 0;
7587
left: 0;
@@ -96,7 +108,7 @@ body{
96108
}
97109

98110
.test-info-popup{
99-
width: 240px;
111+
width: 500px;
100112
}
101113

102114
.b-orange-hover:hover {

0 commit comments

Comments
 (0)