feat: style action hbs tooltip

This commit is contained in:
molilo 2025-12-18 02:32:41 -03:00
parent a486345d47
commit 908f7b0bb8

View file

@ -1,82 +1,70 @@
<div class="daggerheart dh-style tooltip card-style"> <div class="daggerheart dh-style tooltip card-style">
<h2 class="tooltip-title">{{localize item.name}}</h2>
<img class="tooltip-image" src="{{item.img}}" /> <img class="tooltip-image" src="{{item.img}}" />
<div class="tooltip-description">{{{description}}}</div> <h2 class="tooltip-title">{{localize item.name}}</h2>
{{#if item.uses.max}} <div class="tags">
<h4 class="tooltip-sub-title">{{localize "DAGGERHEART.GENERAL.uses"}}</h4> {{#if item.uses.max}}
<div class="tooltip-information-section triple spaced"> <div class="tag">
<div class="tooltip-information"> <span>{{localize "DAGGERHEART.GENERAL.used"}} {{item.uses.value}}</span>
<label>{{localize "DAGGERHEART.GENERAL.used"}}</label>
<div>{{item.uses.value}}</div>
</div> </div>
<div class="tooltip-information"> <div class="tag">
<label>{{localize "DAGGERHEART.GENERAL.max"}}</label> <span>{{localize "DAGGERHEART.GENERAL.max"}} {{formulaValue item.uses.max item}}</span>
<div>{{formulaValue item.uses.max item}}</div>
</div> </div>
<div class="tooltip-information"> <div class="tag">
<label>{{localize "DAGGERHEART.GENERAL.recovery"}}</label> <span>{{localize "DAGGERHEART.GENERAL.recovery"}} {{#with (lookup config.GENERAL.refreshTypes item.uses.recovery) as | type |}}{{localize type.label}}{{/with}}</span>
{{#with (lookup config.GENERAL.refreshTypes item.uses.recovery) as | type |}}
<div>{{localize type.label}}</div>
{{/with}}
</div> </div>
</div> {{/if}}
{{/if}} {{#if (gt item.cost.length 0)}}
{{#each item.cost as | cost |}}
{{#if (gt item.cost.length 0)}} <div class="tag">
<h4 class="tooltip-sub-title">{{localize "DAGGERHEART.GENERAL.Cost.plural"}}</h4> <span>{{localize "Type"}} {{#with (lookup @root.config.GENERAL.abilityCosts cost.type) as | type |}}{{localize type.label}}{{/with}}</span>
{{#each item.cost as | cost |}}
<div class="tooltip-information-section border spaced">
<div class="tooltip-information">
<label>{{localize "Type"}}</label>
{{#with (lookup @root.config.GENERAL.abilityCosts cost.type) as | type |}}
<div>{{localize type.label}}</div>
{{/with}}
</div> </div>
<div class="tooltip-information"> <div class="tag">
<label>{{localize "DAGGERHEART.GENERAL.value"}}</label> <span>{{localize "DAGGERHEART.GENERAL.value"}} {{cost.value}}</span>
<div>{{cost.value}}</div> </div>
<div class="tag">
<span>{{localize "DAGGERHEART.GENERAL.value"}} {{cost.value}}</span>
</div> </div>
{{#if cost.scalable}} {{#if cost.scalable}}
<div class="tooltip-information"> <div class="tag">
<label>{{localize "DAGGERHEART.GENERAL.scalable"}}</label> <span>{{localize "DAGGERHEART.GENERAL.scalable"}} {{localize "DAGGERHEART.GENERAL.true"}}</span>
<div>{{localize "DAGGERHEART.GENERAL.true"}}</div> </div>
</div> <div class="tag">
<div class="tooltip-information"> <span>{{localize "DAGGERHEART.GENERAL.value"}} {{cost.step}}</span>
<label>{{localize "DAGGERHEART.GENERAL.value"}}</label> </div>
<div>{{cost.step}}</div>
</div>
{{/if}} {{/if}}
{{/each}}
{{/if}}
{{#if (or item.range item.target)}}
<div class="tag">
<span>
{{localize "DAGGERHEART.GENERAL.range"}}
{{#if item.range}}
{{#with (lookup @root.config.GENERAL.range item.range) as | range |}}
{{localize range.label}}
{{/with}}
{{else}}
{{localize "DAGGERHEART.GENERAL.none"}}
{{/if}}
</span>
</div> </div>
{{/each}} {{/if}}
{{/if}} <div class="tag">
<span>
{{#if (or item.range item.target)}} {{localize "DAGGERHEART.GENERAL.Target.single"}}
<h4 class="tooltip-sub-title">{{localize "DAGGERHEART.UI.Tooltip.rangeAndTarget"}}</h4> {{#if item.target.type}}
<div class="tooltip-information-section border spaced"> {{#with (lookup @root.config.ACTIONS.targetTypes item.target.type) as | target |}}
<div class="tooltip-information"> {{@root.item.target.amount}} {{localize target.label}}
<label>{{localize "DAGGERHEART.GENERAL.range"}}</label> {{/with}}
<div> {{else}}
{{#if item.range}} {{localize "DAGGERHEART.GENERAL.none"}}
{{#with (lookup @root.config.GENERAL.range item.range) as | range |}} {{/if}}
<div>{{localize range.label}}</div> </span>
{{/with}}
{{else}}
<div>{{localize "DAGGERHEART.GENERAL.none"}}</div>
{{/if}}
</div>
</div>
<div class="tooltip-information">
<label>{{localize "DAGGERHEART.GENERAL.Target.single"}}</label>
<div>
{{#if item.target.type}}
{{#with (lookup @root.config.ACTIONS.targetTypes item.target.type) as | target |}}
<div>{{@root.item.target.amount}} {{localize target.label}}</div>
{{/with}}
{{else}}
<div>{{localize "DAGGERHEART.GENERAL.none"}}</div>
{{/if}}
</div>
</div>
</div> </div>
</div>
{{#if description}}
<div class="tooltip-description">{{{description}}}</div>
{{/if}} {{/if}}
<p class="tooltip-hint">
<i class="fa-solid fa-computer-mouse"></i> {{localize "DAGGERHEART.UI.Tooltip.middleClick"}}
</p>
</div> </div>