Migrated stats tab to Polymer 1.0

This commit is contained in:
Stefan Zermatten
2017-01-17 15:01:11 +02:00
parent b8fdc27df9
commit 420de9b005
19 changed files with 214 additions and 255 deletions

View File

@@ -0,0 +1,16 @@
.stat-card {
min-width: 75px;
text-align: center;
cursor: pointer;
-webkit-margin-collapse: separate;
background: #fff;
}
.stat-card .title {
padding: 16px;
}
.stat-card .numbers {
min-width: 72px;
padding: 16px;
}

View File

@@ -0,0 +1,16 @@
<template name="statCard">
<div>
<paper-material class="ability-mini-card layout horizontal">
<div class="numbers paper-font-display1">
{{#if isSkill}}
{{prefix}}{{skillMod}}
{{else}}
{{prefix}}{{characterCalculate "attributeValue" ../_id stat}}
{{/if}}
</div>
<div class="paper-font-subhead title flex layout horizontal center">
{{name}}
</div>
</paper-material>
</div>
</template>

View File

@@ -0,0 +1,9 @@
Template.statCard.helpers({
skillMod: function() {
return signedString(
Characters.calculate.skillMod(
Template.parentData()._id, this.stat
)
);
},
});