taf/templates/PlayerSheet/attributes.hbs

34 lines
799 B
Handlebars

{{#if hasAttributes}}
<div class="attributes">
{{#each attrs as | attr |}}
<fieldset data-attribute="{{ attr.id }}">
<legend>
{{ attr.name }}
</legend>
<div class="attr-range">
<input
type="number"
class="attr-range__value"
name="{{attr.path}}.value"
value="{{attr.value}}"
aria-label="Current value"
data-tooltip="@{{ attr.id }}{{#if attr.isRange}}.value{{/if}}"
>
{{#if attr.isRange}}
<span aria-hidden="true">/</span>
<input
type="number"
class="attr-range__max"
name="{{attr.path}}.max"
value="{{attr.max}}"
aria-label="Maximum value"
data-tooltip="@{{ attr.id }}.max"
>
{{/if}}
</div>
</fieldset>
{{/each}}
</div>
{{else}}
<template />
{{/if}}