Added borders to ability scores and AC

This commit is contained in:
Thaum Rystra
2018-03-02 07:25:37 +02:00
parent 64b3ca6066
commit c6e62e1cfa
6 changed files with 45 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
<template name="printedAbility">
<div class="printedAbility layout vertical center">
<div class="printedAbility layout vertical center double-border">
<div class="paper-font-subhead title flex layout horizontal center">
{{title}}
</div>

View File

@@ -20,6 +20,41 @@
overflow: hidden;
}
.double-border {
position: relative;
margin: 16px;
}
.double-border::after {
content: "";
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
border: 28px solid transparent;
border-image-source: url(/png/doubleLineImageBorder110x126.png);
border-image-slice: 110 126;
border-image-repeat: stretch;
border-image-outset: 11px 10px;
box-sizing: content-box;
}
.shield-background {
background: url(/png/shieldBorder.png);
background-size: contain;
background-repeat: no-repeat;
width: 102px;
height: 118px;
-webkit-print-color-adjust: exact;
}
.shield-background .paper-font-subhead {
width: 80px;
text-align: center;
line-height: 1.1;
}
@media screen {
.printed {
display: none;

View File

@@ -104,7 +104,7 @@
<div class="layout vertical">
<div class="layout horizontal justified">
<div class="armor">
{{> printedSquareStat stat="armor" name="Armor Class"}}
{{> printedSquareStat stat="armor" name="Armor Class" class="shield-background"}}
</div>
<div class="inititive">
{{> printedSquareStat stat="initiative" name="Initiative" isSkill="true"}}

View File

@@ -1,14 +1,14 @@
<template name="printedSquareStat">
<div class="printedSquareStat padded layout vertical center">
<div class="printedSquareStat padded layout vertical center center-justified {{class}}">
<div class="numbers paper-font-display1">
{{#if isSkill}}
{{prefix}}{{skillMod}}
{{else}}
{{prefix}}{{characterCalculate "attributeValue" ../_id stat}}
{{/if}}
</div>
<div class="paper-font-subhead">
{{name}}
</div>
<div class="numbers paper-font-display1">
{{#if isSkill}}
{{prefix}}{{skillMod}}
{{else}}
{{prefix}}{{characterCalculate "attributeValue" ../_id stat}}
{{/if}}
</div>
</div>
</template>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB