commit: 42d5ddb64b35bfbcd9e8b122760e54ee3b22879c
parent b0f0e33cdb4868db6f3746a4a845253abda60fd5
Author: neauoire <aliceffekt@gmail.com>
Date: Thu, 28 Nov 2019 10:10:24 -0500
Added images
Diffstat:
1 file changed, 12 insertions(+), 0 deletions(-)
diff --git a/scripts/templates/ingredient.js b/scripts/templates/ingredient.js
@@ -25,8 +25,20 @@ function IngredientTemplate (id, rect) {
let html = ''
html += `<h1>${name.capitalize()}</h1>`
+ html += `<ul class='ingredients' style='float:right'>${print_ingredient(name)}</ul>`
html += ingredient.BREF ? `<p class='bref'>${ingredient.BREF.to_markup()}</p>` : ''
html += ingredient.LONG ? `${new Runic(ingredient.LONG)}` : ''
+
+ if(ingredient.PARENT){
+ const parent_ingr = all_ingredients[ingredient.PARENT.toUpperCase()]
+ if(parent_ingr && parent_ingr.BREF){
+ html += `<p>${parent_ingr.BREF}</p>`
+ }
+ if(parent_ingr && parent_ingr.LONG){
+ html += `${new Runic(parent_ingr.LONG)}`
+ }
+ }
+
html += ingredient.WARN ? `<section id='warn'>${new Runic(ingredient.WARN)}</section>` : ''
const parents = ingredient && ingredient.PARENT ? ingredient.PARENT.split(',') : []