daggerheart/templates/sheets/global/partials/resource-section.hbs

33 lines
No EOL
1.8 KiB
Handlebars

<fieldset>
<legend>
{{localize "DAGGERHEART.GENERAL.Resource.single"}}
{{#unless source.system.resource}}
<a data-action="addResource"><i class="fa-solid fa-plus icon-button"></i></a>
{{else}}
<a data-action="removeResource"><i class="fa-solid fa-trash"></i></a>
{{/unless}}
</legend>
{{#if source.system.resource}}
<div class="{{#if (eq source.system.resource.type 'simple')}}nest-inputs{{else}}two-columns{{/if}} even">
{{formGroup systemFields.resource.fields.type value=source.system.resource.type localize=true blank=false}}
{{formGroup systemFields.resource.fields.recovery value=source.system.resource.recovery localize=true}}
{{#if (eq source.system.resource.type 'simple')}}
{{formGroup systemFields.resource.fields.progression value=source.system.resource.progression localize=true}}
{{/if}}
</div>
<div class="two-columns even">
{{#if (eq source.system.resource.type 'simple')}}
{{formGroup systemFields.resource.fields.value value=source.system.resource.value localize=true}}
{{formGroup systemFields.resource.fields.max value=source.system.resource.max localize=true}}
{{else}}
{{formGroup systemFields.resource.fields.dieFaces value=source.system.resource.dieFaces localize=true blank=false}}
{{formGroup systemFields.resource.fields.max value=source.system.resource.max label="DAGGERHEART.GENERAL.amount" localize=true}}
{{/if}}
</div>
{{#if (eq source.system.resource.type 'simple')}}{{formGroup systemFields.resource.fields.icon value=source.system.resource.icon localize=true placeholder="fa-solid fa-hashtag"}}{{/if}}
{{/if}}
</fieldset>