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:
@@ -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",
|
||||
|
||||
@@ -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 })
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -18,6 +18,40 @@
|
||||
<span class="concept-display">{{system.concept}}</span>
|
||||
{{/if}}
|
||||
</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-stat initiative">
|
||||
<label>{{localize "CELESTOPOL.Actor.initiative"}}</label>
|
||||
|
||||
Reference in New Issue
Block a user