Skip to content

Commit d87e496

Browse files
committed
learning progress table formatting
1 parent b68925b commit d87e496

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

css/foundation.css

+4
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,8 @@
2929

3030
a > span.label {
3131
cursor: pointer;
32+
}
33+
34+
.section {
35+
margin-bottom: 50px;
3236
}

css/settings.css

-4
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ html {
1313
overflow-y: auto;
1414
}
1515

16-
.section {
17-
margin-bottom: 50px;
18-
}
19-
2016
.vocabHeader {
2117
position: sticky;
2218
top: -1px;

js/points.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,16 @@ async function fillTables() {
4545

4646
for (const indexRange in indexRanges) {
4747
$("#byIndexTable tbody").append(`<tr>
48-
<td>${indexRange}</td>
49-
<td>${Math.round(indexRanges[indexRange].nCorrect / indexRanges[indexRange].totalCorrectNeeded * 1000) / 10}%</td>
50-
<td>${Math.round(indexRanges[indexRange].wordsDone / indexRanges[indexRange].totalWords * 1000) / 10}%</td></tr>`);
48+
<td><span class="hide-for-large">Index range: </span>${indexRange}</td>
49+
<td><span class="hide-for-large">Progress to goal: </span>${Math.round(indexRanges[indexRange].nCorrect / indexRanges[indexRange].totalCorrectNeeded * 1000) / 10}%</td>
50+
<td><span class="hide-for-large">Words completed: </span>${Math.round(indexRanges[indexRange].wordsDone / indexRanges[indexRange].totalWords * 1000) / 10}%</td></tr>`);
5151
}
5252

5353
for (const level in levels) {
5454
$("#byLevelTable tbody").append(`<tr>
55-
<td>${level}</td>
56-
<td>${Math.round(levels[level].nCorrect / levels[level].totalCorrectNeeded * 1000) / 10}%</td>
57-
<td>${Math.round(levels[level].wordsDone / levels[level].totalWords * 1000) / 10}%</td></tr>`);
55+
<td><span class="hide-for-large">Level </span>${level}</td>
56+
<td><span class="hide-for-large">Progress to goal: </span>${Math.round(levels[level].nCorrect / levels[level].totalCorrectNeeded * 1000) / 10}%</td>
57+
<td><span class="hide-for-large">Words completed: </span>${Math.round(levels[level].wordsDone / levels[level].totalWords * 1000) / 10}%</td></tr>`);
5858
}
5959
}
6060

points.html

+4-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ <h1>Learning progress</h1>
4040

4141
<div class="grid-container section">
4242
<div>
43-
<h5>By word index</h5>
43+
<h4>By word index</h4>
4444
<div>
4545
<table id="byIndexTable" class="stack">
4646
<thead>
@@ -54,9 +54,11 @@ <h5>By word index</h5>
5454
</table>
5555
</div>
5656
</div>
57+
</div>
5758

59+
<div class="grid-container section">
5860
<div>
59-
<h5>By level</h5>
61+
<h4>By level</h4>
6062
<div>
6163
<table id="byLevelTable" class="stack">
6264
<thead>

0 commit comments

Comments
 (0)