From 0152607a69d08e5f86fb838fdf69778f9d00ce62 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 03a961e3..c2948537 100644 --- a/module/rdd-utility.js +++ b/module/rdd-utility.js @@ -108,6 +108,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 08607232..55851472 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -645,6 +645,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 8e57417c..bab20ee4 100644 --- a/templates/actor-creature-sheet.html +++ b/templates/actor-creature-sheet.html @@ -136,101 +136,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 5c3f8eef..3f56cbd5 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -363,108 +363,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 --}}