From f73f2f670f7c1e37f521736cd1d8ab29f414a282 Mon Sep 17 00:00:00 2001 From: Thaum Rystra Date: Fri, 2 Mar 2018 21:40:21 +0200 Subject: [PATCH] Formatted all existing printed character sheet fields nicely --- .../printedCharacterSheet.css | 90 +++++++++-- .../printedCharacterSheet.html | 152 ++++++++++++------ .../printedLongStat/printedLongStat.css | 20 +++ .../printedLongStat/printedLongStat.html | 14 +- .../printedSkillRow/printedSkillRow.css | 10 ++ .../printedSquareStat/printedSquareStat.css | 4 + .../printedSquareStat/printedSquareStat.html | 2 +- rpg-docs/public/png/doubleLineImageBorder.png | Bin 0 -> 7390 bytes .../png/doubleLineImageBorder110x126.png | Bin 4846 -> 0 bytes rpg-docs/public/png/octogonBorder.png | Bin 0 -> 14938 bytes rpg-docs/public/png/shieldBorder.png | Bin 14740 -> 15483 bytes rpg-docs/public/png/upwardPointingBorder.png | Bin 0 -> 4843 bytes 12 files changed, 222 insertions(+), 70 deletions(-) create mode 100644 rpg-docs/client/views/character/printedCharacterSheet/printedLongStat/printedLongStat.css create mode 100644 rpg-docs/client/views/character/printedCharacterSheet/printedSkillRow/printedSkillRow.css create mode 100644 rpg-docs/client/views/character/printedCharacterSheet/printedSquareStat/printedSquareStat.css create mode 100644 rpg-docs/public/png/doubleLineImageBorder.png delete mode 100644 rpg-docs/public/png/doubleLineImageBorder110x126.png create mode 100644 rpg-docs/public/png/octogonBorder.png create mode 100644 rpg-docs/public/png/upwardPointingBorder.png diff --git a/rpg-docs/client/views/character/printedCharacterSheet/printedCharacterSheet.css b/rpg-docs/client/views/character/printedCharacterSheet/printedCharacterSheet.css index d7428e71..2ce69b2e 100644 --- a/rpg-docs/client/views/character/printedCharacterSheet/printedCharacterSheet.css +++ b/rpg-docs/client/views/character/printedCharacterSheet/printedCharacterSheet.css @@ -10,9 +10,10 @@ .printed > .page { width: 100%; - padding: 1cm; + padding: 6mm; page-break-inside: avoid; page-break-after: always; + font-size: 3mm; } .printed .shrink-to-fit { @@ -20,37 +21,87 @@ overflow: hidden; } -.double-border { - position: relative; - margin: 16px; +.printed p { + margin-bottom: 1mm; } -.double-border::after { +.printed .double-border { + position: relative; + padding: 11px 10px; +} + +.printed .double-border:before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; right: 0; - border: 28px solid transparent; - border-image-source: url(/png/doubleLineImageBorder110x126.png); + border: 16px solid transparent; + border-image-source: url(/png/doubleLineImageBorder.png); border-image-slice: 110 126; border-image-repeat: stretch; - border-image-outset: 11px 10px; box-sizing: content-box; + z-index: -1; +} + +.printed .double-border.printedAbility { + padding: 11px 6px 0; + margin-bottom: 3mm; +} + +.printed .double-border.printedAbility:last-of-type { + margin-bottom: 0; +} + +.printed .printedAbility .modifier { + position: relative; + top: 4px; + z-index: 1; + padding: 2px 32px; + background-image: url(/png/upwardPointingBorder.png); + background-position: center; + background-size: contain; + background-repeat: no-repeat; + -webkit-print-color-adjust: exact; +} + +.printed .octogon-border { + position: relative; + padding: 0 20px; +} + +.printed .octogon-border:before { + content: ""; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + border: 22px solid transparent; + border-image: url(/png/octogonBorder.png) 124 118 fill; + z-index: -1; +} + +.printed iron-icon { + width: 16px; + height: 16px; } .shield-background { background: url(/png/shieldBorder.png); - background-size: contain; + background-size: cover; background-repeat: no-repeat; - width: 102px; - height: 118px; -webkit-print-color-adjust: exact; + padding: 4px 8px 8px; + width: 80px; + height: 91px; + position: relative; + top: -6px; } .shield-background .paper-font-subhead { - width: 80px; + width: 64px; text-align: center; line-height: 1.1; } @@ -68,5 +119,18 @@ app-drawer { display: none; } - + .paper-font-subhead { + font-size: 3mm !important; + line-height: 3.5mm !important; + font-weight: bold !important; + text-transform: uppercase !important; + } + .paper-font-subhead.modifier { + font-size: 4mm !important; + line-height: 6mm !important; + } + .paper-font-display1 { + font-size: 8mm !important; + line-height: 12mm !important; + } } diff --git a/rpg-docs/client/views/character/printedCharacterSheet/printedCharacterSheet.html b/rpg-docs/client/views/character/printedCharacterSheet/printedCharacterSheet.html index 1366489e..71f18ed8 100644 --- a/rpg-docs/client/views/character/printedCharacterSheet/printedCharacterSheet.html +++ b/rpg-docs/client/views/character/printedCharacterSheet/printedCharacterSheet.html @@ -2,8 +2,8 @@
-
-
+
+
{{name}}
@@ -20,9 +20,15 @@
-
+
+
+ {{> printedLongStat stat="" name="Inspiration" prefix=""}} +
+
+ {{> printedLongStat stat="proficiencyBonus" name="Proficiency Bonus" prefix="+"}} +
-
+
{{> printedAbility ability="strength" title="Strength"}} {{> printedAbility ability="dexterity" title="Dexterity"}} {{> printedAbility ability="constitution" title="Constitution"}} @@ -30,14 +36,8 @@ {{> printedAbility ability="wisdom" title="Wisdom"}} {{> printedAbility ability="charisma" title="Charisma"}}
-
-
- {{> printedLongStat stat="proficiencyBonus" name="Proficiency Bonus" prefix="+"}} -
-
-
- Saving Throws -
+
+
{{> printedSkillRow name="Strength" skill="strengthSave"}} {{> printedSkillRow name="Dexterity" skill="dexteritySave"}} @@ -46,11 +46,11 @@ {{> printedSkillRow name="Wisdom" skill="wisdomSave"}} {{> printedSkillRow name="Charisma" skill="charismaSave"}}
-
-
-
- Skills +
+ Saving Throws
+
+
{{> printedSkillRow name="Acrobatics" skill="acrobatics"}} {{> printedSkillRow name="Animal Handling" skill="animalHandling"}} @@ -71,11 +71,14 @@ {{> printedSkillRow name="Stealth" skill="stealth"}} {{> printedSkillRow name="Survival" skill="survival"}}
+
+ Skills +
-
-
+
+
Proficiencies
@@ -100,58 +103,107 @@
-
+
-
+
{{> printedSquareStat stat="armor" name="Armor Class" class="shield-background"}}
- {{> printedSquareStat stat="initiative" name="Initiative" isSkill="true"}} + {{> printedSquareStat stat="initiative" name="Initiative" isSkill="true" class="double-border"}}
- {{> printedSquareStat stat="speed" name="Speed"}} + {{> printedSquareStat stat="speed" name="Speed" class="double-border"}}
-
-
Hit Points
+
+
+ Hit point maximum: + + {{characterCalculate "attributeBase" _id "hitPoints"}} + +
+
+ +
+
+ Hit Points +
+
+
- +
-
- /{{characterCalculate "attributeBase" _id "hitPoints"}} +
+ Temporary Hit Points
-
-
Temporary Hit Points
-
- -
-
-
- Hit Dice -
-
-
-
- Successes +
+
+
+ Total: + + Total goes here +
- - - -
-
- Failures + +
+
+ Hit Dice +
+
+
+
+
+ Successes +
+ + + +
+
+
+ Failures +
+ + + +
+
+ Death Saves
- - -
-
+ +
+
+
+ {{#markdown}}{{evaluateShortString character._id character.personality}}{{/markdown}} +
+ Personality traits +
+
+
+ {{#markdown}}{{evaluateShortString character._id character.ideals}}{{/markdown}} +
+ Ideals +
+
+
+ {{#markdown}}{{evaluateShortString character._id character.bonds}}{{/markdown}} +
+ Bonds +
+
+
+ {{#markdown}}{{evaluateShortString character._id character.flaws}}{{/markdown}} +
+ Flaws +
+
diff --git a/rpg-docs/client/views/character/printedCharacterSheet/printedLongStat/printedLongStat.css b/rpg-docs/client/views/character/printedCharacterSheet/printedLongStat/printedLongStat.css new file mode 100644 index 00000000..724a727c --- /dev/null +++ b/rpg-docs/client/views/character/printedCharacterSheet/printedLongStat/printedLongStat.css @@ -0,0 +1,20 @@ +.printedLongStat .title { + white-space: nowrap; + margin-left: 2mm; +} + +.printedLongStat .numbers { + z-index: 1; + min-width: 74px; + min-height: 45px; +} + +.printed .printedLongStat.double-border{ + padding: 0; +} + +.printed .printedLongStat.double-border:before { + top: 4px; + bottom: 4px; + left: 33px; +} diff --git a/rpg-docs/client/views/character/printedCharacterSheet/printedLongStat/printedLongStat.html b/rpg-docs/client/views/character/printedCharacterSheet/printedLongStat/printedLongStat.html index 04e82209..06b4d06e 100644 --- a/rpg-docs/client/views/character/printedCharacterSheet/printedLongStat/printedLongStat.html +++ b/rpg-docs/client/views/character/printedCharacterSheet/printedLongStat/printedLongStat.html @@ -1,10 +1,12 @@