From 5c4d6c88ae1c51505ce6cd28553ac926c8472543 Mon Sep 17 00:00:00 2001 From: April Eaton Date: Wed, 17 Dec 2025 13:22:08 +0100 Subject: [PATCH] Adding more sections to the gear list Also changing over from a root level object to a root level list for `/gear/gear.json` --- gear/gear.json | 32 +++++++++++++++++++++++++++++--- gear/gear.mjs | 4 ++-- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/gear/gear.json b/gear/gear.json index 84f0756..710d0b7 100644 --- a/gear/gear.json +++ b/gear/gear.json @@ -1,5 +1,5 @@ -{ - "bondage": { +[ + { "name": "Bondage", "id": "bondage", "values": [ @@ -14,5 +14,31 @@ "desc": "Lots of 'em" } ] + }, + { + "name": "Clothes", + "id": "clothes", + "values": [] + }, + { + "name": "Gags", + "id": "gags", + "values": [] + }, + { + "name": "Sensory Deprevation", + "id": "sensory-deprevation", + "values": [] + }, + { + "name": "Food Play", + "id": "food-play", + "values": [ + { + "name": "Pet Bowl", + "id": "pet-bowl", + "desc": "A small dog bowl, ideal for kibble or other mostly solid foods" + } + ] } -} +] diff --git a/gear/gear.mjs b/gear/gear.mjs index 9469d71..1db8fbb 100644 --- a/gear/gear.mjs +++ b/gear/gear.mjs @@ -6,7 +6,7 @@ * * @typedef {{name: string, id: string, values: GearListItem[]}} GearListSection * - * @typedef {{bondage: GearListSection}} GearList + * @typedef {GearListSection[]} GearList */ /** @@ -87,7 +87,7 @@ async function generateGearListArticle(position) { divider.setAttribute("class", "gl-divider"); bondageItems.appendChild(divider); - for (const section of Object.values(list)) { + for (const section of list) { let listSection = buildSection(section); bondageItems.appendChild(listSection);