Cleaned up old code, removed outdated files
This commit is contained in:
54
rpg-docs/client/views/character/Stats/skillRow/skillRow.css
Normal file
54
rpg-docs/client/views/character/Stats/skillRow/skillRow.css
Normal file
@@ -0,0 +1,54 @@
|
||||
.skillRow {
|
||||
height: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.skillRow:hover{
|
||||
background: #FFEBEE;
|
||||
}
|
||||
|
||||
.profIcon{
|
||||
display: inline-block;
|
||||
width: 40px;
|
||||
height: 26px;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
|
||||
/*TODO fix the actual images and remove inversion*/
|
||||
-webkit-filter: invert(100%);
|
||||
opacity: 0.54;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.skillMod {
|
||||
width: 20px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.skillName, .skillMod{
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.fail.skillMod {
|
||||
color: #D50000;
|
||||
}
|
||||
|
||||
.advantage{
|
||||
background-image: url(/png/advantage/greenUp.png);
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.disadvantage{
|
||||
background-image: url(/png/advantage/redDown.png);
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
td.conditionals::after{
|
||||
content: "*";
|
||||
}
|
||||
17
rpg-docs/client/views/character/Stats/skillRow/skillRow.html
Normal file
17
rpg-docs/client/views/character/Stats/skillRow/skillRow.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<template name="skillRow">
|
||||
<div class="subhead skillRow">
|
||||
{{> ripple}}
|
||||
<div class="profIcon" style="background-image: url(/png/profIcons/{{profIcon skill}})"></div>
|
||||
{{#if failSkill}}
|
||||
<div class="fail skillMod">fail</div>
|
||||
{{else}}
|
||||
<div class="{{advantage}} skillMod">{{../skillMod skill}}</div>
|
||||
{{/if}}
|
||||
<div class="{{conditionals}} skillName">
|
||||
{{name}}
|
||||
{{#if showPassive}}
|
||||
({{../passiveSkill skill}})
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
40
rpg-docs/client/views/character/Stats/skillRow/skillRow.js
Normal file
40
rpg-docs/client/views/character/Stats/skillRow/skillRow.js
Normal file
@@ -0,0 +1,40 @@
|
||||
Template.skillRow.helpers({
|
||||
profIcon: function(skill){
|
||||
var prof = Template.parentData(1).proficiency(this.skill);
|
||||
if(prof > 0 && prof < 1) return "profHalf.png";
|
||||
if(prof === 1) return "profSingle.png";
|
||||
if(prof > 1) return "profDouble.png";
|
||||
return "profNone.png";
|
||||
},
|
||||
failSkill: function(){
|
||||
var skill = Template.parentData(1).getField(this.skill);
|
||||
_.each(skill.effets, function(effect){
|
||||
if (effect.operation === "fail"){
|
||||
return true;
|
||||
}
|
||||
})
|
||||
return false;
|
||||
},
|
||||
advantage: function(){
|
||||
var adv = 0;
|
||||
var disadv = 0;
|
||||
var skill = Template.parentData(1).getField(this.skill);
|
||||
_.each(skill.effets, function(effect){
|
||||
if (effect.operation === "advantage"){
|
||||
adv ++;
|
||||
} else if (effect.operation === "disadvantage") {
|
||||
disadv ++;
|
||||
}
|
||||
})
|
||||
if(adv > 0 && disadv === 0) return "advantage";
|
||||
if(disadv > 0 && adv === 0) return "disadvantage";
|
||||
},
|
||||
conditionals: function(){
|
||||
var skill = Template.parentData(1).getField(this.skill);
|
||||
_.each(skill.effets, function(effect){
|
||||
if (effect.operation === "conditional"){
|
||||
return "conditionals";
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user