From 4395ada6f5e7576700df438e3f56e84f5133d753 Mon Sep 17 00:00:00 2001 From: macniel Date: Thu, 30 Oct 2025 10:19:48 +0100 Subject: [PATCH] removes alveranian construction site --- src/module/sheets/liturgySheet.mjs | 20 +-- src/style/molecules/_tabs.scss | 2 +- src/style/organisms/_liturgy-sheet.scss | 136 ++++++++++++++++++ src/style/styles.scss | 3 +- .../actor/character/tab-liturgies.hbs | 18 +-- src/templates/item/liturgy/main-sheet.hbs | 14 +- .../item/liturgy/tab-commonality.hbs | 39 +++++ src/templates/item/liturgy/tab-meta.hbs | 75 ++++++++++ 8 files changed, 286 insertions(+), 21 deletions(-) create mode 100644 src/style/organisms/_liturgy-sheet.scss create mode 100644 src/templates/item/liturgy/tab-commonality.hbs create mode 100644 src/templates/item/liturgy/tab-meta.hbs diff --git a/src/module/sheets/liturgySheet.mjs b/src/module/sheets/liturgySheet.mjs index d2e0f14e..5c6a958f 100644 --- a/src/module/sheets/liturgySheet.mjs +++ b/src/module/sheets/liturgySheet.mjs @@ -18,9 +18,10 @@ export class LiturgySheet extends HandlebarsApplicationMixin(DocumentSheetV2) { static TABS = { sheet: { tabs: [ - {id: 'json', group: 'sheet', label: 'JSON'}, + {id: 'meta', group: 'sheet', label: 'Meta'}, + {id: 'commonality', group: 'sheet', label: 'Verbreitung'}, ], - initial: 'json' + initial: 'meta' } } @@ -29,9 +30,12 @@ export class LiturgySheet extends HandlebarsApplicationMixin(DocumentSheetV2) { form: { template: `systems/DSA_4-1/templates/item/liturgy/main-sheet.hbs` }, - json: { - template: `systems/DSA_4-1/templates/item/liturgy/tab-json.hbs` + meta: { + template: `systems/DSA_4-1/templates/item/liturgy/tab-meta.hbs` }, + commonality: { + template: `systems/DSA_4-1/templates/item/liturgy/tab-commonality.hbs` + } } /** @@ -50,12 +54,12 @@ export class LiturgySheet extends HandlebarsApplicationMixin(DocumentSheetV2) { /** @override */ async _prepareContext(options) { const context = await super._prepareContext(options); - const liturgyData = context.document; - context.system = liturgyData.system; - context.flags = liturgyData.flags; - context.json = JSON.stringify(liturgyData); + context.system = liturgyData.system + context.flags = liturgyData.flags + context.name = liturgyData.name + context.json = JSON.stringify(liturgyData) return context; } diff --git a/src/style/molecules/_tabs.scss b/src/style/molecules/_tabs.scss index f0012859..042934f1 100644 --- a/src/style/molecules/_tabs.scss +++ b/src/style/molecules/_tabs.scss @@ -45,7 +45,7 @@ content: ''; left: 0; right: 0; - bottom: 0; + bottom: -1px; height: 3px; background: assets.$tab-background; z-index: 5; diff --git a/src/style/organisms/_liturgy-sheet.scss b/src/style/organisms/_liturgy-sheet.scss new file mode 100644 index 00000000..56470fe7 --- /dev/null +++ b/src/style/organisms/_liturgy-sheet.scss @@ -0,0 +1,136 @@ +.dsa41.item.liturgy { + + + .tab.meta.active { + + display: flex; + flex-direction: column; + + div.head { + flex: 0; + height: unset; + display: flex; + flex-direction: column; + padding: unset; + margin: 8px; + + label { + + display: grid; + grid-template-columns: 120px 1fr; + gap: 8px; + height: 32px; + + span { + height: 32px; + line-height: 32px; + vertical-align: middle; + } + + input { + + } + + } + + } + + fieldset { + flex: 1; + margin: 8px; + + .auswirkungen { + overflow-x: hidden; + overflow-y: auto; + + .auswirkung { + + display: flex; + flex-direction: row; + + .rank { + padding-right: 8px; + text-align: center; + display: block; + align-self: center; + } + + } + + } + + } + + } + + .tab.commonality.active > section { + + display: flex; + flex-direction: column; + padding: 8px; + gap: 8px; + + .commonalities { + flex: 1; + overflow-x: hidden; + overflow-y: auto; + height: unset; + display: unset; + padding: unset; + + .commonality { + display: grid; + grid-template-columns: 1fr 1fr 16px; + height: 16px; + margin-bottom: 8px; + + button { + border: none; + background: none; + padding: 0; + margin: 0; + height: 16px; + width: 16px; + text-align: center; + min-height: unset; + + &:hover { + color: red; + } + + } + + &:hover { + background-color: rgba(0, 0, 0, 0.2) + } + + } + + } + + fieldset { + flex: 0; + + div.content { + display: grid; + grid-template-columns: 1fr 0.5fr; + grid-template-rows: 54px 32px; + gap: 8px; + + label { + + span { + + display: block; + + } + + } + + } + + } + + } + +} diff --git a/src/style/styles.scss b/src/style/styles.scss index 024a438f..803314b5 100644 --- a/src/style/styles.scss +++ b/src/style/styles.scss @@ -32,4 +32,5 @@ @use "organisms/combat-action-dialog"; @use "organisms/merchant-sheet"; @use "organisms/resting-dialog"; -@use "organisms/battle-dialog"; \ No newline at end of file +@use "organisms/battle-dialog"; +@use "organisms/liturgy-sheet"; \ No newline at end of file diff --git a/src/templates/actor/character/tab-liturgies.hbs b/src/templates/actor/character/tab-liturgies.hbs index 6bc342d8..b5ba6a24 100644 --- a/src/templates/actor/character/tab-liturgies.hbs +++ b/src/templates/actor/character/tab-liturgies.hbs @@ -37,7 +37,7 @@ data-lkp="{{../lkp}}" data-deity="{{this.deity}}"> {{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }} - + {{this.name}} @@ -56,7 +56,7 @@ data-lkp="{{../lkp}}" data-deity="{{this.deity}}"> {{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }} - + {{this.name}} @@ -77,7 +77,7 @@ {{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }} {{this.name}} + data-action="openEmbeddedDocument">{{this.name}} {{/each}} {{/if}} @@ -96,7 +96,7 @@ {{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }} {{this.name}} + data-action="openEmbeddedDocument">{{this.name}} {{/each}} {{/if}} @@ -115,7 +115,7 @@ {{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }} {{this.name}} + data-action="openEmbeddedDocument">{{this.name}} {{/each}}{{/if}} {{#if this.countV}} @@ -133,7 +133,7 @@ {{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }} {{this.name}} + data-action="openEmbeddedDocument">{{this.name}} {{/each}} {{/if}} @@ -152,7 +152,7 @@ {{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }} {{this.name}} + data-action="openEmbeddedDocument">{{this.name}} {{/each}} {{/if}}{{#if this.countVII}} @@ -170,7 +170,7 @@ {{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }} {{this.name}} + data-action="openEmbeddedDocument">{{this.name}} {{/each}} {{/if}}{{#if this.countVIII}} @@ -188,7 +188,7 @@ {{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }} {{this.name}} + data-action="openEmbeddedDocument">{{this.name}} {{/each}} {{/if}} diff --git a/src/templates/item/liturgy/main-sheet.hbs b/src/templates/item/liturgy/main-sheet.hbs index 38015a2f..21d661ee 100644 --- a/src/templates/item/liturgy/main-sheet.hbs +++ b/src/templates/item/liturgy/main-sheet.hbs @@ -1,4 +1,14 @@
- - Alveranische Baustelle, bitte gehen Sie weiter, hier gibt es nichts zu sehen. + {{!-- Sheet Tab Navigation --}} +
\ No newline at end of file diff --git a/src/templates/item/liturgy/tab-commonality.hbs b/src/templates/item/liturgy/tab-commonality.hbs new file mode 100644 index 00000000..7d42bd49 --- /dev/null +++ b/src/templates/item/liturgy/tab-commonality.hbs @@ -0,0 +1,39 @@ +
+ +
+ + {{#if editable}} +
+ Neue Verbreitung +
+ + +
+ +
+
+
+ {{/if}} + +
+ {{#each system.herkunft}} +
+ {{this.name}} + Grad {{grad}} + {{#if ../editable}} + + {{/if}} +
+ {{/each}} +
+
+ +
+ diff --git a/src/templates/item/liturgy/tab-meta.hbs b/src/templates/item/liturgy/tab-meta.hbs new file mode 100644 index 00000000..d2ed49df --- /dev/null +++ b/src/templates/item/liturgy/tab-meta.hbs @@ -0,0 +1,75 @@ +
+ +
+ + + + +
+ +
+ Grade der Liturgie +
+ {{#if system.auswirkung.I}} +
+ I +
{{system.auswirkung.I}}
+
+ {{/if}} + {{#if system.auswirkung.II}} +
+ II +
{{system.auswirkung.II}}
+
+ {{/if}} + {{#if system.auswirkung.III}} +
+ III +
{{system.auswirkung.III}}
+
+ {{/if}} + {{#if system.auswirkung.IV}} +
+ IV +
{{system.auswirkung.IV}}
+
+ {{/if}} + {{#if system.auswirkung.V}} +
+ V +
{{system.auswirkung.V}}
+
+ {{/if}} + {{#if system.auswirkung.VI}} +
+ VI +
{{system.auswirkung.VI}}
+
+ {{/if}} + {{#if system.auswirkung.VII}} +
+ VII +
{{system.auswirkung.VII}}
+
+ {{/if}} + {{#if system.auswirkung.VIII}} +
+ VIII +
{{system.auswirkung.VIII}}
+
+ {{/if}} +
+
+ +
+