Migrated stats tab to Polymer 1.0
This commit is contained in:
16
rpg-docs/client/views/character/stats/statCard/statCard.css
Normal file
16
rpg-docs/client/views/character/stats/statCard/statCard.css
Normal 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;
|
||||
}
|
||||
16
rpg-docs/client/views/character/stats/statCard/statCard.html
Normal file
16
rpg-docs/client/views/character/stats/statCard/statCard.html
Normal 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>
|
||||
@@ -0,0 +1,9 @@
|
||||
Template.statCard.helpers({
|
||||
skillMod: function() {
|
||||
return signedString(
|
||||
Characters.calculate.skillMod(
|
||||
Template.parentData()._id, this.stat
|
||||
)
|
||||
);
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user