diff --git a/module/items/relationship.ts b/module/items/relationship.ts index 64751af3..4765ca0d 100644 --- a/module/items/relationship.ts +++ b/module/items/relationship.ts @@ -1,9 +1,18 @@ import { BWActor } from "../actor.js"; +import { DisplayClass } from "./item.js"; export class Relationship extends Item { prepareData() { this.data.data.safeId = this._id; this.data.data.aptitude = parseInt(this.actor.data.data.circles.exp, 10) || 0; + + if (this.data.data.hateful || this.data.data.enmity) { + this.data.data.cssClass = "relationship-hostile"; + } else if (this.data.data.romantic || this.data.data.immediateFamily) { + this.data.data.cssClass = "relationship-friendly"; + } else { + this.data.data.cssClass = "relationship-neutral"; + } } get actor(): BWActor { @@ -17,13 +26,14 @@ interface RelationshipDataRoot extends BaseEntityData { data: RelationshipData; } -export interface RelationshipData { +export interface RelationshipData extends DisplayClass { description: string; forbidden: boolean; immediateFamily: boolean; otherFamily: boolean; romantic: boolean; hateful: boolean; + enmity: boolean; influence: string; building: string; buildingProgress: number; diff --git a/styles/burningwheel.scss b/styles/burningwheel.scss index 182ad14f..816df772 100644 --- a/styles/burningwheel.scss +++ b/styles/burningwheel.scss @@ -29,6 +29,10 @@ input.exponent { max-height: 28px; } +input.hidden { + display: none; +} + .flex-row { display: flex; flex-direction: row; diff --git a/styles/character/bits.scss b/styles/character/bits.scss index 97e7f6ca..cc957c54 100644 --- a/styles/character/bits.scss +++ b/styles/character/bits.scss @@ -1,3 +1,5 @@ +@import "../mixins.scss"; + .beliefs, .instincts { .bits-item { & > div { @@ -30,6 +32,13 @@ width: calc(33% - 10px); margin: 5px; + .trait { + @include colored-item(black); + textarea { + background-color: transparent; + } + } + i { float: right; font-size: 12px; @@ -42,4 +51,8 @@ color: #FF0000; } } + + .trait-checkbox:checked + div > textarea { + display: none; + } } diff --git a/styles/character/character.scss b/styles/character/character.scss index 1d3aeb6c..8cbc54af 100644 --- a/styles/character/character.scss +++ b/styles/character/character.scss @@ -1,6 +1,11 @@ @import "../mixins.scss"; + +.sheet { + min-width: 800px; +} .character { + min-width: 800px; textarea { font-family: unset; } @@ -60,13 +65,26 @@ column-gap: 5px; row-gap: 5px; - .rollable:hover { - background-color: $hover-color; + .rollable { + @include colored-item(black); + height: min-content; + + select.shade, input.exponent, button { + width: 3em; + height: 2em; + } } - .rollable-name { - width: 33%; + input.rollable-name { + border: 0; + border-bottom: 1px solid black; + border-radius: 0; + padding: 1px 0px; + } + .rollable-name { + width: calc(100% - 10.5em); margin-right: 1em; + font-size: 1.125em; } .collapse-checkbox { @@ -108,11 +126,13 @@ } .attribute-subrow { + display: inline-block; + label { font-size: 1.125em; - display: block; - width: 50%; + display: inline-block; text-align: center; + margin-left: 20px; } } } diff --git a/styles/character/equipment.scss b/styles/character/equipment.scss index 072b49d1..6e4c4fb9 100644 --- a/styles/character/equipment.scss +++ b/styles/character/equipment.scss @@ -5,8 +5,6 @@ column-gap: 1px; row-gap: 1px; & > div { - padding: 1px 3px; - & i { margin-bottom: 3px; } diff --git a/styles/character/learning.scss b/styles/character/learning.scss index a878cf34..aa0bb889 100644 --- a/styles/character/learning.scss +++ b/styles/character/learning.scss @@ -15,17 +15,24 @@ .learning { width: calc(50% - 10px); - margin: 5px; - &:hover { - background-color: $hover-color; + height: min-content; + margin: 1px; + @include colored-item(black); + + button { + width: 3em; + height: 2em; } h3 { - width: calc(100% - 80px); - margin-left: 10px; + width: calc(100% - 5em); + margin-top: 3px; font-weight: bold; + text-align: center; } .learning-xp { + margin-left: 1.5em; + margin-bottom: 3px; @include progress-ticks; } } diff --git a/styles/character/relationships.scss b/styles/character/relationships.scss index 6e54317c..3e5f6e42 100644 --- a/styles/character/relationships.scss +++ b/styles/character/relationships.scss @@ -8,13 +8,25 @@ width: calc(95% - 36px); } - .relationship > i { - width: 18px; + .relationship { + & > i { + width: 18px; - &:hover { - color: red; + &:hover { + color: red; + } } } + + .relationship-hostile { + @include colored-item(red); + } + .relationship-friendly { + @include colored-item(green); + } + .relationship-neutral { + @include colored-item(black); + } } .reputations, .affiliations { width: 30%; diff --git a/styles/character/weapons.scss b/styles/character/weapons.scss index 365e7a8e..b8e3aba9 100644 --- a/styles/character/weapons.scss +++ b/styles/character/weapons.scss @@ -8,11 +8,28 @@ } .weapon-grid { - grid-template-columns: 5fr repeat(7, 1fr) 2fr; + column-gap: 0px; + row-gap: 0px; + grid-template-columns: 5fr repeat(7, 1fr) 2fr 0; + .weapon-header { + background-color: rgba(black, .15); + } + + .weapon-row:nth-child(2n) { + background-color: rgba(black, .05); + } } .ranged-grid { - grid-template-columns: 5fr repeat(5, 1fr) 2fr; + column-gap: 0px; + row-gap: 0px; + grid-template-columns: 5fr repeat(5, 1fr) 2fr 0; + .weapon-header { + background-color: rgba(black, .15); + } + .weapon-row:nth-child(2n) { + background-color: rgba(black, .05); + } .weapon-ims { margin-bottom: -10px; } @@ -37,12 +54,18 @@ } .armor-grid { - grid-template-columns: 1fr 1fr 75px 4fr; + grid-template-columns: 2.75em 2.75em 6em 1fr; + row-gap: 0; + column-gap: 0; + .armor-header { + background-color: rgba(black, .15); + } .armor-row { font-size: 16px; text-align: center; border-bottom: 1px solid black; + margin: 0 2px; } } } diff --git a/styles/mixins.scss b/styles/mixins.scss index 3d3daf58..744373f0 100644 --- a/styles/mixins.scss +++ b/styles/mixins.scss @@ -69,6 +69,8 @@ $hover-color: rgba(0,0,0,0.1); } @mixin colored-item($color) { + margin: 1px; + padding: 1px 3px; border-radius: 4px; border: 2px solid rgba($color, .15); diff --git a/template.yml b/template.yml index e30fee66..85414f76 100644 --- a/template.yml +++ b/template.yml @@ -125,6 +125,7 @@ Item: name: '' traittype: '' text: '' + collapsed: true skill: name: '' shade: B diff --git a/templates/character-sheet.html b/templates/character-sheet.html index 7469dc8c..fd2c1c52 100644 --- a/templates/character-sheet.html +++ b/templates/character-sheet.html @@ -97,12 +97,15 @@