dh-hotbar-cardview/templates/cardview.hbs

106 lines
4.4 KiB
Handlebars

<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>
{{#if (and (eq item.type "weapon") settings.weapon)}}
<div class="card-tags">
<div class="tag">
<span>{{#if item.system.secondary}}{{localize "DAGGERHEART.ITEMS.Weapon.secondaryWeapon.full"}}{{else}}{{localize "DAGGERHEART.ITEMS.Weapon.primaryWeapon.full"}}{{/if}}</span>
</div>
<div class="tag">
{{#with (lookup config.GENERAL.burden item.system.burden) as | burden |}}
<span>{{localize burden.label}}</span>
{{/with}}
</div>
{{#if item.system.attack.roll.trait}}
<div class="tag">
{{#with (lookup config.ACTOR.abilities item.system.attack.roll.trait) as | trait |}}
<span>{{localize trait.label}}</span>
{{/with}}
</div>
{{/if}}
<div class="tag">
{{#with (lookup config.GENERAL.range item.system.attack.range) as | range |}}
<span>{{localize range.label}}</span>
{{/with}}
</div>
<div class="tag damage-tag">
<span>{{{damageFormula item.system.attack}}} {{{damageSymbols item.system.attack.damage.parts}}}</span>
</div>
</div>
{{/if}}
{{#if (and (eq item.type "armor") settings.armor)}}
<div class="card-tags">
<div class="tag">
<span>{{localize "DAGGERHEART.ITEMS.Armor.baseScore"}} {{item.system.baseScore}}</span>
</div>
<div class="tag">
<span>{{localize "DAGGERHEART.ITEMS.Armor.baseThresholds.major"}} {{item.system.baseThresholds.major}}</span>
</div>
<div class="tag">
<span>{{localize "DAGGERHEART.ITEMS.Armor.baseThresholds.severe"}} {{item.system.baseThresholds.severe}}</span>
</div>
</div>
{{/if}}
{{#if (and (eq item.type "consumable") settings.consumable)}}
<div class="card-tags">
<div class="tag">
<span>{{localize "DAGGERHEART.GENERAL.quantity"}} {{item.system.quantity}}</span>
</div>
</div>
{{/if}}
{{#if (and (eq item.type "feature") settings.feature)}}
<div class="card-tags">
<div class="tag">
<span>{{#if featureSource}}{{featureSource}}{{else}}{{localize "TYPES.Item.feature"}}{{/if}}</span>
</div>
</div>
{{/if}}
{{#if (and (eq item.type "domainCard") settings.domain)}}
<div class="card-tags">
<div class="tag">
{{#with (lookup config.DOMAIN.cardTypes item.system.type) as | type |}}
<span>{{localize type.label}}</span>
{{/with}}
</div>
<div class="tag">
<span>{{localize 'DAGGERHEART.GENERAL.levelShort'}} {{ item.system.level }}</span>
</div>
</div>
{{/if}}
<div class="card-description">{{{description}}}</div>
</div>
</div>