Use grid for special creature abilities

This commit is contained in:
Johannes Loher 2021-02-25 22:38:35 +01:00
parent 25b6f03d56
commit 276a70a70a
2 changed files with 16 additions and 20 deletions

View file

@ -40,7 +40,8 @@
} }
&--racial-ability, &--racial-ability,
&--language, &--language,
&--alphabet { &--alphabet,
&--special-creature-ability {
grid-template-columns: $row-height 1fr 3fr 4ch; grid-template-columns: $row-height 1fr 3fr 4ch;
} }

View file

@ -12,18 +12,16 @@
!-- !--
!-- @param item: hand over the item to the partial as hash parameter !-- @param item: hand over the item to the partial as hash parameter
--}} --}}
{{#*inline "baseItemListEntry"}} {{#*inline "itemListEntry"}}
<li class="item flexrow" data-item-id="{{item._id}}"> <li class="ds4-item-list__row item " data-item-id="{{item._id}}">
{{!-- image --}} {{!-- image --}}
<div class="flex05 item-image"> <div class="ds4-item-list__image" style="background-image: url('{{item.img}}')" title="{{item.name}}"></div>
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24" />
</div>
{{!-- name --}} {{!-- name --}}
<input class="flex1 item-name item-change" type="text" value="{{item.name}}" data-dtype="String" <input class="ds4-item-list__editable item-change" type="text" value="{{item.name}}" data-dtype="String"
data-property="name" title="{{htmlToPlainText item.data.data.description}}"> data-property="name" title="{{htmlToPlainText item.data.description}}" />
{{!-- description --}} {{!-- description --}}
<div class="flex3 item-description" title="{{htmlToPlainText item.data.data.description}}"> <div class="ds4-item-list__description" title="{{htmlToPlainText item.data.description}}">
{{{item.data.data.description}}}</div> {{{item.data.description}}}</div>
{{!-- control buttons --}} {{!-- control buttons --}}
{{> systems/ds4/templates/actor/partials/overview-control-buttons.hbs }} {{> systems/ds4/templates/actor/partials/overview-control-buttons.hbs }}
</li> </li>
@ -31,16 +29,13 @@
{{!-- {{!--
!-- Render a list header for a base item list entries from a given item. !-- Render a list header for a base item list entries from a given item.
!-- The partial assumes a variable dataType to be given in the context.
!--
!-- @param dataType: the string item type for the list
--}} --}}
{{#*inline "baseItemListHeader"}} {{#*inline "itemListHeader"}}
<li class="item flexrow item-header"> <li class="ds4-item-list__row ds4-item-list__row--header">
{{!-- image --}} {{!-- image --}}
<div class="flex05 item-image"></div> <div></div>
{{!-- name --}} {{!-- name --}}
<div class="flex1 item-name">{{localize 'DS4.ItemName'}}</div> <div>{{localize 'DS4.ItemName'}}</div>
{{!-- description --}} {{!-- description --}}
<div class="flex3">{{localize 'DS4.Description'}}</div> <div class="flex3">{{localize 'DS4.Description'}}</div>
{{!-- control buttons placeholder --}} {{!-- control buttons placeholder --}}
@ -53,10 +48,10 @@
<div class="tab special-creature-abilities" data-group="primary" data-tab="special-creature-abilities"> <div class="tab special-creature-abilities" data-group="primary" data-tab="special-creature-abilities">
<ol class="items-list"> <ol class="ds4-item-list ds4-item-list--special-creature-ability item-list">
{{> baseItemListHeader dataType='specialCreatureAbility' }} {{> itemListHeader }}
{{#each itemsByType.specialCreatureAbility as |item id|}} {{#each itemsByType.specialCreatureAbility as |item id|}}
{{> baseItemListEntry item=item}} {{> itemListEntry item=item}}
{{/each}} {{/each}}
</ol> </ol>
{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType='specialCreatureAbility' }} {{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType='specialCreatureAbility' }}