From a41c2c4366c71f1aa5ac23509e0bdf9fe6170f99 Mon Sep 17 00:00:00 2001 From: ferricles Date: Sun, 10 Jan 2021 02:13:58 -0800 Subject: [PATCH] fixed tier = space error, placeholer color --- display.js | 17 ++++++++++------- index.html | 2 +- styles.css | 3 +++ 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/display.js b/display.js index 7e548b6..4fa8837 100644 --- a/display.js +++ b/display.js @@ -314,8 +314,11 @@ function displayExpandedItem(item, parent_id){ p_elem.textContent = idPrefixes[id].concat(item.get(id), idSuffixes[id]) + " [ " + item.get("powders").map(x => powderNames.get(x)) + " ]"; }else if(id === "displayName"){ - p_elem.classList.add("title"); - p_elem.classList.add(item.get("tier")); + p_elem.classList.add("title"); + if(item.get("tier") !== " "){ + p_elem.classList.add(item.get("tier")); + } + } } else if (rolledIDs.includes(id) && item.get("minRolls").get(id)){ // && item.get("maxRolls").get(id) ){//rolled ID & non-0/non-null/non-und ID @@ -355,7 +358,7 @@ function displayExpandedItem(item, parent_id){ }//Just don't do anything if else } } - if (item.get("tier")) { + if (item.get("tier") & item.get("tier") !== " ") { let item_desc_elem = document.createElement('p'); item_desc_elem.classList.add('itemp'); item_desc_elem.classList.add('left'); @@ -469,14 +472,14 @@ function displayMeleeDamage(parent_elem, meleeStats){ for (let i = 0; i < 6; i++){ if(stats[i][0] > 0){ let dmg = document.createElement("p"); - dmg.textContent = stats[i][0] + " - " + stats[i][1]; + dmg.textContent = stats[i][0] + "-" + stats[i][1]; dmg.classList.add(damageClasses[i]); dmg.classList.add("itemp"); nonCritStats.append(dmg); } } let normalDamage = document.createElement("p"); - normalDamage.textContent = "Total: " + stats[6][0] + " - " + stats[6][1]; + normalDamage.textContent = "Total: " + stats[6][0] + "-" + stats[6][1]; normalDamage.classList.add("itemp"); nonCritStats.append(normalDamage); @@ -499,14 +502,14 @@ function displayMeleeDamage(parent_elem, meleeStats){ for (let i = 0; i < 6; i++){ if(stats[i][2] > 0){ dmg = document.createElement("p"); - dmg.textContent = stats[i][2] + " - " + stats[i][3]; + dmg.textContent = stats[i][2] + "-" + stats[i][3]; dmg.classList.add(damageClasses[i]); dmg.classList.add("itemp"); critStats.append(dmg); } } let critDamage = document.createElement("p"); - critDamage.textContent = "Total: " + stats[7][0] + " - " + stats[7][1]; + critDamage.textContent = "Total: " + stats[7][0] + "-" + stats[7][1]; critDamage.classList.add("itemp"); critStats.append(critDamage); diff --git a/index.html b/index.html index fe220ba..ec2080d 100644 --- a/index.html +++ b/index.html @@ -84,7 +84,7 @@
- +
diff --git a/styles.css b/styles.css index b28b536..15c2f53 100644 --- a/styles.css +++ b/styles.css @@ -217,6 +217,9 @@ input { font-weight: 700; display: inline-block; } +::placeholder{ + color: #ddd; +} /* Tier colors tier colors */ .Normal{ color: #fff;