implements mini character sheet, now it also needs tabs on the side to open dedicated sections from the big boy character sheet as dialogs.

pull/65/head
macniel 2025-11-14 00:07:31 +01:00
parent 6d366188ea
commit 0fffebdab9
2 changed files with 49 additions and 0 deletions

View File

@ -651,6 +651,15 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
return context return context
} }
_onPosition(position) {
if (position.width < 300) {
this.element.classList.add("tiny")
} else {
this.element.classList.remove("tiny")
}
}
_onRender(context, options) { _onRender(context, options) {
Meta._onRender(context, options, this.element) Meta._onRender(context, options, this.element)
Social._onRender(context, options, this.element) Social._onRender(context, options, this.element)

View File

@ -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 { .theme-dark {