Migrated stats tab to Polymer 1.0
This commit is contained in:
@@ -56,7 +56,7 @@ $thinColumnWidth: 240px;
|
|||||||
padding: 16px;
|
padding: 16px;
|
||||||
border-radius: 0 0 2px 2px;
|
border-radius: 0 0 2px 2px;
|
||||||
&.list {
|
&.list {
|
||||||
padding: 0 0 16px 0;
|
padding: 16px 0;
|
||||||
.subhead {
|
.subhead {
|
||||||
color: rgba(0,0,0,0.54);
|
color: rgba(0,0,0,0.54);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ List items
|
|||||||
*/
|
*/
|
||||||
.item-slot {
|
.item-slot {
|
||||||
background-color: rgb(232, 232, 232);
|
background-color: rgb(232, 232, 232);
|
||||||
background-color: rgba(0, 0, 0, 0.1);
|
background-color: rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
@@ -30,7 +30,7 @@ List items
|
|||||||
box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.37);
|
box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.37);
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
}
|
}
|
||||||
core-icon, paper-icon-button {
|
iron-icon, paper-icon-button {
|
||||||
color: #747474;
|
color: #747474;
|
||||||
color: rgba(0,0,0,0.54);
|
color: rgba(0,0,0,0.54);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,14 +35,6 @@ hr {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
Stop all links from formatting themselves
|
|
||||||
*/
|
|
||||||
a {
|
|
||||||
text-decoration: none;
|
|
||||||
color: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
.avatar {
|
.avatar {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|||||||
@@ -1,107 +1,35 @@
|
|||||||
.display2 {
|
.white-text .paper-font-display2{
|
||||||
font-size: 45px;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #000;
|
|
||||||
color: rgba(0,0,0,0.54);
|
|
||||||
letter-spacing: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.white-text .display2{
|
|
||||||
color: rgba(255,255,255,0.54);
|
color: rgba(255,255,255,0.54);
|
||||||
}
|
}
|
||||||
|
|
||||||
.display1 {
|
.white-text .paper-font-display1, .white-text.paper-font-display1{
|
||||||
font-size: 34px;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #000;
|
|
||||||
color: rgba(0,0,0,0.54);
|
|
||||||
letter-spacing: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.white-text .display1, .white-text.display1{
|
|
||||||
color: rgba(255,255,255,0.54);
|
color: rgba(255,255,255,0.54);
|
||||||
}
|
}
|
||||||
|
|
||||||
h1, .headline {
|
.white-text h1, .white-text .paper-font-headline, .white-text.paper-font-headline{
|
||||||
font-size: 24px;
|
|
||||||
font-weight: 400;
|
|
||||||
margin: 0;
|
|
||||||
color: #000;
|
|
||||||
color: rgba(0,0,0,0.87);
|
|
||||||
letter-spacing: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.white-text h1, .white-text .headline, .white-text.headline{
|
|
||||||
color: rgba(255,255,255,0.87);
|
color: rgba(255,255,255,0.87);
|
||||||
}
|
}
|
||||||
|
|
||||||
h2, .title {
|
.white-text h2, .white-text .paper-font-title, .white-text.paper-font-title{
|
||||||
font-size: 20px;
|
|
||||||
font-weight: 500;
|
|
||||||
margin: 0;
|
|
||||||
color: #000;
|
|
||||||
color: rgba(0,0,0,0.87);
|
|
||||||
letter-spacing: 0.005em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.white-text h2, .white-text .title, .white-text.title{
|
|
||||||
color: rgba(255,255,255,0.87);
|
color: rgba(255,255,255,0.87);
|
||||||
}
|
}
|
||||||
|
|
||||||
h3, .subhead {
|
.white-text h3, .white-text .paper-font-subhead{
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 400;
|
|
||||||
margin: 0;
|
|
||||||
color: #000;
|
|
||||||
color: rgba(0,0,0,0.87);
|
|
||||||
letter-spacing: 0.010em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.white-text h3, .white-text .subhead{
|
|
||||||
color: rgba(255,255,255,0.87);
|
color: rgba(255,255,255,0.87);
|
||||||
}
|
}
|
||||||
|
|
||||||
.body2 {
|
.white-text .paper-font-body2{
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #000;
|
|
||||||
color: rgba(0,0,0,0.87);
|
|
||||||
letter-spacing: 0.010em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.white-text .body2{
|
|
||||||
color: rgba(255,255,255,0.87);
|
color: rgba(255,255,255,0.87);
|
||||||
}
|
}
|
||||||
|
|
||||||
p, .body1, body {
|
.white-text p, .white-text .paper-font-body1{
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 400;
|
|
||||||
margin: 0;
|
|
||||||
color: #000;
|
|
||||||
color: rgba(0,0,0,0.87);
|
|
||||||
letter-spacing: 0.010em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.white-text p, .white-text .body1{
|
|
||||||
color: rgba(255,255,255,0.87);
|
color: rgba(255,255,255,0.87);
|
||||||
}
|
}
|
||||||
|
|
||||||
.caption{
|
.white-text .paper-font-caption{
|
||||||
font-size: 12px;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #000;
|
|
||||||
color: rgba(0,0,0,0.54);
|
|
||||||
letter-spacing: 0.020em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.white-text .caption{
|
|
||||||
color: rgba(255,255,255,0.54);
|
color: rgba(255,255,255,0.54);
|
||||||
}
|
}
|
||||||
|
|
||||||
html /deep/ .white-text{
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.black54 {
|
.black54 {
|
||||||
color: #444;
|
color: #444;
|
||||||
color: rgba(0,0,0,0.54);
|
color: rgba(0,0,0,0.54);
|
||||||
|
|||||||
@@ -1,54 +1,56 @@
|
|||||||
<template name="characterSheet">
|
<template name="characterSheet">
|
||||||
<app-header>
|
<app-header-layout has-scrolling-region fullbleed>
|
||||||
<app-toolbar class="medium-tall {{colorClass}}">
|
<app-header fixed>
|
||||||
<paper-icon-button icon="menu" drawer-toggle top-item></paper-icon-button>
|
<app-toolbar class="medium-tall {{colorClass}}">
|
||||||
<div class="flex" top-item>
|
<paper-icon-button icon="menu" drawer-toggle top-item></paper-icon-button>
|
||||||
{{name}}
|
<div class="flex" top-item>
|
||||||
</div>
|
{{name}}
|
||||||
{{#if canEditCharacter _id}}
|
</div>
|
||||||
{{> colorDropdown}}
|
{{#if canEditCharacter _id}}
|
||||||
<paper-menu-button top-item>
|
{{> colorDropdown}}
|
||||||
<paper-icon-button icon="more-vert" class="dropdown-trigger"></paper-icon-button>
|
<paper-menu-button top-item>
|
||||||
<paper-menu class="dropdown-content" halign="right">
|
<paper-icon-button icon="more-vert" class="dropdown-trigger"></paper-icon-button>
|
||||||
<paper-icon-item id="deleteCharacter">
|
<paper-menu class="dropdown-content" halign="right">
|
||||||
<iron-icon icon="delete" item-icon></iron-icon>
|
<paper-icon-item id="deleteCharacter">
|
||||||
Delete
|
<iron-icon icon="delete" item-icon></iron-icon>
|
||||||
</paper-icon-item>
|
Delete
|
||||||
<paper-icon-item id="shareCharacter">
|
</paper-icon-item>
|
||||||
<iron-icon icon="social:share" item-icon></iron-icon>
|
<paper-icon-item id="shareCharacter">
|
||||||
Share
|
<iron-icon icon="social:share" item-icon></iron-icon>
|
||||||
</paper-icon-item>
|
Share
|
||||||
<paper-icon-item id="characterSettings">
|
</paper-icon-item>
|
||||||
<iron-icon icon="settings" item-icon></iron-icon>
|
<paper-icon-item id="characterSettings">
|
||||||
Settings
|
<iron-icon icon="settings" item-icon></iron-icon>
|
||||||
</paper-icon-item>
|
Settings
|
||||||
</paper-menu>
|
</paper-icon-item>
|
||||||
</paper-menu-button>
|
</paper-menu>
|
||||||
{{/if}}
|
</paper-menu-button>
|
||||||
<div bottom-item>
|
{{/if}}
|
||||||
<paper-tabs id="characterSheetTabs" selected={{selectedTab}} class="{{colorClass}}" attr-for-selected="name">
|
<div bottom-item>
|
||||||
<paper-tab name="stats">Stats</paper-tab>
|
<paper-tabs id="characterSheetTabs" selected={{selectedTab}} class="{{colorClass}}" attr-for-selected="name">
|
||||||
<paper-tab name="features">Features</paper-tab>
|
<paper-tab name="stats">Stats</paper-tab>
|
||||||
<paper-tab name="inventory">Inventory</paper-tab>
|
<paper-tab name="features">Features</paper-tab>
|
||||||
{{#unless hideSpellcasting}}
|
<paper-tab name="inventory">Inventory</paper-tab>
|
||||||
<paper-tab name="spells">Spells</paper-tab>
|
{{#unless hideSpellcasting}}
|
||||||
{{/unless}}
|
<paper-tab name="spells">Spells</paper-tab>
|
||||||
<paper-tab name="persona">Persona</paper-tab>
|
{{/unless}}
|
||||||
<paper-tab name="journal">Journal</paper-tab>
|
<paper-tab name="persona">Persona</paper-tab>
|
||||||
</paper-tabs>
|
<paper-tab name="journal">Journal</paper-tab>
|
||||||
</div>
|
</paper-tabs>
|
||||||
</app-toolbar>
|
</div>
|
||||||
</app-header>
|
</app-toolbar>
|
||||||
<div>
|
</app-header>
|
||||||
<neon-animated-pages id="tabPages" selected={{selectedTab}} transitions="slide-from-right" attr-for-selected="name">
|
<div>
|
||||||
<div name="stats">{{> stats}}</div>
|
<neon-animated-pages id="tabPages" selected={{selectedTab}} transitions="slide-from-right" attr-for-selected="name">
|
||||||
<div name="features">{{> features}}</div>
|
<div name="stats">{{> stats}}</div>
|
||||||
<div name="inventory">{{> inventory}}</div>
|
<div name="features">{{> features}}</div>
|
||||||
{{#unless hideSpellcasting}}
|
<div name="inventory">{{> inventory}}</div>
|
||||||
<div name="spells">{{> spells}}</div>
|
{{#unless hideSpellcasting}}
|
||||||
{{/unless}}
|
<div name="spells">{{> spells}}</div>
|
||||||
<div name="persona">{{> persona}}</div>
|
{{/unless}}
|
||||||
<div name="journal">{{> journal}}</div>
|
<div name="persona">{{> persona}}</div>
|
||||||
</neon-animated-pages>
|
<div name="journal">{{> journal}}</div>
|
||||||
</div>
|
</neon-animated-pages>
|
||||||
|
</div>
|
||||||
|
</app-header-layout>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
.ability-mini-card {
|
||||||
|
min-width: 75px;
|
||||||
|
text-align: center;
|
||||||
|
cursor: pointer;
|
||||||
|
-webkit-margin-collapse: separate;
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ability-mini-card .title {
|
||||||
|
padding: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ability-mini-card .numbers {
|
||||||
|
min-width: 72px;
|
||||||
|
padding: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ability-mini-card .modifier {
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 24px;
|
||||||
|
color: #747474;
|
||||||
|
color: rgba(0,0,0,0.54);
|
||||||
|
}
|
||||||
@@ -1,16 +1,17 @@
|
|||||||
<template name="abilityMiniCard">
|
<template name="abilityMiniCard">
|
||||||
<div>
|
<div>
|
||||||
<paper-material class="card abilityMiniCard clickable"
|
<paper-material class="ability-mini-card layout horizontal">
|
||||||
hero-id="main" {{detailHero ability ../_id}}
|
<div class="numbers">
|
||||||
layout horizontal>
|
<div class="paper-font-display1 stat">
|
||||||
<div class="left white-text {{color}}"
|
{{characterCalculate "attributeValue" ../_id ability}}
|
||||||
hero-id="toolbar" {{detailHero ability ../_id}}>
|
</div>
|
||||||
<div class="display1">{{characterCalculate "attributeValue" ../_id ability}}</div>
|
<div class="paper-font-subhead modifier">
|
||||||
<div class="title">{{abilityMod}}</div>
|
{{abilityMod}}
|
||||||
</div>
|
</div>
|
||||||
<div class="right subhead" layout horizontal center>
|
</div>
|
||||||
{{title}}
|
<div class="paper-font-subhead title flex layout horizontal center">
|
||||||
</div>
|
{{title}}
|
||||||
</paper-material>
|
</div>
|
||||||
|
</paper-material>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,31 +1,28 @@
|
|||||||
<template name="healthCard">
|
<template name="healthCard">
|
||||||
<paper-material class="card container healthCard"
|
<paper-material class="card container healthCard layout horizontal wrap">
|
||||||
hero-id="main" {{detailHero "hitPoints" _id}}
|
<div class="green white-text subhead left layout vertical center center-justified">
|
||||||
layout horizontal wrap>
|
<div class="hitPointTitle clickable">
|
||||||
<div class="green white-text subhead left"
|
Hit Points
|
||||||
hero-id="toolbar" {{detailHero "hitPoints" _id}}
|
</div>
|
||||||
layout vertical center center-justified>
|
|
||||||
<div class="hitPointTitle clickable">Hit Points</div>
|
|
||||||
<paper-icon-button class="white54"
|
<paper-icon-button class="white54"
|
||||||
id="addTempHP"
|
id="addTempHP"
|
||||||
icon="add"
|
icon="add"
|
||||||
disabled={{#unless canEditCharacter _id}}true{{/unless}}>
|
disabled={{#unless canEditCharacter _id}}true{{/unless}}>
|
||||||
</paper-icon-button>
|
</paper-icon-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="right" flex layout vertical center-justified style="min-width: 180px;">
|
<div class="right flex layout vertical center-justified" style="min-width: 180px;">
|
||||||
<div layout horizontal>
|
<div class="layout horizontal">
|
||||||
<paper-diff-slider id="hitPointSlider"
|
<paper-diff-slider id="hitPointSlider"
|
||||||
value={{characterCalculate "attributeValue" _id "hitPoints"}}
|
value={{characterCalculate "attributeValue" _id "hitPoints"}}
|
||||||
max={{characterCalculate "attributeBase" _id "hitPoints"}}
|
max={{characterCalculate "attributeBase" _id "hitPoints"}}
|
||||||
editable pin
|
editable pin
|
||||||
disabled={{#unless canEditCharacter _id}}true{{/unless}}
|
disabled={{#unless canEditCharacter _id}}true{{/unless}}>
|
||||||
role="slider">
|
|
||||||
</paper-diff-slider>
|
</paper-diff-slider>
|
||||||
</div>
|
</div>
|
||||||
{{#each tempHitPoints}}
|
{{#each tempHitPoints}}
|
||||||
<div>
|
<div>
|
||||||
{{name}}
|
{{name}}
|
||||||
<div layout horizontal>
|
<div class="layout horizontal">
|
||||||
<paper-diff-slider class="tempHitPointSlider"
|
<paper-diff-slider class="tempHitPointSlider"
|
||||||
value={{left}}
|
value={{left}}
|
||||||
max={{maximum}}
|
max={{maximum}}
|
||||||
@@ -58,20 +55,20 @@
|
|||||||
</div>
|
</div>
|
||||||
{{#if showDeathSave}}
|
{{#if showDeathSave}}
|
||||||
{{#with deathSaveObject}}
|
{{#with deathSaveObject}}
|
||||||
<div class="padded" layout vertical center>
|
<div class="padded layout vertical center">
|
||||||
<div class="subhead">
|
<div class="paper-font-subhead">
|
||||||
Death Saves
|
Death Saves
|
||||||
</div>
|
</div>
|
||||||
<div layout horizontal>
|
<div class="layout horizontal">
|
||||||
<div layout vertical center>
|
<div class="layout vertical center">
|
||||||
<div class="caption">Fail</div>
|
<div class="caption">Fail</div>
|
||||||
<div layout horizontal center-justified wrap reverse>
|
<div class="layout horizontal center-justified wrap reverse">
|
||||||
<paper-icon-button class="slotBubble failBubble" icon={{failIcon 1}} disabled={{failDisabled 1}}></paper-icon-button>
|
<paper-icon-button class="slotBubble failBubble" icon={{failIcon 1}} disabled={{failDisabled 1}}></paper-icon-button>
|
||||||
<paper-icon-button class="slotBubble failBubble" icon={{failIcon 2}} disabled={{failDisabled 2}}></paper-icon-button>
|
<paper-icon-button class="slotBubble failBubble" icon={{failIcon 2}} disabled={{failDisabled 2}}></paper-icon-button>
|
||||||
<paper-icon-button class="slotBubble failBubble" icon={{failIcon 3}} disabled={{failDisabled 3}}></paper-icon-button>
|
<paper-icon-button class="slotBubble failBubble" icon={{failIcon 3}} disabled={{failDisabled 3}}></paper-icon-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div layout horizontal center center-justified style="min-width: 94px">
|
<div class="layout horizontal center center-justified" style="min-width: 94px">
|
||||||
{{#if dead}}
|
{{#if dead}}
|
||||||
DEAD
|
DEAD
|
||||||
{{else}}
|
{{else}}
|
||||||
@@ -83,8 +80,8 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div layout vertical center>
|
<div layout vertical center>
|
||||||
<div class="caption">Pass</div>
|
<div class="paper-font-caption">Pass</div>
|
||||||
<div layout horizontal center-justified wrap>
|
<div class="layout horizontal center-justified wrap">
|
||||||
<paper-icon-button class="slotBubble passBubble" icon={{passIcon 1}} disabled={{passDisabled 1}}></paper-icon-button>
|
<paper-icon-button class="slotBubble passBubble" icon={{passIcon 1}} disabled={{passDisabled 1}}></paper-icon-button>
|
||||||
<paper-icon-button class="slotBubble passBubble" icon={{passIcon 2}} disabled={{passDisabled 2}}></paper-icon-button>
|
<paper-icon-button class="slotBubble passBubble" icon={{passIcon 2}} disabled={{passDisabled 2}}></paper-icon-button>
|
||||||
<paper-icon-button class="slotBubble passBubble" icon={{passIcon 3}} disabled={{passDisabled 3}}></paper-icon-button>
|
<paper-icon-button class="slotBubble passBubble" icon={{passIcon 3}} disabled={{passDisabled 3}}></paper-icon-button>
|
||||||
|
|||||||
@@ -1,35 +1,31 @@
|
|||||||
<template name="hitDice">
|
<template name="hitDice">
|
||||||
{{#if characterCalculate "attributeBase" ../_id name}}
|
{{#if characterCalculate "attributeBase" ../_id name}}
|
||||||
<div>
|
<div>
|
||||||
<paper-material class="card hit-dice" hero-id="main"
|
<paper-material class="card hit-dice layout horizontal">
|
||||||
{{detailHero name ../_id}}
|
<div class="left green paper-font-display1 white-text layout horizontal">
|
||||||
layout horizontal>
|
|
||||||
<div class="left green display1 white-text"
|
|
||||||
hero-id="toolbar" {{detailHero name ../_id}}
|
|
||||||
layout horizontal>
|
|
||||||
<div>
|
|
||||||
<paper-icon-button class="resourceUp"
|
|
||||||
icon="arrow-drop-up"
|
|
||||||
disabled={{cantIncrement}}>
|
|
||||||
</paper-icon-button>
|
|
||||||
<paper-icon-button class="resourceDown"
|
|
||||||
icon="arrow-drop-down"
|
|
||||||
disabled={{cantDecrement}}>
|
|
||||||
</paper-icon-button>
|
|
||||||
</div>
|
|
||||||
<div class="resourceValue" layout vertical center>
|
|
||||||
<div>
|
<div>
|
||||||
{{characterCalculate "attributeValue" ../_id name}}
|
<paper-icon-button class="resourceUp"
|
||||||
|
icon="arrow-drop-up"
|
||||||
|
disabled={{cantIncrement}}>
|
||||||
|
</paper-icon-button>
|
||||||
|
<paper-icon-button class="resourceDown"
|
||||||
|
icon="arrow-drop-down"
|
||||||
|
disabled={{cantDecrement}}>
|
||||||
|
</paper-icon-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="title white-text">
|
<div class="resourceValue layout vertical center">
|
||||||
d{{diceNum}} {{conMod}}
|
<div>
|
||||||
|
{{characterCalculate "attributeValue" ../_id name}}
|
||||||
|
</div>
|
||||||
|
<div class="paper-font-title white-text">
|
||||||
|
d{{diceNum}} {{conMod}}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="right clickable flex relative horizontal layout center">
|
||||||
<div class="right clickable" flex relative horizontal layout center>
|
Hit Dice
|
||||||
Hit Dice
|
</div>
|
||||||
</div>
|
</paper-material>
|
||||||
</paper-material>
|
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ Template.hitDice.helpers({
|
|||||||
});
|
});
|
||||||
|
|
||||||
Template.hitDice.events({
|
Template.hitDice.events({
|
||||||
"tap .resourceUp": function(event){
|
"click .resourceUp": function(event){
|
||||||
var value = Characters.calculate.attributeValue(this.char._id, this.name);
|
var value = Characters.calculate.attributeValue(this.char._id, this.name);
|
||||||
var base = Characters.calculate.attributeBase(this.char._id, this.name);
|
var base = Characters.calculate.attributeBase(this.char._id, this.name);
|
||||||
if (value < base){
|
if (value < base){
|
||||||
@@ -25,7 +25,7 @@ Template.hitDice.events({
|
|||||||
Characters.update(this.char._id, modifier, {validate: false});
|
Characters.update(this.char._id, modifier, {validate: false});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tap .resourceDown": function(event){
|
"click .resourceDown": function(event){
|
||||||
var value = Characters.calculate.attributeValue(this.char._id, this.name);
|
var value = Characters.calculate.attributeValue(this.char._id, this.name);
|
||||||
if (value > 0){
|
if (value > 0){
|
||||||
var modifier = {$inc: {}};
|
var modifier = {$inc: {}};
|
||||||
@@ -33,10 +33,10 @@ Template.hitDice.events({
|
|||||||
Characters.update(this.char._id, modifier, {validate: false});
|
Characters.update(this.char._id, modifier, {validate: false});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tap .right": function() {
|
"click .right": function(event, template) {
|
||||||
var charId = Template.parentData()._id;
|
var charId = Template.parentData()._id;
|
||||||
var title = "d" + this.diceNum + " Hit Dice";
|
var title = "d" + this.diceNum + " Hit Dice";
|
||||||
GlobalUI.setDetail({
|
pushDialogStack({
|
||||||
template: "attributeDialog",
|
template: "attributeDialog",
|
||||||
data: {
|
data: {
|
||||||
name: title,
|
name: title,
|
||||||
@@ -44,7 +44,7 @@ Template.hitDice.events({
|
|||||||
charId: charId,
|
charId: charId,
|
||||||
color: "green",
|
color: "green",
|
||||||
},
|
},
|
||||||
heroId: charId + this.name,
|
element: event.currentTarget.parentElement,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
<template name="skillRow">
|
<template name="skillRow">
|
||||||
<div class="item-slot">
|
<div class="item-slot">
|
||||||
<div class="skill-row item small"
|
<div class="skill-row item small layout horizontal center">
|
||||||
hero-id="main"
|
|
||||||
{{detailHero skill ../_id}}
|
|
||||||
layout horizontal center>
|
|
||||||
<iron-icon icon="{{profIcon}}"></iron-icon>
|
<iron-icon icon="{{profIcon}}"></iron-icon>
|
||||||
{{#if failSkill}}
|
{{#if failSkill}}
|
||||||
<div class="fail skill-mod">fail</div>
|
<div class="fail skill-mod">fail</div>
|
||||||
@@ -23,4 +20,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ Template.skillRow.helpers({
|
|||||||
if (prof > 0 && prof < 1) return "image:brightness-2";
|
if (prof > 0 && prof < 1) return "image:brightness-2";
|
||||||
if (prof === 1) return "image:brightness-1";
|
if (prof === 1) return "image:brightness-1";
|
||||||
if (prof > 1) return "av:album";
|
if (prof > 1) return "av:album";
|
||||||
return "radio-button-off";
|
return "radio-button-unchecked";
|
||||||
},
|
},
|
||||||
failSkill: function(){
|
failSkill: function(){
|
||||||
var charId = Template.parentData()._id;
|
var charId = Template.parentData()._id;
|
||||||
|
|||||||
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
|
||||||
|
)
|
||||||
|
);
|
||||||
|
},
|
||||||
|
});
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
<!--Saving Throws-->
|
<!--Saving Throws-->
|
||||||
<div>
|
<div>
|
||||||
<paper-material class="card">
|
<paper-material class="card">
|
||||||
<div class="top white subhead">
|
<div class="top white paper-font-subhead">
|
||||||
Saving Throws
|
Saving Throws
|
||||||
</div>
|
</div>
|
||||||
<div flex class="bottom list">
|
<div flex class="bottom list">
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
<!--Skills-->
|
<!--Skills-->
|
||||||
<div>
|
<div>
|
||||||
<paper-material class="card">
|
<paper-material class="card">
|
||||||
<div class="top white subhead">
|
<div class="top white paper-font-subhead">
|
||||||
Skills
|
Skills
|
||||||
</div>
|
</div>
|
||||||
<div flex class="bottom list">
|
<div flex class="bottom list">
|
||||||
@@ -73,21 +73,3 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template name="statCard">
|
|
||||||
<div>
|
|
||||||
<paper-material class="card statCard clickable" hero-id="main" {{detailHero stat ../_id}} layout horizontal>
|
|
||||||
<div class="left display1 white-text {{color}}"
|
|
||||||
hero-id="toolbar" {{detailHero stat ../_id}}>
|
|
||||||
{{#if isSkill}}
|
|
||||||
{{prefix}}{{skillMod}}
|
|
||||||
{{else}}
|
|
||||||
{{prefix}}{{characterCalculate "attributeValue" ../_id stat}}
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
<div class="right subhead" flex horizontal layout center>
|
|
||||||
{{name}}
|
|
||||||
</div>
|
|
||||||
</paper-material>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
Template.stats.events({
|
Template.stats.events({
|
||||||
"tap .statCard": function(event, instance){
|
"click .statCard": function(event, instance){
|
||||||
var charId = instance.data._id;
|
var charId = instance.data._id;
|
||||||
if (this.isSkill){
|
if (this.isSkill){
|
||||||
GlobalUI.setDetail({
|
pushDialogStack({
|
||||||
template: "skillDialog",
|
template: "skillDialog",
|
||||||
data: {
|
data: {
|
||||||
name: this.name,
|
name: this.name,
|
||||||
@@ -10,10 +10,10 @@ Template.stats.events({
|
|||||||
charId: charId,
|
charId: charId,
|
||||||
color: this.color,
|
color: this.color,
|
||||||
},
|
},
|
||||||
heroId: charId + this.stat,
|
element: event.currentTarget,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
GlobalUI.setDetail({
|
pushDialogStack({
|
||||||
template: "attributeDialog",
|
template: "attributeDialog",
|
||||||
data: {
|
data: {
|
||||||
name: this.name,
|
name: this.name,
|
||||||
@@ -21,15 +21,15 @@ Template.stats.events({
|
|||||||
charId: charId,
|
charId: charId,
|
||||||
color: this.color,
|
color: this.color,
|
||||||
},
|
},
|
||||||
heroId: charId + this.stat,
|
element: event.currentTarget,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tap .abilityMiniCard": function(event, instance){
|
"click .ability-mini-card": function(event, instance){
|
||||||
var charId = Template.parentData()._id;
|
var charId = Template.parentData()._id;
|
||||||
var template = "attributeDialog";
|
var template = "attributeDialog";
|
||||||
if (this.ability === "strength") template = "strengthDialog";
|
if (this.ability === "strength") template = "strengthDialog";
|
||||||
GlobalUI.setDetail({
|
pushDialogStack({
|
||||||
template: template,
|
template: template,
|
||||||
data: {
|
data: {
|
||||||
name: this.title,
|
name: this.title,
|
||||||
@@ -37,24 +37,24 @@ Template.stats.events({
|
|||||||
charId: charId,
|
charId: charId,
|
||||||
color: this.color,
|
color: this.color,
|
||||||
},
|
},
|
||||||
heroId: charId + this.ability,
|
element: event.currentTarget,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
"tap .skill-row": function(event, instance){
|
"tap .skill-row": function(event, instance){
|
||||||
var skill = this.skill;
|
var skill = this.skill;
|
||||||
var charId = instance.data._id;
|
var charId = instance.data._id;
|
||||||
GlobalUI.setDetail({
|
pushDialogStack({
|
||||||
template: "skillDialog",
|
template: "skillDialog",
|
||||||
data: {
|
data: {
|
||||||
name: this.name,
|
name: this.name,
|
||||||
skillName: skill,
|
skillName: skill,
|
||||||
charId: charId,
|
charId: charId,
|
||||||
},
|
},
|
||||||
heroId: charId + skill,
|
element: event.currentTarget,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
"tap .hitPointTitle": function(event, instance) {
|
"tap .hitPointTitle": function(event, instance) {
|
||||||
GlobalUI.setDetail({
|
pushDialogStack({
|
||||||
template: "attributeDialog",
|
template: "attributeDialog",
|
||||||
data: {
|
data: {
|
||||||
name: "Hit Points",
|
name: "Hit Points",
|
||||||
@@ -62,17 +62,7 @@ Template.stats.events({
|
|||||||
charId: this._id,
|
charId: this._id,
|
||||||
color: "green",
|
color: "green",
|
||||||
},
|
},
|
||||||
heroId: this._id + "hitPoints",
|
element: event.currentTarget.parentElement.parentElement,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
Template.statCard.helpers({
|
|
||||||
skillMod: function() {
|
|
||||||
return signedString(
|
|
||||||
Characters.calculate.skillMod(
|
|
||||||
Template.parentData()._id, this.stat
|
|
||||||
)
|
|
||||||
);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|||||||
@@ -11,12 +11,12 @@
|
|||||||
<link rel="import" href="/components/app-layout/app-scroll-effects/effects/resize-title.html">
|
<link rel="import" href="/components/app-layout/app-scroll-effects/effects/resize-title.html">
|
||||||
|
|
||||||
<link rel="import" href="/components/iron-icon/iron-icon.html">
|
<link rel="import" href="/components/iron-icon/iron-icon.html">
|
||||||
<!--<link rel="import" href="/components/iron-icons/av-icons.html">-->
|
<link rel="import" href="/components/iron-icons/av-icons.html">
|
||||||
<!--<link rel="import" href="/components/iron-icons/communication-icons.html">-->
|
<!--<link rel="import" href="/components/iron-icons/communication-icons.html">-->
|
||||||
<!--<link rel="import" href="/components/iron-icons/device-icons.html">-->
|
<!--<link rel="import" href="/components/iron-icons/device-icons.html">-->
|
||||||
<!--<link rel="import" href="/components/iron-icons/editor-icons.html">-->
|
<!--<link rel="import" href="/components/iron-icons/editor-icons.html">-->
|
||||||
<!--<link rel="import" href="/components/iron-icons/hardware-icons.html">-->
|
<!--<link rel="import" href="/components/iron-icons/hardware-icons.html">-->
|
||||||
<!--<link rel="import" href="/components/iron-icons/image-icons.html">-->
|
<link rel="import" href="/components/iron-icons/image-icons.html">
|
||||||
<link rel="import" href="/components/iron-icons/iron-icons.html">
|
<link rel="import" href="/components/iron-icons/iron-icons.html">
|
||||||
<!--<link rel="import" href="/components/iron-icons/maps-icons.html">-->
|
<!--<link rel="import" href="/components/iron-icons/maps-icons.html">-->
|
||||||
<!--<link rel="import" href="/components/iron-icons/notification-icons.html">-->
|
<!--<link rel="import" href="/components/iron-icons/notification-icons.html">-->
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<link rel="import" href="../components/polymer/polymer.html">
|
<link rel="import" href="../components/polymer/polymer.html">
|
||||||
<link rel="import" href="../components/iron-flex-layout/iron-flex-layout-classes.html">
|
<link rel="import" href="../components/iron-flex-layout/iron-flex-layout-classes.html">
|
||||||
<link rel="import" href="../components/paper-styles/classes/typography.html">
|
<link rel="import" href="../components/paper-styles/classes/typography.html">
|
||||||
|
<link rel="import" href="../components/paper-styles/classes/global.html">
|
||||||
|
|
||||||
<style is="custom-style" include="iron-flex iron-flex-alignment iron-positioning">
|
<style is="custom-style" include="iron-flex iron-flex-alignment iron-positioning">
|
||||||
--primary-color: #424242;
|
--primary-color: #424242;
|
||||||
@@ -12,4 +13,13 @@
|
|||||||
paper-item.short {
|
paper-item.short {
|
||||||
--paper-item-min-height: 32px;
|
--paper-item-min-height: 32px;
|
||||||
}
|
}
|
||||||
|
a {
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
text-transform: inherit;
|
||||||
|
font-size: inherit;
|
||||||
|
font-weight: inherit;
|
||||||
|
letter-spacing: inherit;
|
||||||
|
line-height: inherit;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user