From 0b7201779c03a1fcb170cb637bc475d1e578a074 Mon Sep 17 00:00:00 2001 From: Branden J Brown Date: Fri, 29 May 2026 14:57:48 -0400 Subject: [PATCH] zenno: use spans for skill tooltips --- zenno/src/lib/Skill.svelte | 44 +++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/zenno/src/lib/Skill.svelte b/zenno/src/lib/Skill.svelte index 402d0ca..b8da408 100644 --- a/zenno/src/lib/Skill.svelte +++ b/zenno/src/lib/Skill.svelte @@ -36,62 +36,62 @@ } return l[0]; }); - const activationClass = $derived(s.activations.length === 1 ? null : 'my-2 border rounded-md'); + const activationClass = $derived(s.activations.length === 1 ? null : 'block my-2 border rounded-md'); const spanClass = $derived(mention ? 'italic' : 'font-bold'); {#snippet condition(disj: string[])} {#each disj as conj, i (conj)} -
{conj}
+ {conj} {#if i !== disj.length - 1} -
or
+ or {/if} {/each} {/snippet} {#snippet abilities(abils: Ability[])} {#each abils as a, i (i)} -
+ {ABILITY_TYPE_FORMAT[a.type](a.value)} {ABILITY_SCALE_NAME[a.value_usage]} {#if a.target && a.target !== Target.Self} {TARGET_FORMAT[a.target](a.target_value)} {/if} -
+ {/each} {/snippet} - -
+ {#each s.activations as act, i (i)} -
+ {#if act.precondition} -
-
Precondition
+ + Precondition {@render condition(splitCond(act.precondition))} -
+
{/if} -
+ {@render condition(splitCond(act.condition))} -
-
+ + {@render abilities(act.abilities)} {#if act.duration != null && act.duration > 0} -
+ for {tenThousandths(act.duration)}s {DURATION_SCALE_NAME[act.dur_scale]} -
+
{/if} -
-
+ + {/each} -
- {s.name} +
+ {s.name}