Skip to content

Commit fbc6913

Browse files
committed
change banner to be shades of blue. added step dots to show which stage they are at
1 parent e7e0e99 commit fbc6913

1 file changed

Lines changed: 24 additions & 14 deletions

File tree

bases/rsptx/web2py_server/applications/runestone/views/peer/peer_async.html

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ <h2>Peer Instruction Question (After Class)</h2>
3636

3737
{{ if all_done == "false": }}
3838
<div id="stepBanner" style="
39-
background: #337ab7;
39+
background: #4A9FDE;
4040
color: #fff;
4141
padding: 10px 16px;
4242
border-radius: 4px;
4343
margin-bottom: 12px;
4444
font-size: 16px;
4545
font-weight: bold;
4646
">
47-
Step 1 of 3: Answer the question
47+
<span style="opacity:1"></span> <span style="opacity:0.4"></span> <span style="opacity:0.4"></span> &nbsp;&nbsp;Step 1 of 3: Answer the question
4848
</div>
4949
{{ pass }}
5050

@@ -174,23 +174,33 @@ <h3>Congratulations, you have completed this assignment!</h3>
174174
function updateStepBanner(step) {
175175
const banner = document.getElementById("stepBanner");
176176
if (!banner) return;
177+
banner.style.color = "#fff";
178+
var dots = function(filled) {
179+
var html = "";
180+
for (var i = 0; i < 3; i++) {
181+
var style = i < filled ? "opacity:1" : "opacity:0.4";
182+
html += '<span style="' + style + '">●</span> ';
183+
}
184+
return html;
185+
};
186+
var label;
187+
var bg;
177188
if (step === 1) {
178-
banner.textContent = "Step 1 of 3: Answer the question";
179-
banner.style.background = "#337ab7";
189+
label = "Step 1 of 3: Answer the question";
190+
bg = "#4A9FDE";
180191
} else if (step === 2) {
181-
banner.textContent = "Step 2 of 3: Explain your answer and discuss";
182-
banner.style.background = "#f0ad4e";
183-
banner.style.color = "#333";
192+
label = "Step 2 of 3: Explain your answer and discuss";
193+
bg = "#2878B5";
184194
} else if (step === 3) {
185-
banner.textContent = "Step 3 of 3: Vote again — you may keep or change your answer";
186-
banner.style.background = "#427e44";
187-
banner.style.color = "#fff";
195+
label = "Step 3 of 3: Vote again — you may keep or change your answer";
196+
bg = "#1A5276";
188197
} else if (step === 4) {
189-
const hasNextQ = document.querySelector('form[action="/peer/peer_async"]');
190-
banner.textContent = hasNextQ ? "Done! Move to the next question." : "Done! You have completed this assignment.";
191-
banner.style.background = "#427e44";
192-
banner.style.color = "#fff";
198+
var hasNextQ = document.querySelector('form[action="/peer/peer_async"]');
199+
label = hasNextQ ? "Done! Move to the next question." : "Done! You have completed this assignment.";
200+
bg = "#0E3D56";
193201
}
202+
banner.innerHTML = dots(step > 3 ? 3 : step) + "&nbsp;&nbsp;" + label;
203+
banner.style.background = bg;
194204
}
195205

196206
function setReflectionPanelEnabled(enabled) {

0 commit comments

Comments
 (0)