From 276a70a70ad88ef5a16f1b4d7d7413d38c009c4e Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Thu, 25 Feb 2021 22:38:35 +0100 Subject: [PATCH] Use grid for special creature abilities --- src/scss/components/_item_list.scss | 3 +- .../special-creature-abilities-overview.hbs | 33 ++++++++----------- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/src/scss/components/_item_list.scss b/src/scss/components/_item_list.scss index 3ee39861..d652db4d 100644 --- a/src/scss/components/_item_list.scss +++ b/src/scss/components/_item_list.scss @@ -40,7 +40,8 @@ } &--racial-ability, &--language, - &--alphabet { + &--alphabet, + &--special-creature-ability { grid-template-columns: $row-height 1fr 3fr 4ch; } diff --git a/src/templates/actor/partials/special-creature-abilities-overview.hbs b/src/templates/actor/partials/special-creature-abilities-overview.hbs index 8b9f5195..de109620 100644 --- a/src/templates/actor/partials/special-creature-abilities-overview.hbs +++ b/src/templates/actor/partials/special-creature-abilities-overview.hbs @@ -12,18 +12,16 @@ !-- !-- @param item: hand over the item to the partial as hash parameter --}} -{{#*inline "baseItemListEntry"}} -
  • +{{#*inline "itemListEntry"}} +
  • {{!-- image --}} -
    - -
    +
    {{!-- name --}} - + {{!-- description --}} -
    - {{{item.data.data.description}}}
    +
    + {{{item.data.description}}}
    {{!-- control buttons --}} {{> systems/ds4/templates/actor/partials/overview-control-buttons.hbs }}
  • @@ -31,16 +29,13 @@ {{!-- !-- 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"}} +
  • {{!-- image --}} -
    +
    {{!-- name --}} -
    {{localize 'DS4.ItemName'}}
    +
    {{localize 'DS4.ItemName'}}
    {{!-- description --}}
    {{localize 'DS4.Description'}}
    {{!-- control buttons placeholder --}} @@ -53,10 +48,10 @@
    -
      - {{> baseItemListHeader dataType='specialCreatureAbility' }} +
        + {{> itemListHeader }} {{#each itemsByType.specialCreatureAbility as |item id|}} - {{> baseItemListEntry item=item}} + {{> itemListEntry item=item}} {{/each}}
      {{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType='specialCreatureAbility' }}