From 7986e91ab7f5eeb989f35955c95216626e1efca4 Mon Sep 17 00:00:00 2001 From: Gesina Schwalbe Date: Mon, 28 Dec 2020 17:54:33 +0100 Subject: [PATCH] added storageLocation property to items Additions: - added storageLocation property to classes - added storageLocation field to template - added localization Changes: - changed default values for item string properties to "-" Fixes: - fixed CSS side-property flex properties such that new text field is properly shown - fixed for="..." setting for item's data.price label --- src/lang/en.json | 1 + src/scss/components/_description.scss | 8 ++++---- src/template.json | 3 ++- src/templates/item/partials/description.hbs | 7 +++++-- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/lang/en.json b/src/lang/en.json index b2244a44..9714455c 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -12,6 +12,7 @@ "DS4.AttackTypeMeleeRanged": "Melee / Ranged", "DS4.Quantity": "Quantity", "DS4.PriceGold": "Price (Gold)", + "DS4.StorageLocation": "Stored at", "DS4.ItemAvailability": "Availability", "DS4.ItemAvailabilityHamlet": "Hamlet", "DS4.ItemAvailabilityVilage": "Village", diff --git a/src/scss/components/_description.scss b/src/scss/components/_description.scss index 61ce282f..5f507f7f 100644 --- a/src/scss/components/_description.scss +++ b/src/scss/components/_description.scss @@ -1,5 +1,5 @@ .side-properties { - flex: 0 0 150px; + flex: 0 0 50%; margin: 5px 5px 5px 0; padding-right: 5px; border-right: 2px groove $c-border-groove; @@ -10,15 +10,15 @@ flex-direction: row; label { - flex: 2; + flex: 1; line-height: 26px; font-weight: bold; } input, select { - text-align: right; - flex: 1; + text-align: left; + flex: 1.5 1.5 0px; width: calc(100% - 2px); } } diff --git a/src/template.json b/src/template.json index 196d74a8..240235fc 100644 --- a/src/template.json +++ b/src/template.json @@ -46,7 +46,8 @@ "physical": { "quantity": 1, "price": 0, - "availability": "none" + "availability": "-", + "storageLocation": "-" }, "equipable": { "equipped": false diff --git a/src/templates/item/partials/description.hbs b/src/templates/item/partials/description.hbs index 5d46f9b5..56c8fdd2 100644 --- a/src/templates/item/partials/description.hbs +++ b/src/templates/item/partials/description.hbs @@ -4,12 +4,16 @@ +
+ + +
- +
- {{editor content=data.description target="data.description" button=true owner=owner editable=editable}} \ No newline at end of file