Skip to content

Commit

Permalink
cleaning up some kerning issues
Browse files Browse the repository at this point in the history
  • Loading branch information
windoverwater committed Feb 29, 2024
1 parent afb2f43 commit 33cf2cd
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions voting.html
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@ <h2>Your RCV selection:</h2>
if (thisContestValue.contest_type == "ticket") {
newItem.innerHTML = "<h3>Candidates:</h3>";
} else if (thisContestValue.contest_type == "question") {
newItem.innerHTML = "<h2>Your selection:</h2>";
newItem.innerHTML = "<h3>Your selection:</h3>";
} else {
newItem.innerHTML = "<h2>Candidates:</h2>";
newItem.innerHTML = "<h3>Candidates:</h3>";
}
const newList = document.createElement("ul");
newList.setAttribute("id", "choiceList");
Expand Down Expand Up @@ -222,10 +222,10 @@ <h2>Your RCV selection:</h2>
const textElement = document.createElement("span");
// Ugh - need to inspect for the choices data type
if (choice.name) {
textElement.textContent = choice.name;
textElement.innerHTML = "&nbsp&nbsp" + choice.name;
} else {
// Just an array of strings
textElement.textContent = choice;
textElement.innerHTML = "&nbsp&nbsp" + choice;
}
if (thisContestValue.contest_type == "ticket") {
// Note - need to add this as an additional flex-box
Expand All @@ -234,7 +234,7 @@ <h2>Your RCV selection:</h2>
for (let office of thisContestValue.ticket_offices) {
addendum.push(office + ":" + choice.ticket_names);
}
textElement.textContent += "[" + addendum.join(", ") + "]";
textElement.innerHTML += "&nbsp&nbsp[" + addendum.join(", ") + "]";
}
// Add the unselected class
newItem.classList.add("unselected");
Expand Down Expand Up @@ -330,7 +330,7 @@ <h2>Your RCV selection:</h2>
// add an event listener to the button
newButton.addEventListener("click", function (e) {
console.log("Running RCV eventListener:");
let itemName = e.target.parentNode.textContent.trim().replace(/ remove$/, "");
let itemName = e.target.parentNode.textContent.trim().replace(/\sremove$/, "");
console.log("removing:", itemName);
// remove it from sortableList
e.target.parentNode.remove();
Expand All @@ -352,7 +352,7 @@ <h2>Your RCV selection:</h2>

// Create the text element
const textElement = document.createElement("span");
textElement.textContent = selectedText + " ";
textElement.innerHTML = selectedText + "&nbsp&nbsp";

// Append everything ...
newItem.appendChild(svgIcon);
Expand Down

0 comments on commit 33cf2cd

Please sign in to comment.