Personnage : ajout métier, origine, âge et faction dans le header

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>
This commit is contained in:
2026-03-29 17:35:11 +02:00
parent 8f6f3823c6
commit 0e0d8920b7
4 changed files with 76 additions and 3 deletions

View File

@@ -19,7 +19,11 @@
"initiative": "Initiative", "initiative": "Initiative",
"anomaly": "Anomalie", "anomaly": "Anomalie",
"description": "Biographie", "description": "Biographie",
"notes": "Notes" "notes": "Notes",
"metier": "Métier",
"origine": "Origine",
"age": "Âge",
"faction": "Faction"
}, },
"Stat": { "Stat": {
"res": "Résistance", "res": "Résistance",

View File

@@ -8,6 +8,8 @@ export default class CelestopolCharacter extends foundry.abstract.TypeDataModel
// Concept du personnage // 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) // Initiative (calculée mais stockée pour affichage)
schema.initiative = new fields.NumberField({ ...reqInt, initial: 0, min: 0 }) schema.initiative = new fields.NumberField({ ...reqInt, initial: 0, min: 0 })

View File

@@ -107,8 +107,41 @@
background: transparent; background: transparent;
border-bottom: 1px solid rgba(240,232,212,0.25); 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 { .header-stats-row {
display: flex; display: flex;
gap: 10px; gap: 10px;

View File

@@ -18,6 +18,40 @@
<span class="concept-display">{{system.concept}}</span> <span class="concept-display">{{system.concept}}</span>
{{/if}} {{/if}}
</div> </div>
<div class="identity-row">
<div class="identity-field">
<label>{{localize "CELESTOPOL.Actor.metier"}}</label>
{{#if isEditMode}}
<input type="text" name="system.metier" value="{{system.metier}}" placeholder="{{localize 'CELESTOPOL.Actor.metier'}}">
{{else}}
<span>{{system.metier}}</span>
{{/if}}
</div>
<div class="identity-field">
<label>{{localize "CELESTOPOL.Actor.origine"}}</label>
{{#if isEditMode}}
<input type="text" name="system.biodata.origine" value="{{system.biodata.origine}}" placeholder="{{localize 'CELESTOPOL.Actor.origine'}}">
{{else}}
<span>{{system.biodata.origine}}</span>
{{/if}}
</div>
<div class="identity-field">
<label>{{localize "CELESTOPOL.Actor.age"}}</label>
{{#if isEditMode}}
<input type="text" name="system.biodata.age" value="{{system.biodata.age}}" placeholder="{{localize 'CELESTOPOL.Actor.age'}}">
{{else}}
<span>{{system.biodata.age}}</span>
{{/if}}
</div>
<div class="identity-field">
<label>{{localize "CELESTOPOL.Actor.faction"}}</label>
{{#if isEditMode}}
<input type="text" name="system.faction" value="{{system.faction}}" placeholder="{{localize 'CELESTOPOL.Actor.faction'}}">
{{else}}
<span>{{system.faction}}</span>
{{/if}}
</div>
</div>
<div class="header-stats-row"> <div class="header-stats-row">
<div class="header-stat initiative"> <div class="header-stat initiative">
<label>{{localize "CELESTOPOL.Actor.initiative"}}</label> <label>{{localize "CELESTOPOL.Actor.initiative"}}</label>