diff --git a/scripts/itemDisplay.js b/scripts/itemDisplay.js new file mode 100644 index 0000000..405acce --- /dev/null +++ b/scripts/itemDisplay.js @@ -0,0 +1,15 @@ + document.addEventListener("DOMContentLoaded", function () { + fetch('./scripts/items.json') + .then(Response => Response.json()) + .then(data => { + const itemDisplay = document.getElementById("iType"); + + //creates HTML elements to display JSON data + const typeElement = document.createElement("option"); + typeElement.textContent = items.itemTypes; + + //append the elements to the options + itemDisplay.appendChile(itemDisplay); + }) + .catch(error => console.error("Error fetching JSON Data:", error)); + }); \ No newline at end of file diff --git a/scripts/items.json b/scripts/items.json new file mode 100644 index 0000000..c5f3bd0 --- /dev/null +++ b/scripts/items.json @@ -0,0 +1,11 @@ +{ + "itemtypes":[ + "Item", + "weapons" + ], + "weaponTypes":[ + "Martial", + "Throwing", + "Taser" + ] +} \ No newline at end of file diff --git a/templates/item/item-weapon-sheet.hbs b/templates/item/item-weapon-sheet.hbs new file mode 100644 index 0000000..02b7e64 --- /dev/null +++ b/templates/item/item-weapon-sheet.hbs @@ -0,0 +1,74 @@ +
+ +{{log system}} \ No newline at end of file