Add weights elements

This commit is contained in:
Thomas A. Christensen II 2022-09-24 18:17:09 -05:00
parent 7deca98922
commit 309d3e18a0

View file

@ -1,5 +1,8 @@
<!DOCTYPE html> <!DOCTYPE html>
<body> <body>
<h1>MillironX's Anatomy Quiz Generator</h1>
<h2>Quiz material weighting</h2>
<div id="weights"></div>
<ul id="quiz-terms"></ul> <ul id="quiz-terms"></ul>
<code id="quiz"></code> <code id="quiz"></code>
@ -125,6 +128,21 @@
return `${prop_name}: ${feature} (${prop_content})`; return `${prop_name}: ${feature} (${prop_content})`;
} }
const weights_spinner_div = document.getElementById("weights");
for (structure_type in BoldTerms) {
const form_div = document.createElement("div");
const weight_spinner = document.createElement("input");
weight_spinner.setAttribute("id", `${structure_type}-weight`);
weight_spinner.setAttribute("type", "number");
weight_spinner.setAttribute("value", "10");
const weight_spinner_label = document.createElement("label");
weight_spinner_label.setAttribute("for", `${structure_type}-weight`);
weight_spinner_label.textContent = `${structure_type} `;
form_div.appendChild(weight_spinner_label);
form_div.appendChild(weight_spinner);
weights_spinner_div.append(form_div);
}
const terms = [ const terms = [
"scapula: glenoid cavity", "scapula: glenoid cavity",
"scapula: neck", "scapula: neck",