diff --git a/lang/fr.json b/lang/fr.json index 54a6829..9185250 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -180,6 +180,7 @@ "scores": "Scores bonus / malus", "technique": "Description technique", "narratif": "Description narrative", + "exemples": "Exemples d'utilisation", "quantity": "Quantité", "damage": "Dégâts", "range": "Portée", diff --git a/module/applications/sheets/item-sheets.mjs b/module/applications/sheets/item-sheets.mjs index 2664346..be5073b 100644 --- a/module/applications/sheets/item-sheets.mjs +++ b/module/applications/sheets/item-sheets.mjs @@ -4,7 +4,7 @@ import { SYSTEM } from "../../config/system.mjs" export class CelestopolAnomalySheet extends CelestopolItemSheet { static DEFAULT_OPTIONS = { classes: ["anomaly"], - position: { width: 560, height: 460 }, + position: { width: 560, height: 560 }, } static PARTS = { main: { template: "systems/fvtt-celestopol/templates/anomaly.hbs" }, @@ -22,12 +22,12 @@ export class CelestopolAnomalySheet extends CelestopolItemSheet { return key }) - ctx.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML( - this.document.system.description, { async: true }) ctx.enrichedTechnique = await foundry.applications.ux.TextEditor.implementation.enrichHTML( this.document.system.technique, { async: true }) ctx.enrichedNarratif = await foundry.applications.ux.TextEditor.implementation.enrichHTML( this.document.system.narratif, { async: true }) + ctx.enrichedExemples = await foundry.applications.ux.TextEditor.implementation.enrichHTML( + this.document.system.exemples, { async: true }) return ctx } } diff --git a/module/models/items.mjs b/module/models/items.mjs index b1f4b3f..2142e68 100644 --- a/module/models/items.mjs +++ b/module/models/items.mjs @@ -35,9 +35,9 @@ export class CelestopolAnomaly extends foundry.abstract.TypeDataModel { choices: Object.keys(SYSTEM.ANOMALY_TYPES) }), level: new fields.NumberField({ ...reqInt, initial: 2, min: 1, max: 4 }), usesRemaining: new fields.NumberField({ ...reqInt, initial: 2, min: 0, max: 4 }), - description: new fields.HTMLField({ required: true, textSearch: true }), technique: new fields.HTMLField({ required: true, textSearch: true }), narratif: new fields.HTMLField({ required: true, textSearch: true }), + exemples: new fields.HTMLField({ required: true, textSearch: true }), } } } diff --git a/styles/items.less b/styles/items.less index 85f68a9..072d87e 100644 --- a/styles/items.less +++ b/styles/items.less @@ -276,6 +276,50 @@ color: var(--cel-orange-light); } } + + // Corps principal sans onglets + .anomaly-body { + background: var(--cel-cream, #f0e8d4); + padding: 10px 12px; + display: flex; + flex-direction: column; + gap: 10px; + overflow-y: auto; + max-height: 370px; + } + + .anomaly-section { + display: flex; + flex-direction: column; + gap: 4px; + + .anomaly-section-title { + font-family: var(--cel-font-title); + font-size: 0.78em; + text-transform: uppercase; + letter-spacing: 0.07em; + color: var(--cel-green-dark, #0c4c0c); + background: linear-gradient(to right, rgba(12,76,12,0.12), transparent); + border-left: 3px solid var(--cel-orange, #e07b00); + padding: 2px 6px; + margin-bottom: 2px; + } + + .anomaly-editor-wrap { + background: white; + border: 1px solid rgba(122,92,32,0.3); + border-radius: 3px; + min-height: 60px; + padding: 4px 6px; + color: #1a1209; + font-size: 0.88em; + line-height: 1.5; + + // ProseMirror reset + .editor-content, .prosemirror { color: #1a1209; background: transparent; } + p { margin: 0 0 4px 0; color: #1a1209; } + } + } } // Equipment-specific diff --git a/templates/anomaly.hbs b/templates/anomaly.hbs index 54ba7a9..89d6915 100644 --- a/templates/anomaly.hbs +++ b/templates/anomaly.hbs @@ -53,25 +53,29 @@ {{/if}} - + {{!-- Corps principal : 3 sections sans onglets --}} +
-
-
- {{editor system.description target="system.description" button=true editable=isEditable}} +
+
{{localize "CELESTOPOL.Item.technique"}}
+
+ {{editor system.technique target="system.technique" button=false editable=isEditable}} +
-
-
-
- - {{editor system.technique target="system.technique" button=true editable=isEditable}} +
+
{{localize "CELESTOPOL.Item.narratif"}}
+
+ {{editor system.narratif target="system.narratif" button=false editable=isEditable}} +
-
- - {{editor system.narratif target="system.narratif" button=true editable=isEditable}} + +
+
{{localize "CELESTOPOL.Item.exemples"}}
+
+ {{editor system.exemples target="system.exemples" button=false editable=isEditable}} +
-
+ +