From e8621656898df55fc6378c6bb97a88d0ceed8e3e Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Fri, 2 Feb 2024 19:07:07 -0700 Subject: [PATCH] Tweak the design so that Drops and a Description can be fit into the sheet --- module/sheets/MobSheet.mjs | 6 ++- styles/sheets/actor/mob/mob.scss | 57 ++++++++++++++++------------- templates/actors/mobs/main.hbs | 63 ++++++++++++++++++++------------ 3 files changed, 75 insertions(+), 51 deletions(-) diff --git a/module/sheets/MobSheet.mjs b/module/sheets/MobSheet.mjs index 2b359df..e86cd5f 100644 --- a/module/sheets/MobSheet.mjs +++ b/module/sheets/MobSheet.mjs @@ -7,8 +7,8 @@ export class MobSheet extends GenericActorSheet { super.defaultOptions, { template: `systems/dotdungeon/templates/actors/mobs/main.hbs`, - width: 300, - height: 360, + width: 750, + height: 390, } ); opts.classes.push(`dotdungeon`); @@ -34,6 +34,8 @@ export class MobSheet extends GenericActorSheet { ctx.computed = {}; + // Compute rolls here + console.log(actor.uuid, `context:`, ctx) return ctx; }; diff --git a/styles/sheets/actor/mob/mob.scss b/styles/sheets/actor/mob/mob.scss index 62c1f3b..0a0f68c 100644 --- a/styles/sheets/actor/mob/mob.scss +++ b/styles/sheets/actor/mob/mob.scss @@ -3,21 +3,20 @@ .dotdungeon .actor--mob { --gap: 8px; - --avatar-size: 80px; + --avatar-size: 100px; --row-height: calc((var(--avatar-size) - var(--gap)) / 2); padding: var(--gap); display: grid; - grid-template-columns: var(--avatar-size) 1fr 1fr; - grid-template-rows: repeat(6, var(--row-height)) minmax(var(--row-height), 1fr); + grid-template-columns: var(--avatar-size) repeat(4, minmax(0, 1fr)); + grid-template-rows: repeat(5, var(--row-height)) minmax(var(--row-height), 1fr); gap: var(--gap); grid-template-areas: - "avatar . ." - "avatar . ." - "dice . ." - "dice . ." - "dice . ." - "dice stunts stunts" - "dice stunts stunts"; + "avatar . . . ." + "avatar . . . ." + "dice . . . ." + "dice description description stunts stunts" + "dice description description stunts stunts" + "dice description description stunts stunts"; label, .dice { border: 2px solid black; @@ -49,6 +48,8 @@ text-align: right; border: none; background: none; + border-radius: 0; + border-bottom: 1px solid black; &:focus, &:focus-visible { box-shadow: none; } @@ -63,6 +64,24 @@ grid-column: span 2; } + .mask-textarea { + display: flex; + flex-direction: column; + transition: all ease-in-out 50ms; + + &:focus-within { + transform: scale(102%); + } + + textarea { + flex-grow: 1; + resize: none; + border: none; + box-shadow: none; + background: none; + } + } + // Area-specific stylings @@ -95,21 +114,9 @@ .stunts { grid-area: stunts; - display: flex; - flex-direction: column; - transition: all ease-in-out 50ms; - - &:focus-within { - transform: scale(102%); - } - - textarea { - flex-grow: 1; - resize: none; - border: none; - box-shadow: none; - background: none; - } + } + .description { + grid-area: description; } .avatar { diff --git a/templates/actors/mobs/main.hbs b/templates/actors/mobs/main.hbs index 3dedb74..d5b7432 100644 --- a/templates/actors/mobs/main.hbs +++ b/templates/actors/mobs/main.hbs @@ -22,20 +22,15 @@ value="{{system.bytes}}" > -
- Dice: - - - -
- -
+ - -