diff --git a/module/templates.ts b/module/templates.ts index 955e06e7..41d2656e 100644 --- a/module/templates.ts +++ b/module/templates.ts @@ -11,6 +11,7 @@ export async function preloadHandlebarsTemplates(): Promise { "systems/burningwheel/templates/parts/rollable-item.hbs", "systems/burningwheel/templates/parts/rollable-skill.hbs", "systems/burningwheel/templates/parts/spell.hbs", + "systems/burningwheel/templates/parts/trait.hbs", "systems/burningwheel/templates/parts/weapons.hbs", "systems/burningwheel/templates/parts/character-settings.hbs", diff --git a/styles/character/bits.scss b/styles/character/bits.scss index fe955bc3..7eb79dd3 100644 --- a/styles/character/bits.scss +++ b/styles/character/bits.scss @@ -53,27 +53,32 @@ margin: 5px; .trait { + @include colored-item(black); textarea { background-color: transparent; min-height: 8em; } - } - i { - float: right; - font-size: 12px; - margin-top: 6px; - margin-left: 5px; - color: transparentize($color: black, $amount: 0.25) - } + h3 { + margin-bottom: 0; + } - i:hover { - color: #FF0000; - } - } + label { + flex: 1 100px; + } - .trait-checkbox:checked + div > textarea { - display: none; + i { + flex: 0 12px; + font-size: 12px; + margin-top: 6px; + margin-left: 5px; + color: transparentize($color: black, $amount: 0.25) + } + + i:hover { + color: #FF0000; + } + } } } diff --git a/templates/character-sheet.hbs b/templates/character-sheet.hbs index bc534663..25170fe7 100644 --- a/templates/character-sheet.hbs +++ b/templates/character-sheet.hbs @@ -124,14 +124,7 @@ {{#each traits.character as |trait|}} -
-

- {{ trait.name }} - - - -

-
+ {{> "systems/burningwheel/templates/parts/trait.hbs" trait=trait}} {{/each}}
@@ -139,18 +132,7 @@ {{#each traits.die as |trait|}} - -
- - -
+ {{> "systems/burningwheel/templates/parts/trait.hbs" trait=trait}} {{/each}}
@@ -158,18 +140,7 @@ {{#each traits.callon as |trait|}} - -
- - -
+ {{> "systems/burningwheel/templates/parts/trait.hbs" trait=trait}} {{/each}}
diff --git a/templates/parts/trait.hbs b/templates/parts/trait.hbs new file mode 100644 index 00000000..2dfa4019 --- /dev/null +++ b/templates/parts/trait.hbs @@ -0,0 +1,13 @@ +
+

+ + + + + +

+ {{#if trait.data.collapsed}}{{else}} +
+ + {{/if}} +
\ No newline at end of file