From 0a9e8e0ac67b54f859b2e6a81dc1913cbe0dfb70 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Tue, 27 Apr 2021 00:30:46 +0200 Subject: [PATCH] =?UTF-8?q?Am=C3=A9lioration=20pr=C3=A9sentation=20blessur?= =?UTF-8?q?es=20#173?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/rdd-utility.js | 2 + styles/simple.css | 18 +++ templates/actor-blessure-partial.html | 24 ++++ templates/actor-creature-sheet.html | 130 ++++++------------- templates/actor-liste-blessures-partial.html | 23 ++++ templates/actor-sheet.html | 103 +-------------- 6 files changed, 107 insertions(+), 193 deletions(-) create mode 100644 templates/actor-blessure-partial.html create mode 100644 templates/actor-liste-blessures-partial.html diff --git a/module/rdd-utility.js b/module/rdd-utility.js index e6d5c403..be7eb64b 100644 --- a/module/rdd-utility.js +++ b/module/rdd-utility.js @@ -101,6 +101,8 @@ export class RdDUtility { 'systems/foundryvtt-reve-de-dragon/templates/actor-entite-sheet.html', 'systems/foundryvtt-reve-de-dragon/templates/actor-vehicule-sheet.html', 'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html', + 'systems/foundryvtt-reve-de-dragon/templates/actor-liste-blessures-partial.html', + 'systems/foundryvtt-reve-de-dragon/templates/actor-blessure-partial.html', //Items 'systems/foundryvtt-reve-de-dragon/templates/item-competence-sheet.html', 'systems/foundryvtt-reve-de-dragon/templates/item-competencecreature-sheet.html', diff --git a/styles/simple.css b/styles/simple.css index c76e8e8a..c62b90e0 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -627,6 +627,24 @@ ul, li { padding: 0.125rem; flex: 1 1 5rem; } + +.table-row { + margin: 0.125rem; + border-radius: 0; + padding: 0.125rem; + flex: 1 1 5rem; +} + +.alterne-row > .row-item:hover { + background: rgba(100, 100, 50, 0.25); +} +.alterne-row > .row-item:nth-child(even) { + background: rgba(80, 60, 0, 0.10); +} +.alterne-row > .row-item:nth-child(odd) { + background: rgb(160, 130, 100, 0.05); +} + .item-display-show { display: block; } diff --git a/templates/actor-blessure-partial.html b/templates/actor-blessure-partial.html new file mode 100644 index 00000000..b08f50f7 --- /dev/null +++ b/templates/actor-blessure-partial.html @@ -0,0 +1,24 @@ + + + {{title}} + + + {{#if bless.active}} + + {{else}} + + {{/if}} + + + + + + + + + + + + + + diff --git a/templates/actor-creature-sheet.html b/templates/actor-creature-sheet.html index 339e7c61..a96bf07f 100644 --- a/templates/actor-creature-sheet.html +++ b/templates/actor-creature-sheet.html @@ -139,101 +139,47 @@ {{!-- blessures Tab --}}
- Blessures Légeres : -
- {{#each data.blessures.legeres.liste as |bless key|}} -
  • - {{#if bless.active}}{{else}}{{/if}} - Premiers soins - - Soins complets - - Jours - - - Loc. -
  • - {{/each}} -
    - Blessures Graves : -
    - {{#each data.blessures.graves.liste as |bless key|}} -
  • - {{#if bless.active}}{{else}}{{/if}} - Premiers soins - - Soins complets - - Jours - - - Loc. -
  • - {{/each}} -
    - Blessure Critique : -
    - {{#each data.blessures.critiques.liste as |bless key|}} -
  • - {{#if bless.active}}{{else}}{{/if}} - Premiers soins - - Soins complets - - Jours - - - Loc. -
  • - - {{/each}} -
    -
    + {{!-- Liste de blessures --}} + {{> "systems/foundryvtt-reve-de-dragon/templates/actor-liste-blessures-partial.html" this}} + - {{!-- Equipment Tab --}} -
    - Encombrement total/max : {{numberFormat calc.encTotal decimals=2}} / {{data.attributs.encombrement.value}} {{calc.surEncombrementMessage}} - - Créer un objet - {{#if options.isGM}} - - Vider tout les conteneurs - {{/if}} - +
    {{!-- Biography Tab --}}
    diff --git a/templates/actor-liste-blessures-partial.html b/templates/actor-liste-blessures-partial.html new file mode 100644 index 00000000..ea58f23b --- /dev/null +++ b/templates/actor-liste-blessures-partial.html @@ -0,0 +1,23 @@ +

    Blessures:

    + + + + + + + + + + + + {{#each data.blessures.legeres.liste as |bless key|}} + {{> "systems/foundryvtt-reve-de-dragon/templates/actor-blessure-partial.html" bless=bless key=key gravite="legere" title="Légère"}} + {{/each}} + {{#each data.blessures.graves.liste as |bless key|}} + {{> "systems/foundryvtt-reve-de-dragon/templates/actor-blessure-partial.html" bless=bless key=key gravite="grave" title="Grave"}} + {{/each}} + {{#each data.blessures.critiques.liste as |bless key|}} + {{> "systems/foundryvtt-reve-de-dragon/templates/actor-blessure-partial.html" bless=bless key=key gravite="legere" title="Critique"}} + {{/each}} + +
    GravitéLocalisationPremiers soinsSoins completsAge (jours)
    \ No newline at end of file diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index f3cb0920..346778d3 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -365,108 +365,9 @@
    - {{!-- Liste de blessures --}} -

    Blessures:

    -
    -

    Légères:

    -
      - {{#each data.blessures.legeres.liste as |bless key|}} -
    • -
        -
      • - {{#if bless.active}} - - {{else}} - - {{/if}} -
      • -
      • - Premiers soins - -
      • -
      • - Soins complets - -
      • -
      • - Jours - -
      • -
      • - Loc. - -
      • -
      -
    • - {{/each}} -
    -

    Graves :

    -
      - {{#each data.blessures.graves.liste as |bless key|}} -
    • -
        -
      • - {{#if bless.active}} - - {{else}} - - {{/if}} -
      • -
      • - Premiers soins - -
      • -
      • - Soins complets - -
      • -
      • - Jours - -
      • -
      • - Loc. - -
      • -
      -
    • - {{/each}} -
    -

    Critique :

    -
      - {{#each data.blessures.critiques.liste as |bless key|}} -
    • -
        -
      • - {{#if bless.active}} - - {{else}} - - {{/if}} -
      • -
      • - Premiers soins - -
      • -
      • - Soins complets - -
      • -
      • - Jours - -
      • -
      • - Loc. - -
      • -
      -
    • - {{/each}} -
    -
    -
    + {{> "systems/foundryvtt-reve-de-dragon/templates/actor-liste-blessures-partial.html" this}} + {{!-- Connaissances Tab --}}