diff --git a/satiate.css b/satiate.css index 11aebce..07b50e7 100644 --- a/satiate.css +++ b/satiate.css @@ -61,6 +61,14 @@ a:hover { color: #eee; } +#tags-header { + font-size: 36px; +} + +.tag { + font-size: 24px; +} + .modal { position: fixed; z-index: 1; diff --git a/satiate.html b/satiate.html index 7589e7b..7ad6a09 100644 --- a/satiate.html +++ b/satiate.html @@ -35,6 +35,8 @@ +
Tags
+
diff --git a/satiate.js b/satiate.js index 08eb878..bddc461 100644 --- a/satiate.js +++ b/satiate.js @@ -114,6 +114,21 @@ function initStart() { options[story.id] = story; }) + select.addEventListener("change", event => { + const holder = document.querySelector("#tags"); + + holder.innerHTML = ""; + + const tags = stories.filter(s => s.id == [event.target.value])[0].tags; + + tags.forEach(tag => { + const div = document.createElement("div"); + div.textContent = tag; + div.classList.add("tag"); + holder.appendChild(div); + }) + }); + const start = document.querySelector("#start-button"); start.addEventListener("click", (event) => { diff --git a/stories/demo.js b/stories/demo.js index c85fb0a..4e0d494 100644 --- a/stories/demo.js +++ b/stories/demo.js @@ -1,6 +1,9 @@ stories.push({ "id": "demo", "name": "Tech Demo", + "tags": [ + "Memes" + ], "intro": { "start": "Home", "setup": state => { diff --git a/stories/fen-snack.js b/stories/fen-snack.js index 74f8be9..47dadb8 100644 --- a/stories/fen-snack.js +++ b/stories/fen-snack.js @@ -1,6 +1,10 @@ stories.push({ id: "fen-snack", name: "Fen's Food", + tags: [ + "Prey", + "Digestion" + ], sounds: [ "sfx/digested-test.ogg", "loop/fen-stomach.ogg",