fixed tier = space error, placeholer color

This commit is contained in:
ferricles 2021-01-10 02:13:58 -08:00
parent 6f32081a10
commit a41c2c4366
3 changed files with 14 additions and 8 deletions

View file

@ -315,8 +315,11 @@ function displayExpandedItem(item, parent_id){
" [ " + item.get("powders").map(x => powderNames.get(x)) + " ]"; " [ " + item.get("powders").map(x => powderNames.get(x)) + " ]";
}else if(id === "displayName"){ }else if(id === "displayName"){
p_elem.classList.add("title"); p_elem.classList.add("title");
if(item.get("tier") !== " "){
p_elem.classList.add(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 else if (rolledIDs.includes(id) && item.get("minRolls").get(id)){ // && item.get("maxRolls").get(id) ){//rolled ID & non-0/non-null/non-und ID
let style = "positive"; let style = "positive";
@ -355,7 +358,7 @@ function displayExpandedItem(item, parent_id){
}//Just don't do anything if else }//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'); let item_desc_elem = document.createElement('p');
item_desc_elem.classList.add('itemp'); item_desc_elem.classList.add('itemp');
item_desc_elem.classList.add('left'); item_desc_elem.classList.add('left');
@ -469,14 +472,14 @@ function displayMeleeDamage(parent_elem, meleeStats){
for (let i = 0; i < 6; i++){ for (let i = 0; i < 6; i++){
if(stats[i][0] > 0){ if(stats[i][0] > 0){
let dmg = document.createElement("p"); 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(damageClasses[i]);
dmg.classList.add("itemp"); dmg.classList.add("itemp");
nonCritStats.append(dmg); nonCritStats.append(dmg);
} }
} }
let normalDamage = document.createElement("p"); 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"); normalDamage.classList.add("itemp");
nonCritStats.append(normalDamage); nonCritStats.append(normalDamage);
@ -499,14 +502,14 @@ function displayMeleeDamage(parent_elem, meleeStats){
for (let i = 0; i < 6; i++){ for (let i = 0; i < 6; i++){
if(stats[i][2] > 0){ if(stats[i][2] > 0){
dmg = document.createElement("p"); 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(damageClasses[i]);
dmg.classList.add("itemp"); dmg.classList.add("itemp");
critStats.append(dmg); critStats.append(dmg);
} }
} }
let critDamage = document.createElement("p"); 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"); critDamage.classList.add("itemp");
critStats.append(critDamage); critStats.append(critDamage);

View file

@ -84,7 +84,7 @@
<br> <br>
<div> <div>
<label for="weapon-choice">Weapon:</label> <label for="weapon-choice">Weapon:</label>
<input list="weapon-items" id="weapon-choice" name="weapon-choice" value=""/> <input list="weapon-items" id="weapon-choice" name="weapon-choice" placeholder="No Weapon" value=""/>
<datalist id="weapon-items"> <datalist id="weapon-items">
</datalist> </datalist>
</div> </div>

View file

@ -217,6 +217,9 @@ input {
font-weight: 700; font-weight: 700;
display: inline-block; display: inline-block;
} }
::placeholder{
color: #ddd;
}
/* Tier colors tier colors */ /* Tier colors tier colors */
.Normal{ .Normal{
color: #fff; color: #fff;