working weapons section in char sheet
Additions: - re-added getData() method of actor sheet for sorted items - added an item-description CSS class for handling of overflow - added a 1.5 CSS flex box Changes: - restricted previous sample items section to only weapons (to be re-used for other item types) Fixes: - fixed input types in weapon sheet
This commit is contained in:
parent
2fc7fb13c8
commit
2ac6d3a919
5 changed files with 80 additions and 13 deletions
|
@ -1,26 +1,61 @@
|
|||
{{!-- TODO: add localization! --}}
|
||||
{{!-- Tab with overview and quick-actions on owned items --}}
|
||||
<div class="tab items" data-group="primary" data-tab="items">
|
||||
|
||||
{{!-- WEAPONS --}}
|
||||
<h3>Weapons</h3>
|
||||
<ol class="items-list">
|
||||
<li class="item flexrow item-header">
|
||||
<div class="item-image"></div>
|
||||
<div class="item-name">Name</div>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-create" title="Create item" data-type="weapon"
|
||||
><i class="fas fa-plus"></i> Add item</a
|
||||
>
|
||||
<div class="flexrow flex15">
|
||||
<div></div> {{!-- equipped --}}
|
||||
<div class="item-image"></div>
|
||||
<div>#</div> {{!-- amount --}}
|
||||
</div>
|
||||
<div class="item-name flex2">Name</div>
|
||||
<div>AT</div> {{!-- attack type --}} {{!-- SPECIFIC --}}
|
||||
<div class="flexrow flex15">
|
||||
<div>WB</div> {{!-- weapon bonus --}} {{!-- SPECIFIC --}}
|
||||
<div>OD</div> {{!-- opponent defence --}} {{!-- SPECIFIC --}}
|
||||
</div>
|
||||
<div class="flex4">Desc</div> {{!-- description --}}
|
||||
{{!-- add button --}}
|
||||
<div class="item-controls"> {{!-- SPECIFIC --}}
|
||||
<a class="item-control item-create" title="Create item" data-type="weapon"><i class="fas fa-plus"></i>
|
||||
Add item</a> {{!-- SPECIFIC --}}
|
||||
</div>
|
||||
</li>
|
||||
{{#each actor.items as |item id|}}
|
||||
{{#each itemsByType.weapon as |item id|}} {{!-- SPECIFIC --}}
|
||||
{{#with item.data.data as |itemData|}}
|
||||
<li class="item flexrow" data-item-id="{{item._id}}">
|
||||
<div class="item-image">
|
||||
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24" />
|
||||
<div class="flexrow flex15">
|
||||
{{!-- equipped? --}}
|
||||
{{#if itemData.equipped}}<i class="fas fa-check-square"></i>
|
||||
{{else}}<i class="far fa-square"></i>
|
||||
{{/if}} {{!--SPECIFIC --}}
|
||||
{{!-- image --}}
|
||||
<div class="item-image">
|
||||
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24" />
|
||||
</div>
|
||||
{{!-- amount --}}
|
||||
<div>{{itemData.quantity}}</div>
|
||||
</div>
|
||||
<h4 class="item-name">{{item.name}}</h4>
|
||||
<div class="item-controls">
|
||||
{{!-- name --}}
|
||||
<h4 class="item-name flex2">{{item.name}}</h4>
|
||||
{{!-- item specifics --}}
|
||||
<div>{{itemData.attackType}}</div> {{!-- SPECIFIC --}}
|
||||
<div class="flexrow flex15">
|
||||
<div>{{itemData.weaponBonus}}</div> {{!-- SPECIFIC --}}
|
||||
<div>{{itemData.opponentDefense}}</div> {{!-- SPECIFIC --}}
|
||||
</div>
|
||||
{{!-- description --}}
|
||||
<div class="flex4 item-description">{{{itemData.description}}}</div>
|
||||
{{!-- edit & delete buttons --}}
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/with}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue