From e9f3dc2247ab12d28c5fa130c52f56628e687fa0 Mon Sep 17 00:00:00 2001 From: U~man Date: Thu, 2 Jul 2020 13:38:25 +0200 Subject: [PATCH] ENH: Item sheets styling --- src/lang/en.json | 5 +- src/scss/character.scss | 12 +-- src/scss/item.scss | 20 ++++- src/templates/actors/character-sheet.html | 12 +-- .../partials/character-inventory-tab.html | 4 +- .../actors/partials/character-spells-tab.html | 89 +++---------------- src/templates/items/armor-sheet.html | 8 +- src/templates/items/item-sheet.html | 37 ++++++-- src/templates/items/spell-sheet.html | 18 ++-- src/templates/items/weapon-sheet.html | 34 +++---- 10 files changed, 109 insertions(+), 130 deletions(-) diff --git a/src/lang/en.json b/src/lang/en.json index a4b1af9..0c48871 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -60,7 +60,8 @@ "OSE.ArmorClass": "Armor Class", "OSE.ArmorClassShort": "AC", "OSE.AscArmorClassShort": "AAC", - "OSE.SpellDC": "DC", + "OSE.SpellDC": "Spell DC", + "OSE.SpellDCShort": "DC", "OSE.Thac0": "THAC0", "OSE.MeleeShort": "MEL", "OSE.Melee": "Melee", @@ -98,7 +99,7 @@ "OSE.items.Misc": "Misc", "OSE.items.Weapons": "Weapons", "OSE.items.Armors": "Armors", - "OSE.items.Weight": "Wght.", + "OSE.items.Weight": "Wgt.", "OSE.items.Qualities": "Qualities", "OSE.items.Notes": "Notes", "OSE.items.Cost": "Cost", diff --git a/src/scss/character.scss b/src/scss/character.scss index d71dbad..84e0103 100644 --- a/src/scss/character.scss +++ b/src/scss/character.scss @@ -55,6 +55,12 @@ &:nth-child(even) { background: rgba(0, 0, 0, 0.1); } + &:hover { + .item-image { + background-image: url("/icons/svg/d20-grey.svg") !important; + cursor: pointer; + } + } } .item { line-height: 30px; @@ -77,10 +83,6 @@ flex-grow: 0; background-size: contain; background-repeat: no-repeat; - &:hover { - background-image: url("/icons/svg/d20-grey.svg") !important; - cursor: pointer; - } } h4 { margin: 0; @@ -106,9 +108,9 @@ flex-grow: 0; text-align: center; &.quantity { - margin: 4px 0; display: flex; input { + margin: 3px 0; border-bottom: none; } } diff --git a/src/scss/item.scss b/src/scss/item.scss index 3639051..0ef93c2 100644 --- a/src/scss/item.scss +++ b/src/scss/item.scss @@ -4,8 +4,26 @@ } .sheet-body { .stats { - flex: 0 0 70px; + flex: 0 0 90px; border-right: 1px groove rgba(0, 0, 0, 0.2); + padding-right: 2px; + .form-group { + margin: 2px; + border: 1px solid rgba(0, 0, 0, 0.15); + label { + background: rgba(0, 0, 0, 0.1); + padding: 0 4px; + } + input { + border-bottom: none; + margin: auto 0; + } + } + .block-input { + display: flex; + flex-direction: column; + text-align: center; + } } .editor { height: 255px; diff --git a/src/templates/actors/character-sheet.html b/src/templates/actors/character-sheet.html index 4fa3b7f..30b6431 100644 --- a/src/templates/actors/character-sheet.html +++ b/src/templates/actors/character-sheet.html @@ -9,9 +9,6 @@ {{localize "OSE.category.attributes"}} - - {{localize "OSE.category.inventory"}} - {{localize "OSE.category.abilities"}} @@ -20,6 +17,9 @@ {{localize "OSE.category.spells"}} {{/if}} + + {{localize "OSE.category.inventory"}} + {{localize "OSE.category.notes"}} @@ -30,9 +30,6 @@
{{> "systems/ose/templates/actors/partials/character-attributes-tab.html"}}
-
- {{> "systems/ose/templates/actors/partials/character-inventory-tab.html"}} -
{{> "systems/ose/templates/actors/partials/character-abilities-tab.html"}}
@@ -41,6 +38,9 @@ {{> "systems/ose/templates/actors/partials/character-spells-tab.html"}} {{/if}} +
+ {{> "systems/ose/templates/actors/partials/character-inventory-tab.html"}} +
{{editor content=data.details.biography target="data.details.biography" button=true owner=owner editable=editable}} diff --git a/src/templates/actors/partials/character-inventory-tab.html b/src/templates/actors/partials/character-inventory-tab.html index 9c09493..01605c4 100644 --- a/src/templates/actors/partials/character-inventory-tab.html +++ b/src/templates/actors/partials/character-inventory-tab.html @@ -28,7 +28,7 @@ {{item.data.damage}}
{{/if}} -
+
{{item.data.qualities}}
@@ -122,7 +122,7 @@
{{#if item.data.quantity.max}} / {{item.data.quantity.max}}{{/if}} + placeholder="0" />{{#if item.data.quantity.max}}/{{item.data.quantity.max}}{{/if}}
{{item.data.weight}} diff --git a/src/templates/actors/partials/character-spells-tab.html b/src/templates/actors/partials/character-spells-tab.html index 4534787..210c6d4 100644 --- a/src/templates/actors/partials/character-spells-tab.html +++ b/src/templates/actors/partials/character-spells-tab.html @@ -1,102 +1,41 @@
  • -

    {{localize 'OSE.SpellDC'}}

    -
    - -
    +

    {{localize 'OSE.SpellDCShort'}}

    +
    + +
  • -
  • -

    {{localize 'OSE.Level'}} 1

    -
    - - / - -
    -
  • -
  • -

    {{localize 'OSE.Level'}} 2

    -
    - - / - -
    -
  • -
  • -

    {{localize 'OSE.Level'}} 3

    -
    - - / - -
    -
  • -
  • -

    {{localize 'OSE.Level'}} 4

    -
    - - / - -
    -
  • -
  • -

    {{localize 'OSE.Level'}} 5

    -
    - - / - -
    -
  • -
  • -

    {{localize 'OSE.Level'}} 6

    -
    - - / - -
    -

{{localize 'OSE.category.spells'}}

-
- {{#if owner}} - - {{/if}} -
+
+ {{#if owner}} + + {{/if}} +
{{#each spells as |item|}}
  • -
    +

    {{item.name~}}

    {{#if ../owner}} - - + + {{/if}}
  • {{/each}}
    -
    + \ No newline at end of file diff --git a/src/templates/items/armor-sheet.html b/src/templates/items/armor-sheet.html index 23874f9..b6db292 100644 --- a/src/templates/items/armor-sheet.html +++ b/src/templates/items/armor-sheet.html @@ -11,25 +11,25 @@
    - +
    - +
    - +
    - +
    diff --git a/src/templates/items/item-sheet.html b/src/templates/items/item-sheet.html index 2704d00..3aaaed9 100644 --- a/src/templates/items/item-sheet.html +++ b/src/templates/items/item-sheet.html @@ -3,17 +3,36 @@

    - +

    - {{editor content=data.description target="data.description" - button=true owner=owner editable=editable}} +
    +
    +
    + +
    + / +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    + {{editor content=data.description target="data.description" button=true + owner=owner editable=editable}} +
    +
    - + \ No newline at end of file diff --git a/src/templates/items/spell-sheet.html b/src/templates/items/spell-sheet.html index ce4e1d0..fde4184 100644 --- a/src/templates/items/spell-sheet.html +++ b/src/templates/items/spell-sheet.html @@ -11,31 +11,31 @@
    - +
    -
    - +
    +
    -
    - +
    +
    -
    - +
    +
    -
    - +
    +
    diff --git a/src/templates/items/weapon-sheet.html b/src/templates/items/weapon-sheet.html index c4fe94f..2d0dd08 100644 --- a/src/templates/items/weapon-sheet.html +++ b/src/templates/items/weapon-sheet.html @@ -13,42 +13,42 @@
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    - +
    +
    - +
    - +
    - +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    {{editor content=data.description target="data.description" button=true