From 1ba056c41b637e82c95814acac6390140260b2f5 Mon Sep 17 00:00:00 2001 From: macniel Date: Wed, 8 Oct 2025 14:36:24 +0200 Subject: [PATCH] adds styling to quick-glance resource bars --- src/module/sheets/characterSheet.mjs | 2 + src/module/sheets/liturgySheet.mjs | 4 +- src/style/_sidebar-elements.scss | 31 +++++++++++++- src/templates/actor/actor-character-sheet.hbs | 41 +++++++++++++++++-- 4 files changed, 73 insertions(+), 5 deletions(-) diff --git a/src/module/sheets/characterSheet.mjs b/src/module/sheets/characterSheet.mjs index 4dd53336..b0d6aa32 100644 --- a/src/module/sheets/characterSheet.mjs +++ b/src/module/sheets/characterSheet.mjs @@ -267,6 +267,8 @@ export class CharacterSheet extends ActorSheet { context.aupper = Math.min((context.actor.system.aup.aktuell / context.actor.system.aup.max) * 100, 100); context.lepper = Math.min((context.actor.system.lep.aktuell / context.actor.system.lep.max) * 100, 100); + context.keper = Math.min((context.actor.system.kap.aktuell / context.actor.system.kap.max) * 100, 100); + context.aspper = Math.min((context.actor.system.asp.aktuell / context.actor.system.asp.max) * 100, 100); context.lepcurrent = context.actor.system.lep.aktuell ?? 0 context.aupcurrent = context.actor.system.aup.aktuell ?? 0 diff --git a/src/module/sheets/liturgySheet.mjs b/src/module/sheets/liturgySheet.mjs index ec850750..0a531f9a 100644 --- a/src/module/sheets/liturgySheet.mjs +++ b/src/module/sheets/liturgySheet.mjs @@ -42,7 +42,9 @@ export class LiturgySheet extends ItemSheet { super.activateListeners(html); // Everything below here is only needed if the sheet is editable - if (!this.isEditable) + if (this.isEditable) { + + } } } diff --git a/src/style/_sidebar-elements.scss b/src/style/_sidebar-elements.scss index e48c6bcb..f774031b 100644 --- a/src/style/_sidebar-elements.scss +++ b/src/style/_sidebar-elements.scss @@ -51,6 +51,8 @@ line-height: 24px; vertical-align: middle; text-indent: 8px; + color: white; + text-shadow: 2px 2px 1px rgba(0, 0, 0, 0.3); } span.resource-fill { @@ -58,9 +60,36 @@ left: 0; top: 0; bottom: 0; - background: linear-gradient(to bottom, #0bad29 0%, #11f128 50%, #0cde24 51%, #6ff77b 100%); + background: url('../assets/gradient.png'); + background-size: 32px 100%; + + &::after { + content: ''; + position: absolute; + left: 0; + top: 0; + right: 0; + bottom: 0; + } + + &.lep::after { + background-color: rgba(0, 192, 96, 0.5); + } + + &.aup::after { + background-color: rgba(192, 166, 0, 0.5); + } + + &.asp::after { + background-color: rgba(0, 26, 192, 0.5); + } + + &.kap::after { + background-color: rgba(128, 0, 192, 0.5); + } } + } } diff --git a/src/templates/actor/actor-character-sheet.hbs b/src/templates/actor/actor-character-sheet.hbs index ac7bc9db..5e66e3fa 100644 --- a/src/templates/actor/actor-character-sheet.hbs +++ b/src/templates/actor/actor-character-sheet.hbs @@ -18,9 +18,24 @@ + + + + + + + {{#if this.hasLiturgies}} + + {{/if}} + + {{#if this.hasSpells}} + + {{/if}} {{#each attacks}}
@@ -334,9 +349,29 @@ - {{#if this.countI}} + {{#if this.countO}} + +
+
0
+
+ + + {{#each this.O}} + + + {{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }} + + + {{this.name}} + + + {{/each}} + {{/if}} + {{#if this.countI}} +
I