From 572b18ecad8859ef1dc42b04b65d486b504484ea Mon Sep 17 00:00:00 2001 From: Batziy <55130783+Batziy@users.noreply.github.com> Date: Tue, 2 Nov 2021 12:59:05 +0100 Subject: [PATCH 1/2] Top bit of Items Changed the top bit of the item sheets to look a bit better. More changes will be made. this is just a first step. --- lang/en.json | 3 +- styles/item-sheets.css | 22 ++++++ styles/witcher-styles.css | 1 + templates/sheets/alchemical-sheet.html | 27 +++---- templates/sheets/armor-sheet.html | 26 +++---- templates/sheets/component-sheet.html | 66 ++++++++++-------- templates/sheets/diagrams-sheet.html | 78 +++++++++++---------- templates/sheets/enhancement-sheet.html | 44 ++++++------ templates/sheets/mount-sheet.html | 13 ++-- templates/sheets/mutagen-sheet.html | 38 +++++----- templates/sheets/spell-sheet.html | 93 ++++++++++++++----------- templates/sheets/valuable-sheet.html | 18 +++-- templates/sheets/weapon-sheet.html | 60 ++++++++-------- 13 files changed, 282 insertions(+), 207 deletions(-) create mode 100644 styles/item-sheets.css diff --git a/lang/en.json b/lang/en.json index b76b1763..de1edb8e 100644 --- a/lang/en.json +++ b/lang/en.json @@ -114,7 +114,7 @@ "WITCHER.Diagram.otherComponents": "Other Components", "WITCHER.Diagram.investment": "Investment", "WITCHER.Diagram.Learned": "Learned", - "WITCHER.Diagram.Formulae": "Formuale", + "WITCHER.Diagram.Formulae": "Formulae", "WITCHER.Diagram.Ingredient": "Ingredient", "WITCHER.Diagram.Weapon": "Weapon", @@ -591,6 +591,7 @@ "WITCHER.Spell.Effect": "Effect", "WITCHER.Spell.AlternateComponents": "Alternate Components", "WITCHER.SPell.Signs": "Signs", + "WITCHER.Spell.Element": "Element", "WITCHER.Spell.StaCost": "STA Cost", "WITCHER.Spell.Variable": "STA Variable", diff --git a/styles/item-sheets.css b/styles/item-sheets.css new file mode 100644 index 00000000..0475c8a2 --- /dev/null +++ b/styles/item-sheets.css @@ -0,0 +1,22 @@ +.item-collum { + display: table-cell; + text-align: center; + width: 100px; +} + +.item-row { + display: table; + text-align: center; +} + +.item-collum input { + width: 75px; + height: 27px; + margin-right: 5px; + margin-left: 5px; +} + +.item-selector select{ + margin-right: 5px; + margin-left: 5px; +} \ No newline at end of file diff --git a/styles/witcher-styles.css b/styles/witcher-styles.css index d8c6860c..610ba501 100644 --- a/styles/witcher-styles.css +++ b/styles/witcher-styles.css @@ -9,6 +9,7 @@ @import "./loot-sheet.css"; @import "./profession-sheet.css"; @import "./crit-wounds-table.css"; +@import "./item-sheets.css"; @font-face { font-family:'Thewitcher'; diff --git a/templates/sheets/alchemical-sheet.html b/templates/sheets/alchemical-sheet.html index 15201836..12b6bcf4 100644 --- a/templates/sheets/alchemical-sheet.html +++ b/templates/sheets/alchemical-sheet.html @@ -1,19 +1,22 @@
-
-

-
-
- - - - - - -
-
+

+
+
+
+ + +
+
+ + +
+
+ +
+
{{!-- Attributes Tab --}} diff --git a/templates/sheets/armor-sheet.html b/templates/sheets/armor-sheet.html index 6be628bf..de44ca7f 100644 --- a/templates/sheets/armor-sheet.html +++ b/templates/sheets/armor-sheet.html @@ -1,20 +1,22 @@
-
-

-
-
- - - - - - -
+

+
+
+
+ + +
+
+ + +
+
+ +
-
diff --git a/templates/sheets/component-sheet.html b/templates/sheets/component-sheet.html index 64d37180..7b3a6bdd 100644 --- a/templates/sheets/component-sheet.html +++ b/templates/sheets/component-sheet.html @@ -1,39 +1,45 @@
-
-

-
- - - - - - -
-
+

-
- - - {{#if (eq data.type "substances")}} - - +
+
+ + +
+
+ + +
+
+ + - {{/if}} +
+
+ {{#if (eq data.type "substances")}} + + + {{/if}} +
diff --git a/templates/sheets/diagrams-sheet.html b/templates/sheets/diagrams-sheet.html index 6c730f38..c36e4dad 100644 --- a/templates/sheets/diagrams-sheet.html +++ b/templates/sheets/diagrams-sheet.html @@ -1,43 +1,49 @@
-
-

-
- - - - - - -
-
- - - - -
-
+

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
diff --git a/templates/sheets/enhancement-sheet.html b/templates/sheets/enhancement-sheet.html index 953f57c4..b78562c6 100644 --- a/templates/sheets/enhancement-sheet.html +++ b/templates/sheets/enhancement-sheet.html @@ -1,27 +1,31 @@
-
-

-
- - - - - - -
-
+

-
- - +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
{{#if (eq data.type "armor")}}
{{localize "WITCHER.Actor.Profession.Level"}}
diff --git a/templates/sheets/mount-sheet.html b/templates/sheets/mount-sheet.html index 63886961..bd03fdef 100644 --- a/templates/sheets/mount-sheet.html +++ b/templates/sheets/mount-sheet.html @@ -1,19 +1,22 @@
-
-

-
+

+
+
+
+
+
+
+
- - {{!-- Sheet Tab Navigation --}}
diff --git a/templates/sheets/spell-sheet.html b/templates/sheets/spell-sheet.html index 16f32854..4af87606 100644 --- a/templates/sheets/spell-sheet.html +++ b/templates/sheets/spell-sheet.html @@ -1,51 +1,59 @@
-
-

-
- - - {{#if (eq data.class "Hexes")}} - - - {{/if}} - {{#unless (eq data.class "Hexes")}} - - {{/unless}} -
+

+
+
+
+ + +
+
+ {{#if (eq data.class "Hexes")}} + + + {{/if}} + {{#unless (eq data.class "Hexes")}} + + + {{/unless}} +
+
+ + +
+
{{#unless (eq data.staminaIsVar true)}} {{/unless}} - -
- -
-
+
+
+
{{#if (or (eq data.class "Spells") (eq data.class "Witcher"))}} + {{/if}} {{#if (eq data.class "Invocations")}} + {{/if}} +
+
{{#if (eq data.class "Witcher")}} + {{/if}}
- - +
+ + {{#unless (eq data.class "Hexes")}}
diff --git a/templates/sheets/valuable-sheet.html b/templates/sheets/valuable-sheet.html index 217179af..0869b2bf 100644 --- a/templates/sheets/valuable-sheet.html +++ b/templates/sheets/valuable-sheet.html @@ -1,17 +1,22 @@
-
-

-
+

+
+
+
+
+
+
+
-
+
{{localize "WITCHER.Valueble.MountAccessories"}} {{/select}} +
+
+ +
- {{!-- effect Tab --}}
diff --git a/templates/sheets/weapon-sheet.html b/templates/sheets/weapon-sheet.html index 15874051..ea8d56da 100644 --- a/templates/sheets/weapon-sheet.html +++ b/templates/sheets/weapon-sheet.html @@ -1,36 +1,38 @@
-
-

-
-
- - - - - - -
-
-
+

-
- {{#unless data.isAmmo}} - - - {{/unless}} +
+
+ + +
+
+ + +
+
+ + +
+
+ {{#unless data.isAmmo}} + + + {{/unless}} +
From 949688164455ebd4cc282e25546bd742d2defd49 Mon Sep 17 00:00:00 2001 From: Batziy <55130783+Batziy@users.noreply.github.com> Date: Wed, 3 Nov 2021 13:15:57 +0100 Subject: [PATCH 2/2] Revorked Item Header Revorked the item header and implemented the feedback :) --- lang/en.json | 1 + scripts/TheWitcherTRPG.js | 3 +- styles/item-sheets.css | 84 ++++++++++++++++++++--- templates/partials/item-header.html | 76 +++++++++++++++++++++ templates/sheets/alchemical-sheet.html | 20 +----- templates/sheets/armor-sheet.html | 37 +++++----- templates/sheets/component-sheet.html | 21 +----- templates/sheets/diagrams-sheet.html | 25 ++----- templates/sheets/enhancement-sheet.html | 19 +----- templates/sheets/mount-sheet.html | 19 +----- templates/sheets/mutagen-sheet.html | 26 +------ templates/sheets/spell-sheet.html | 56 ++------------- templates/sheets/valuable-sheet.html | 91 +++++++++++-------------- templates/sheets/weapon-sheet.html | 35 ++++------ 14 files changed, 247 insertions(+), 266 deletions(-) create mode 100644 templates/partials/item-header.html diff --git a/lang/en.json b/lang/en.json index de1edb8e..47b8e11b 100644 --- a/lang/en.json +++ b/lang/en.json @@ -52,6 +52,7 @@ "WITCHER.Armor.Reliable": "Rel.", "WITCHER.Armor.EncumbranceValue": "Encumbrance", "WITCHER.Armor.Resistances": "Resistances", + "WITCHER.Armor.Res": "Res", "WITCHER.Armor.Bludgeoning": "Bludgeoning", "WITCHER.Armor.Slashing": "Slashing", "WITCHER.Armor.Percing": "Percing", diff --git a/scripts/TheWitcherTRPG.js b/scripts/TheWitcherTRPG.js index d06f8ccc..0a6c5791 100644 --- a/scripts/TheWitcherTRPG.js +++ b/scripts/TheWitcherTRPG.js @@ -24,7 +24,8 @@ async function preloadHandlebarsTemplates(){ "systems/TheWitcherTRPG/templates/partials/monster-inventory-tab.html", "systems/TheWitcherTRPG/templates/partials/monster-details-tab.html", "systems/TheWitcherTRPG/templates/partials/monster-spell-tab.html", - "systems/TheWitcherTRPG/templates/partials/skill-display.html" + "systems/TheWitcherTRPG/templates/partials/skill-display.html", + "systems/TheWitcherTRPG/templates/partials/item-header.html" ]; return loadTemplates(templatePath); } diff --git a/styles/item-sheets.css b/styles/item-sheets.css index 0475c8a2..f7adf1a3 100644 --- a/styles/item-sheets.css +++ b/styles/item-sheets.css @@ -1,22 +1,90 @@ -.item-collum { +.item-header { + display: flex; +} + +.item-header img{ + height: 100px; + max-width: 200px; +} + +.itemname { + margin-left: 5px; +} + +.item-header-row { + display: table; + margin: 0 auto; +} + +.item-header-first-collum { + width: 400px; +} + +.item-header-second-collum { display: table-cell; text-align: center; width: 100px; } +.item-header-second-collum input { + width: 75px; + height: 27px; +} + +.item-header-second-collum label { + display: block; +} + +.item-header-spell { + width: 33.33%; +} + +.item-options { + display: flex; + width: 501px; + height: 54px; +} + +.item-option-tickbox { + height: 27px; +} + +.item-option-tickbox label { + float: left; + margin-top: 5px; +} + +.item-option-tickbox input { + float: right; +} + +.item-collum { + text-align: center; + width: 33.33%; +} + +.item-collum label{ + display: block; +} + .item-row { - display: table; + display: flex; text-align: center; } -.item-collum input { - width: 75px; - height: 27px; - margin-right: 5px; - margin-left: 5px; +.item-second-collum{ + text-align: center; + width: 50%; +} + +.item-second-collum label{ + display: block; + width: 100%; } -.item-selector select{ +.----item-collum input { + width: 75px; + height: 27px; margin-right: 5px; margin-left: 5px; } \ No newline at end of file diff --git a/templates/partials/item-header.html b/templates/partials/item-header.html new file mode 100644 index 00000000..b0b7dfd3 --- /dev/null +++ b/templates/partials/item-header.html @@ -0,0 +1,76 @@ +
+ +
+

+
+ {{#unless data.isSpell}} +
+ + +
+
+ + +
+
+ {{#if data.isMutagen}} + + + {{/if}} + {{#unless data.isMutagen}} + + + {{/unless}} +
+ {{/unless}} + {{#if data.isSpell}} +
+ + +
+
+ {{#if (eq data.class "Hexes")}} + + + {{/if}} + {{#unless (eq data.class "Hexes")}} + + + {{/unless}} +
+
+ {{#unless (eq data.staminaIsVar true)}} + + + {{/unless}} +
+ {{/if}} +
+
+
diff --git a/templates/sheets/alchemical-sheet.html b/templates/sheets/alchemical-sheet.html index 12b6bcf4..3d226721 100644 --- a/templates/sheets/alchemical-sheet.html +++ b/templates/sheets/alchemical-sheet.html @@ -1,23 +1,5 @@ -
- -

-
-
-
- - -
-
- - -
-
- - -
-
- + {{>"systems/TheWitcherTRPG/templates/partials/item-header.html"}} {{!-- Attributes Tab --}}
{{localize "WITCHER.Mutagen.MutSource"}} {{localize "WITCHER.Item.Availability"}} {{localize "WITCHER.Valuable.Conceal"}}
diff --git a/templates/sheets/armor-sheet.html b/templates/sheets/armor-sheet.html index de44ca7f..b3b8e8d5 100644 --- a/templates/sheets/armor-sheet.html +++ b/templates/sheets/armor-sheet.html @@ -1,28 +1,23 @@ -
- -

-
-
-
- - + {{>"systems/TheWitcherTRPG/templates/partials/item-header.html"}} +
+
+
+ +
-
- - -
-
- - +
+
+
+ +
-
-
- - - - +
+
+ + +
{{!-- Attributes Tab --}} diff --git a/templates/sheets/component-sheet.html b/templates/sheets/component-sheet.html index 7b3a6bdd..fb6cc339 100644 --- a/templates/sheets/component-sheet.html +++ b/templates/sheets/component-sheet.html @@ -1,22 +1,7 @@ -
- -

-
-
+ {{>"systems/TheWitcherTRPG/templates/partials/item-header.html"}} +
- - -
-
- - -
-
- - -
-
-
+
{{#if (eq data.type "substances")}} - -
+ {{>"systems/TheWitcherTRPG/templates/partials/item-header.html"}} +
- - +
+ + +
- - -
-
- - -
-
-
- - -
diff --git a/templates/sheets/enhancement-sheet.html b/templates/sheets/enhancement-sheet.html index b78562c6..e0a4dec5 100644 --- a/templates/sheets/enhancement-sheet.html +++ b/templates/sheets/enhancement-sheet.html @@ -1,21 +1,6 @@ -
- -

-
-
-
- - -
-
- - -
-
- - -
+ {{>"systems/TheWitcherTRPG/templates/partials/item-header.html"}} +
- -
-
- - -
-
- - -
-
- - -
-
+ {{>"systems/TheWitcherTRPG/templates/partials/item-header.html"}} {{!-- Sheet Tab Navigation --}}
diff --git a/templates/sheets/spell-sheet.html b/templates/sheets/spell-sheet.html index 4af87606..e593713d 100644 --- a/templates/sheets/spell-sheet.html +++ b/templates/sheets/spell-sheet.html @@ -1,56 +1,14 @@ -
- -

-
-
-
- - -
-
- {{#if (eq data.class "Hexes")}} - - - {{/if}} - {{#unless (eq data.class "Hexes")}} - - - {{/unless}} -
+ + {{>"systems/TheWitcherTRPG/templates/partials/item-header.html"}} +
+
+
- {{#unless (eq data.staminaIsVar true)}} - - - {{/unless}} -
-
-
-
{{#if (or (eq data.class "Spells") (eq data.class "Witcher"))}} @@ -75,7 +33,7 @@

{{/if}}

-
+
{{#if (eq data.class "Witcher")}} - + {{#unless (eq data.class "Hexes")}}
diff --git a/templates/sheets/valuable-sheet.html b/templates/sheets/valuable-sheet.html index 0869b2bf..5ff8d5d8 100644 --- a/templates/sheets/valuable-sheet.html +++ b/templates/sheets/valuable-sheet.html @@ -1,57 +1,46 @@ -
- -

-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
-
- - -
-
- + {{>"systems/TheWitcherTRPG/templates/partials/item-header.html"}} +
+
+ + +
+
+
+
+ + +
+
+
+ + + {{!-- effect Tab --}}
diff --git a/templates/sheets/weapon-sheet.html b/templates/sheets/weapon-sheet.html index ea8d56da..f3b0905d 100644 --- a/templates/sheets/weapon-sheet.html +++ b/templates/sheets/weapon-sheet.html @@ -1,22 +1,23 @@ -
- -

-
-
+ {{>"systems/TheWitcherTRPG/templates/partials/item-header.html"}} +
- - +
+ + +
+
+ + +
- - +
+ + +
- - -
-
{{#unless data.isAmmo}}
-
- - - - - - -
{{localize "WITCHER.Mutagen.MutSource"}}{{localize "WITCHER.Item.Availability"}}{{localize "WITCHER.Valuable.Conceal"}}{{localize "WITCHER.Valuable.Conceal"}}
{{localize "WITCHER.Weapon.Type"}}