From 8d73700a344bda22827e00c15d25945073e3a394 Mon Sep 17 00:00:00 2001 From: valentine195 <38669521+valentine195@users.noreply.github.com> Date: Thu, 13 Jan 2022 14:55:54 -0500 Subject: [PATCH] feat: layout name is now added to statblocks --- src/view/Statblock.svelte | 9 ++++++++- src/view/statblock.ts | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/view/Statblock.svelte b/src/view/Statblock.svelte index 68187646..de83a740 100644 --- a/src/view/Statblock.svelte +++ b/src/view/Statblock.svelte @@ -26,6 +26,7 @@ export let plugin: StatBlockPlugin; export let statblock: StatblockItem[]; export let renderer: StatBlockRenderer; + export let layout: string; let canExport = monster.export ?? plugin.settings.export; let canDice = @@ -102,6 +103,12 @@ ?.toLowerCase() .replace(/[^A-Za-z0-9\s]/g, "") .replace(/\s+/g, "-") ?? "no-name"; + const layoutName = + layout + .toLowerCase() + .replace(/[^A-Za-z0-9\s]/g, "") + .replace(/\s+/g, "-") ?? "no-layout"; + const classes = [name, layoutName].filter((n) => n?.length);