Skip to content

Commit 7ed20c5

Browse files
rushabhhereparnavh
andauthored
style(vm): using semantic tags for stats and added bottom margin (#14)
* fix: using semantic tags for stats and added bottom margin to stat container --------- Co-authored-by: parnavh <parnav100sach@gmail.com>
1 parent be8f0ac commit 7ed20c5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/entrypoints/gregmat.content/vocab-mountain.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ async function addStats() {
119119
if (!summary) {
120120
summary = document.createElement("div");
121121
summary.textContent = "loading...";
122-
summary.classList.add("text-lg", "dark:text-gray-50", "text-center");
122+
summary.classList.add("text-lg", "dark:text-gray-50", "text-center", "mb-6");
123123
summary.setAttribute("id", "buddy-stats");
124124
parent.prepend(summary);
125125
}
@@ -194,7 +194,9 @@ function getVocabStatsText(correct: number, total: number) {
194194
color = "#4caf50"; // text-green-500
195195
}
196196

197-
return `Stats: <div class="flex">Accuracy: ${correct}/${total} | <p class="font-semibold ml-1" style="color: ${color};"> ${percentage.toFixed(
198-
2
199-
)}% </p> </div>`;
197+
return `<h3 class="font-semibold underline mb-2">Stats</h3>
198+
<ul>
199+
<li>Accuracy: ${correct}/${total} | <span class="font-semibold ml-1" style="color: ${color};">${percentage.toFixed(2)}%</span></li>
200+
</ul>
201+
`;
200202
}

0 commit comments

Comments
 (0)