From 0e0d8920b7e80cf2dca76375f14a9587402fa4ca Mon Sep 17 00:00:00 2001 From: LeRatierBretonnier Date: Sun, 29 Mar 2026 17:35:11 +0200 Subject: [PATCH] =?UTF-8?q?Personnage=20:=20ajout=20m=C3=A9tier,=20origine?= =?UTF-8?q?,=20=C3=A2ge=20et=20faction=20dans=20le=20header?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DataModel : metier (StringField), faction (StringField) ajoutés au top-level Template : identity-row sous le concept avec les 4 champs CSS : .identity-row avec label orange + valeur crème italique Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- lang/fr.json | 6 +++++- module/models/character.mjs | 4 +++- styles/global.less | 35 ++++++++++++++++++++++++++++++++++- templates/character-main.hbs | 34 ++++++++++++++++++++++++++++++++++ 4 files changed, 76 insertions(+), 3 deletions(-) diff --git a/lang/fr.json b/lang/fr.json index 42a7c7c..9dac84e 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -19,7 +19,11 @@ "initiative": "Initiative", "anomaly": "Anomalie", "description": "Biographie", - "notes": "Notes" + "notes": "Notes", + "metier": "Métier", + "origine": "Origine", + "age": "Âge", + "faction": "Faction" }, "Stat": { "res": "Résistance", diff --git a/module/models/character.mjs b/module/models/character.mjs index 1fae852..9616522 100644 --- a/module/models/character.mjs +++ b/module/models/character.mjs @@ -7,7 +7,9 @@ export default class CelestopolCharacter extends foundry.abstract.TypeDataModel const schema = {} // Concept du personnage - schema.concept = new fields.StringField({ required: true, nullable: false, initial: "" }) + schema.concept = new fields.StringField({ required: true, nullable: false, initial: "" }) + schema.metier = new fields.StringField({ required: true, nullable: false, initial: "" }) + schema.faction = new fields.StringField({ required: true, nullable: false, initial: "" }) // Initiative (calculée mais stockée pour affichage) schema.initiative = new fields.NumberField({ ...reqInt, initial: 0, min: 0 }) diff --git a/styles/global.less b/styles/global.less index 95890d3..ad1e96f 100644 --- a/styles/global.less +++ b/styles/global.less @@ -107,7 +107,40 @@ background: transparent; border-bottom: 1px solid rgba(240,232,212,0.25); } - } + + .identity-row { + display: flex; + flex-wrap: wrap; + gap: 6px 14px; + + .identity-field { + display: flex; + align-items: baseline; + gap: 4px; + + label { + font-size: 0.6em; + text-transform: uppercase; + letter-spacing: 0.06em; + color: var(--cel-orange-light); + white-space: nowrap; + font-style: normal; + } + + span, input[type="text"] { + font-size: 0.82em; + color: var(--cel-cream); + background: transparent; + border: none; + border-bottom: 1px solid rgba(240,232,212,0.2); + padding: 0 2px; + font-style: italic; + min-width: 60px; + &::placeholder { color: rgba(240,232,212,0.3); } + } + } + } + .header-stats-row { display: flex; diff --git a/templates/character-main.hbs b/templates/character-main.hbs index 74a4f6c..99f03c5 100644 --- a/templates/character-main.hbs +++ b/templates/character-main.hbs @@ -18,6 +18,40 @@ {{system.concept}} {{/if}} +
+
+ + {{#if isEditMode}} + + {{else}} + {{system.metier}} + {{/if}} +
+
+ + {{#if isEditMode}} + + {{else}} + {{system.biodata.origine}} + {{/if}} +
+
+ + {{#if isEditMode}} + + {{else}} + {{system.biodata.age}} + {{/if}} +
+
+ + {{#if isEditMode}} + + {{else}} + {{system.faction}} + {{/if}} +
+