implement custom hotbar card view for Daggerheart items with dynamic tooltips
This commit is contained in:
commit
373eb12a6d
5 changed files with 359 additions and 0 deletions
34
templates/cardview.hbs
Normal file
34
templates/cardview.hbs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<div class="dh-hotbar-card">
|
||||
<div class="card-art-container">
|
||||
<img class="card-art" src="{{item.img}}" alt="{{item.name}}">
|
||||
|
||||
{{#if (eq item.type "domainCard")}}
|
||||
<div class="card-ribbon">
|
||||
<span class="level">{{item.system.level}}</span>
|
||||
{{#with (lookup allDomains item.system.domain) as | domain |}}
|
||||
<img src="{{domain.src}}" alt="{{domain.label}}">
|
||||
{{/with}}
|
||||
</div>
|
||||
|
||||
<div class="card-cost">
|
||||
<span>{{item.system.recallCost}}</span>
|
||||
<i class="fa-solid fa-bolt"></i>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<div class="card-type-banner {{item.type}}">
|
||||
{{#if item.system.type}}
|
||||
{{#with (lookup config.DOMAIN.cardTypes item.system.type) as | cardType |}}
|
||||
{{localize cardType.label}}
|
||||
{{/with}}
|
||||
{{else}}
|
||||
{{localize (concat 'TYPES.Item.' item.type)}}
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-content">
|
||||
<h2 class="card-title">{{item.name}}</h2>
|
||||
<div class="card-description">{{{description}}}</div>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue