From 7ee00230fd8cda0bdeed6c2e4907d74452f6c888 Mon Sep 17 00:00:00 2001 From: Haka <76921756+Hakorr@users.noreply.github.com> Date: Thu, 22 Sep 2022 18:47:57 +0300 Subject: [PATCH] Fix 'No Image' paragraph --- ui/index.html | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ui/index.html b/ui/index.html index 818fa86f..6aaa0103 100644 --- a/ui/index.html +++ b/ui/index.html @@ -291,6 +291,9 @@ height: 100%; border-radius: 5px 5px 0 0; } + .modifier-card-image * { + position: absolute; + } .modifier-card-container { text-align: center; background-color: rgba(0,0,0,0.5); @@ -1337,7 +1340,7 @@ function createModifierCard(name, previews) {
+

- Modifier Image + Modifier Image
@@ -1346,16 +1349,17 @@ function createModifierCard(name, previews) { const image = modifierCard.querySelector('img'); const errorText = modifierCard.querySelector('p'); + errorText.innerText = 'No Image'; + if (typeof previews == 'object') { image.src = previews[0]; // portrait image.setAttribute('preview-type', 'portrait'); } else { image.remove(); - errorText.innerText = 'No Image'; } modifierCard.querySelector('span').innerText = name.replace('by ', ''); - + return modifierCard; }