From 0fffebdab9a19c8ac587177df7ad5446b66caed1 Mon Sep 17 00:00:00 2001 From: macniel Date: Fri, 14 Nov 2025 00:07:31 +0100 Subject: [PATCH] implements mini character sheet, now it also needs tabs on the side to open dedicated sections from the big boy character sheet as dialogs. --- src/module/sheets/characterSheet.mjs | 9 +++++ src/style/organisms/_character-sheet.scss | 40 +++++++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/src/module/sheets/characterSheet.mjs b/src/module/sheets/characterSheet.mjs index fad3b1de..4876b906 100644 --- a/src/module/sheets/characterSheet.mjs +++ b/src/module/sheets/characterSheet.mjs @@ -651,6 +651,15 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) { return context } + _onPosition(position) { + + if (position.width < 300) { + this.element.classList.add("tiny") + } else { + this.element.classList.remove("tiny") + } + } + _onRender(context, options) { Meta._onRender(context, options, this.element) Social._onRender(context, options, this.element) diff --git a/src/style/organisms/_character-sheet.scss b/src/style/organisms/_character-sheet.scss index 4be1f8b5..163ef47b 100644 --- a/src/style/organisms/_character-sheet.scss +++ b/src/style/organisms/_character-sheet.scss @@ -113,6 +113,46 @@ } + &.tiny { + + .header-fields { + & > div:not(.attributes) { + display: none; + } + + & > div.attributes { + position: absolute; + left: -8px; + top: -8px; + right: -8px; + display: grid; + gap: 8px; + grid-template-columns: repeat(4, 1fr); + } + + } + + div.head-data { + width: unset; + top: 136px; + left: 8px; + right: 8px; + bottom: 8px; + + .profile-img { + justify-self: center; + } + } + + .sheet-tabs { + display: none; + } + + section.tab.tab.tab { + display: none; + } + } + } .theme-dark {