From d17b092658bc66d3fbda70a826ac4bfcad655ea8 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Fri, 26 Feb 2021 02:13:18 +0100 Subject: [PATCH] Readd currency to character sheet --- src/ds4.scss | 1 + src/module/ds4.ts | 1 + src/scss/components/_currency.scss | 17 +++++++++++++++++ src/scss/components/_item_list.scss | 2 +- .../actor/partials/character-inventory.hbs | 19 +------------------ src/templates/actor/partials/currency.hbs | 8 ++++++++ 6 files changed, 29 insertions(+), 19 deletions(-) create mode 100644 src/scss/components/_currency.scss create mode 100644 src/templates/actor/partials/currency.hbs diff --git a/src/ds4.scss b/src/ds4.scss index 9db72502..212a180f 100644 --- a/src/ds4.scss +++ b/src/ds4.scss @@ -20,4 +20,5 @@ @include meta.load-css("scss/components/item_list"); @include meta.load-css("scss/components/tabs"); @include meta.load-css("scss/components/talent_rank_equation"); + @include meta.load-css("scss/components/currency"); } diff --git a/src/module/ds4.ts b/src/module/ds4.ts index 8927be21..c8243f4e 100644 --- a/src/module/ds4.ts +++ b/src/module/ds4.ts @@ -66,6 +66,7 @@ async function registerHandlebarsPartials() { "systems/ds4/templates/actor/partials/talent-rank-equation.hbs", "systems/ds4/templates/actor/partials/item-list-header.hbs", "systems/ds4/templates/actor/partials/item-list-entry.hbs", + "systems/ds4/templates/actor/partials/currency.hbs", ]; return loadTemplates(templatePaths); } diff --git a/src/scss/components/_currency.scss b/src/scss/components/_currency.scss new file mode 100644 index 00000000..13362211 --- /dev/null +++ b/src/scss/components/_currency.scss @@ -0,0 +1,17 @@ +@use "../utils/variables"; + +.ds4-currency { + display: flex; + gap: 1em; + align-items: center; + $height: 1.75em; + margin: 0.5em 0; +} + +.ds4-currency-title { + margin-top: 1em; + margin-bottom: 0; + padding-left: 1em; + border-bottom: variables.$border-groove; + font-weight: bold; +} diff --git a/src/scss/components/_item_list.scss b/src/scss/components/_item_list.scss index 1b4e9323..de7713bd 100644 --- a/src/scss/components/_item_list.scss +++ b/src/scss/components/_item_list.scss @@ -9,7 +9,7 @@ grid-row-gap: 0.2em; align-items: center; - margin: 7px 0; + margin: 0.5em 0; padding: 0; overflow-y: auto; diff --git a/src/templates/actor/partials/character-inventory.hbs b/src/templates/actor/partials/character-inventory.hbs index 07de73ee..07a94705 100644 --- a/src/templates/actor/partials/character-inventory.hbs +++ b/src/templates/actor/partials/character-inventory.hbs @@ -1,21 +1,4 @@
- - {{!-- Money--}} - {{!--

{{localize 'DS4.CharacterCurrency'}}

-
    -
  1. - - - - - - -
  2. -
--}} - + {{> systems/ds4/templates/actor/partials/currency.hbs}} {{> systems/ds4/templates/actor/partials/items-overview.hbs}} -
diff --git a/src/templates/actor/partials/currency.hbs b/src/templates/actor/partials/currency.hbs new file mode 100644 index 00000000..821c769f --- /dev/null +++ b/src/templates/actor/partials/currency.hbs @@ -0,0 +1,8 @@ +

{{localize 'DS4.CharacterCurrency'}}

+
+ {{#each data.currency as |value key|}} + + + {{/each}} +