0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-03-22 06:48:11 +00:00

curate suggestion and add in some color

This commit is contained in:
Víctor Losada Hernández
2026-02-15 23:40:41 +01:00
parent 1c35d08a5c
commit 8cdc5ab0af
5 changed files with 399 additions and 34 deletions

View File

@@ -117,7 +117,7 @@
&.tags .tagInput-dropdown {
z-index : 201;
max-width : 150px;
max-width : 200px;
}
}

View File

@@ -0,0 +1,341 @@
export default [
// ############################## Systems
// D&D
"system:D&D Original",
"system:D&D Basic",
"system:AD&D 1e",
"system:AD&D 2e",
"system:D&D 3e",
"system:D&D 3.5e",
"system:D&D 4e",
"system:D&D 5e",
"system:D&D 5e 2024",
"system:BD&D (B/X)",
"system:D&D Essentials",
// Other Famous RPGs
"system:Pathfinder 1e",
"system:Pathfinder 2e",
"system:Vampire: The Masquerade",
"system:Werewolf: The Apocalypse",
"system:Mage: The Ascension",
"system:Call of Cthulhu",
"system:Shadowrun",
"system:Star Wars RPG (D6/D20/Edge of the Empire)",
"system:Warhammer Fantasy Roleplay",
"system:Cyberpunk 2020",
"system:Blades in the Dark",
"system:Daggerheart",
"system:Draw Steel",
"system:Mutants and Masterminds",
// ###################################### RPG Keywords
// Meta
"meta:Template",
"meta:Theme",
"meta:free",
"meta:Character Sheet",
"meta:Documentation",
"meta:NPC",
"meta:Guide",
"Resource",
"notes",
"syntax",
"example",
"stat block",
"Character Sheet",
// Classes / Subclasses / Archetypes
"Class",
"Subclass",
"Archetype",
"Martial",
"Half-Caster",
"Full Caster",
"Artificer",
"Barbarian",
"Bard",
"Cleric",
"Druid",
"Fighter",
"Monk",
"Paladin",
"Rogue",
"Sorcerer",
"Warlock",
"Wizard",
// Races / Species / Lineages
"Race",
"Ancestry",
"Lineage",
"Aasimar",
"Beastfolk",
"Dragonborn",
"Dwarf",
"Elf",
"Goblin",
"Half-Elf",
"Half-Orc",
"Human",
"Kobold",
"Lizardfolk",
"Lycan",
"Orc",
"Tiefling",
"Vampire",
"Yuan-Ti",
// Magic / Spells / Items
"Magic",
"Magic Item",
"Magic Items",
"Wondrous Item",
"Magic Weapon",
"Artifact",
"Spell",
"Spells",
"cantrip",
"cantrips",
"Eldritch",
"Eldritch Invocation",
"invocation",
"Invocations",
"pact boon",
"Pact Boon",
"Spellcaster",
"spellcaster",
"Spellblade",
"Magical Tattoos",
"Enchantment",
"Enchanted",
"Attunement",
"Requires Attunement",
"Rune",
"Runes",
"Wand",
"Rod",
"Scroll",
"Potion",
"Potions",
"Item",
"Items",
"Bag of Holding",
// Book type
"type:Campaign",
"type:Campaign Setting",
"type:Adventure",
"type:One-Shot",
"type:Setting",
"type:World",
"type:Lore",
"type:History",
"type:Dungeon Master",
"type:Encounter Pack",
"type:Encounter",
"type:Session Notes",
"type:reference",
"type:Handbook",
"type:Manual",
"type:Manuals",
"type:Compendium",
"type:Bestiary",
// Monsters / Creatures / Enemies
"Monster",
"Creatures",
"Creature",
"Beast",
"Beasts",
"Humanoid",
"Undead",
"Fiend",
"Aberration",
"Ooze",
"Giant",
"Dragon",
"Monstrosity",
"Demon",
"Devil",
"Elemental",
"Construct",
"Constructs",
"Boss",
"BBEG",
// ############################# Document meta tags
"meta:v3",
"meta:Legacy",
];
const ReadList = [
// Systems / Editions
"5e",
"5th Edition",
"5.5e",
"5e'24",
"5.24",
"5e 2024",
"D&D 5e",
"DnD 5e",
"DnD5e",
"D&D 5e24",
"DnD5e24",
"D&D 2024",
"system:pf2e",
"system:dnd5.5",
"system:dnd5e",
"system:dnd",
"system:5e",
"system:d&d5e",
"system:D&D 5e24",
"system:book clone",
"system:curse of strahd",
"system:descent into avernus",
"system:GM Binder",
"system:Ord",
"system:sf2e",
"system:Mutants and Masterminds",
"system:2e",
"system:class",
"PF2e",
"pf2e",
"3.5e",
"3.5",
"system:pf2e",
"DnD",
"DND",
"dnd",
"dnd-2014",
"dnd-2024",
"dnd5e",
"DnD 5e",
"DnD5e24",
"DnDBeyond",
"DnDBehindTheScreen",
"Dd5",
"DD5",
"dd5",
"dd5e",
"system:D&D",
"system:D&D 5e24",
"system:d&d5e",
"system:5e",
"system:daggerheart",
"system:dnd5e",
"system:dnd5.5",
"system:dnd",
"system:GM Binder",
"system:Ord",
"system:sf2e",
"system:curse of strahd",
"system:descent into avernus",
"system:class",
"system:Mutants and Masterminds",
"system:2e",
// Media / Pop Culture
"One Piece",
"One Piece DND",
"Luffy",
"Dragon Ball",
"Dragon Ball Z",
"Dragon Ball Z TTRPG",
"Dragon Ball Z RPG",
"Dragon Ball Z DND",
"Dragon Ball Z 5e",
"Naruto",
"Naruto 5e",
"Jujutsu Kaisen",
"Fairy Tail",
"Final Fantasy",
"Final Fantasy XIV",
"Final Fantasy 7 Remake",
"FF7",
"FFXI",
"Kingdom Hearts",
"Elder Scrolls",
"Elder Scrolls Offline",
"Skyrim",
"WoW",
"World of Warcraft",
"Marvel Comics",
"DC Comics",
"Pokémon",
"Pokemon",
"League of Legends",
"Runeterra",
"Yu-Gi-Oh",
"Minecraft",
"Minecraft Mods",
"Don't Starve",
"Witcher",
"Witcher 3",
"Cyberpunk",
"Cyberpunk 2077",
"Fallout",
"Divinity Original Sin 2",
"Fullmetal Alchemist",
"Fullmetal Alchemist Brotherhood",
"Lobotomy Corporation",
"Bloodborne",
"Dragonlance",
"Shackled City Adventure Path",
"Baldurs Gate 3",
"Library of Ruina",
"Radiant Citadel",
"Ravenloft",
"Forgotten Realms",
"Exandria",
"Critical Role",
"Star Wars",
"SW5e",
"SW5E",
"Star Wars 5e",
// Tools / Resources / Templates / Notes
"Template",
"Templates",
"Style Template",
"meta:Template",
"meta:Theme",
"meta:5e24 Style",
"meta:khaoz age",
"meta:gratis",
"meta:free",
"meta:Sheet",
"meta:documentation",
"meta:npc",
"meta:User Guide",
"fa-solid fa-sheet-plastic:Ficha",
"tag:Class",
"tag:Rules",
"tag:Spells",
"tag:Adventure",
"tag:Spell List",
"tag:TAoF&F",
"tag:Berean",
"resource",
"Resources",
"support",
"user help",
"notes",
"note",
"quick ref",
"reminder cards",
"syntax",
"css",
"custom css",
"example",
"examples",
"snippet",
"snippets",
"tables",
"chart",
"stat block",
"stat blocks",
"statblock",
];

View File

@@ -2,7 +2,7 @@ import "./tagInput.less";
import React, { useState, useEffect, useMemo } from "react";
import Combobox from "../../../components/combobox.jsx";
import tagSuggestionList from "./tagSuggestionList.js";
import tagSuggestionList from "./curatedTagSuggestionList.js";
const TagInput = ({ label, unique = true, values = [], placeholder = "", onChange }) => {
const [tagList, setTagList] = useState(
@@ -81,16 +81,44 @@ const TagInput = ({ label, unique = true, values = [], placeholder = "", onChang
setTagList((prev) => prev.map((t, i) => ({ ...t, editing: i === index })));
};
const suggestionOptions = tagSuggestionList.map((tag) => (
<div
className="item"
key={`tag-${tag}`} // unique key
value={tag}
data={tag}
title={tag}>
{tag}
</div>
));
const suggestionOptions = tagSuggestionList.map((tag) => {
const tagType = tag.split(':');
let classes = 'item';
switch (tagType[0]) {
case 'type':
classes = 'item type'
break;
case 'group':
classes = 'item group'
break;
case 'meta':
classes = 'item meta'
break;
case 'system':
classes = 'item system'
break;
default:
classes = 'item'
break;
}
return (
<div
className={classes}
key={`tag-${tag}`} // unique key
value={tag}
data={tag}
title={tag}>
{tag}
</div>
);
});
return (
<div className="field tags">

View File

@@ -0,0 +1,18 @@
.tagInput-dropdown {
.dropdown-options {
.item {
&.type {
background-color: #00800035;
}
&.group {
background-color: #50505035;
}
&.meta {
background-color: #00008035;
}
&.system {
background-color: #80000035;
}
}
}
}

View File

@@ -750,27 +750,6 @@ export default [
"Arvore I",
"Fim da Jornada",
"greek god",
"-1 OR 5*5=25 --",
"-1 OR 5*5=26 --",
"-1 OR 5*5=25",
"-1 OR 5*5=26",
"-1' OR 5*5=25 --",
"-1' OR 5*5=26 --",
"-1\" OR 5*5=25 --",
"-1\" OR 5*5=26 --",
"1*if(now()=sysdate(),sleep(15),0)",
"10'XOR(1*if(now()=sysdate(),sleep(15),0))XOR'Z",
"10\"XOR(1*if(now()=sysdate(),sleep(15),0))XOR\"Z",
"(select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'\"+(select(0)from(select(sleep(15)))v)+\"*/",
"1-1; waitfor delay '0:0:15' --",
"1-1); waitfor delay '0:0:15' --",
"1-1 waitfor delay '0:0:15' --",
"1*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),15)",
"1'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'",
"'\"",
"<22><><EFBFBD><EFBFBD>%2527%2522\\'\\\"",
"(select 198766*667891)",
"(select 198766*667891 from DUAL)",
"dwarf",
"Firearms",
"3.5e",
@@ -1347,7 +1326,6 @@ export default [
"system:sf2e",
"drakkenheim",
"downtime",
"v1.1",
"amulet",
"Feiticeiros e Maldicoes",
"Tecnica amaldicoada",