npc-sheet work continued

This commit is contained in:
Nathanael Phillips 2020-11-30 06:17:59 -07:00
parent 2d8cc8cda2
commit 3d93ec8e90
3 changed files with 202 additions and 161 deletions

View file

@ -421,7 +421,7 @@
} }
.item-name { .item-name {
padding-left: 5px; padding-left: 5px;
.modesto(); //.modesto();
font-size: 16px; font-size: 16px;
} }
} }

View file

@ -461,9 +461,7 @@
} }
.sw5e.sheet .items-list .items-header .item-name { .sw5e.sheet .items-list .items-header .item-name {
padding-left: 5px; padding-left: 5px;
font-family: 'Russo One'; font-size: 16px;
font-size: 14px;
font-weight: 400;
} }
.sw5e.sheet .items-list .item-name { .sw5e.sheet .items-list .item-name {
flex: 2; flex: 2;
@ -1060,9 +1058,7 @@
overflow-y: auto; overflow-y: auto;
} }
.sw5e.sheet.item { .sw5e.sheet.item {
min-height: 400px; min-height: 420px;
max-height: 95%;
min-width: 480px;
/* ----------------------------------------- */ /* ----------------------------------------- */
/* Sheet Header */ /* Sheet Header */
/* ----------------------------------------- */ /* ----------------------------------------- */
@ -1083,7 +1079,7 @@
border: 2px solid #000; border: 2px solid #000;
} }
.sw5e.sheet.item .sheet-header .item-subtitle { .sw5e.sheet.item .sheet-header .item-subtitle {
flex: 0 0 100px; flex: 0 0 80px;
height: 60px; height: 60px;
margin: 0; margin: 0;
padding: 5px; padding: 5px;
@ -1538,3 +1534,30 @@
max-width: 40px; max-width: 40px;
text-align: right; text-align: right;
} }
input[type="number"] {
width: calc(100% - 2px);
min-width: 20px;
height: 26px;
background: rgba(0, 0, 0, 0.05);
padding: 1px 3px;
margin: 0;
color: #191813;
font-family: inherit;
font-size: inherit;
text-align: inherit;
line-height: inherit;
border: 1px solid #7a7971;
border-radius: 3px;
-webkit-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
-moz-appearance: textfield;
}
input[type="number"]:focus {
box-shadow: 0 0 5px red;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
-webkit-appearance: none;
}

View file

@ -36,13 +36,16 @@
<span>{{lookup config.actorSizes data.traits.size}}</span> <span>{{lookup config.actorSizes data.traits.size}}</span>
</li> </li>
<li> <li>
<input type="text" name="data.details.alignment" value="{{data.details.alignment}}" placeholder="{{ localize 'SW5E.Alignment' }}"/> <input type="text" name="data.details.alignment" value="{{data.details.alignment}}"
placeholder="{{ localize 'SW5E.Alignment' }}" />
</li> </li>
<li> <li>
<input type="text" name="data.details.type" value="{{data.details.type}}" placeholder="{{ localize 'SW5E.Type' }}"/> <input type="text" name="data.details.type" value="{{data.details.type}}"
placeholder="{{ localize 'SW5E.Type' }}" />
</li> </li>
<li> <li>
<input type="text" name="data.details.source" value="{{data.details.source}}" placeholder="{{ localize 'SW5E.Source' }}"/> <input type="text" name="data.details.source" value="{{data.details.source}}"
placeholder="{{ localize 'SW5E.Source' }}" />
</li> </li>
</ul> </ul>
@ -51,20 +54,23 @@
<li class="attribute health"> <li class="attribute health">
<h4 class="attribute-name box-title rollable">{{ localize "SW5E.Health" }}</h4> <h4 class="attribute-name box-title rollable">{{ localize "SW5E.Health" }}</h4>
<div class="attribute-value multiple"> <div class="attribute-value multiple">
<input name="data.attributes.hp.value" type="text" value="{{data.attributes.hp.value}}" placeholder="10" data-dtype="Number"/> <input name="data.attributes.hp.value" type="text" value="{{data.attributes.hp.value}}"
placeholder="10" data-dtype="Number" />
<span class="sep"> / </span> <span class="sep"> / </span>
<input name="data.attributes.hp.max" type="text" value="{{data.attributes.hp.max}}" placeholder="10" data-dtype="Number"/> <input name="data.attributes.hp.max" type="text" value="{{data.attributes.hp.max}}"
placeholder="10" data-dtype="Number" />
</div> </div>
<footer class="attribute-footer"> <footer class="attribute-footer">
<input name="data.attributes.hp.formula" class="hpformula" type="text" placeholder="{{ localize 'SW5E.HealthFormula' }}" <input name="data.attributes.hp.formula" class="hpformula" type="text"
value="{{data.attributes.hp.formula}}"/> placeholder="{{ localize 'SW5E.HealthFormula' }}" value="{{data.attributes.hp.formula}}" />
</footer> </footer>
</li> </li>
<li class="attribute"> <li class="attribute">
<h4 class="attribute-name box-title">{{ localize "SW5E.ArmorClass" }}</h4> <h4 class="attribute-name box-title">{{ localize "SW5E.ArmorClass" }}</h4>
<div class="attribute-value"> <div class="attribute-value">
<input name="data.attributes.ac.value" type="number" value="{{data.attributes.ac.value}}" placeholder="10"/> <input name="data.attributes.ac.value" type="number" value="{{data.attributes.ac.value}}"
placeholder="10" />
</div> </div>
<footer class="attribute-footer"> <footer class="attribute-footer">
<span>{{ localize "SW5E.Proficiency" }}</span> <span>{{ localize "SW5E.Proficiency" }}</span>
@ -75,12 +81,13 @@
<li class="attribute"> <li class="attribute">
<h4 class="attribute-name box-title">{{ localize "SW5E.Speed" }}</h4> <h4 class="attribute-name box-title">{{ localize "SW5E.Speed" }}</h4>
<div class="attribute-value"> <div class="attribute-value">
<input name="data.attributes.speed.value" type="text" <input name="data.attributes.speed.value" type="text" value="{{data.attributes.speed.value}}"
value="{{data.attributes.speed.value}}" placeholder="0"/> placeholder="0" />
</div> </div>
<footer class="attribute-footer"> <footer class="attribute-footer">
<input type="text" class="speed" name="data.attributes.speed.special" <input type="text" class="speed" name="data.attributes.speed.special"
value="{{data.attributes.speed.special}}" placeholder="{{ localize 'SW5E.SpeedSpecial' }}"/> value="{{data.attributes.speed.special}}"
placeholder="{{ localize 'SW5E.SpeedSpecial' }}" />
</footer> </footer>
</li> </li>
</ul> </ul>
@ -104,12 +111,17 @@
{{#each data.abilities as |ability id|}} {{#each data.abilities as |ability id|}}
<li class="ability {{#if ability.proficient}}proficient{{/if}}" data-ability="{{id}}"> <li class="ability {{#if ability.proficient}}proficient{{/if}}" data-ability="{{id}}">
<h4 class="ability-name box-title rollable">{{ability.label}}</h4> <h4 class="ability-name box-title rollable">{{ability.label}}</h4>
<input class="ability-score" name="data.abilities.{{id}}.value" type="number" value="{{ability.value}}" placeholder="10"/> <input class="ability-score" name="data.abilities.{{id}}.value" type="number"
value="{{ability.value}}" placeholder="10" />
<div class="ability-modifiers flexrow"> <div class="ability-modifiers flexrow">
<span class="ability-mod" title="Modifier">{{numberFormat ability.mod decimals=0 sign=true}}</span> <span class="ability-mod"
<input type="hidden" name="data.abilities.{{id}}.proficient" value="{{ability.proficient}}" data-dtype="Number"/> title="Modifier">{{numberFormat ability.mod decimals=0 sign=true}}</span>
<a class="proficiency-toggle ability-proficiency" title="{{ localize 'SW5E.Proficiency' }}">{{{ability.icon}}}</a> <input type="hidden" name="data.abilities.{{id}}.proficient" value="{{ability.proficient}}"
<span class="ability-save" title="Saving Throw">{{numberFormat ability.save decimals=0 sign=true}}</span> data-dtype="Number" />
<a class="proficiency-toggle ability-proficiency"
title="{{ localize 'SW5E.Proficiency' }}">{{{ability.icon}}}</a>
<span class="ability-save"
title="Saving Throw">{{numberFormat ability.save decimals=0 sign=true}}</span>
</div> </div>
</li> </li>
{{/each}} {{/each}}
@ -136,25 +148,31 @@
<div class="counter flexrow legendary"> <div class="counter flexrow legendary">
<h4>{{ localize "SW5E.LegAct" }}</h4> <h4>{{ localize "SW5E.LegAct" }}</h4>
<div class="counter-value"> <div class="counter-value">
<input name="data.resources.legact.value" type="number" value="{{data.resources.legact.value}}" placeholder="0"/> <input name="data.resources.legact.value" type="number"
value="{{data.resources.legact.value}}" placeholder="0" />
<span class="sep">/</span> <span class="sep">/</span>
<input name="data.resources.legact.max" type="number" value="{{data.resources.legact.max}}" placeholder="0"/> <input name="data.resources.legact.max" type="number" value="{{data.resources.legact.max}}"
placeholder="0" />
</div> </div>
</div> </div>
<div class="counter flexrow legendary"> <div class="counter flexrow legendary">
<h4>{{ localize "SW5E.LegRes" }}</h4> <h4>{{ localize "SW5E.LegRes" }}</h4>
<div class="counter-value"> <div class="counter-value">
<input name="data.resources.legres.value" type="number" value="{{data.resources.legres.value}}" placeholder="0"/> <input name="data.resources.legres.value" type="number"
value="{{data.resources.legres.value}}" placeholder="0" />
<span class="sep">/</span> <span class="sep">/</span>
<input name="data.resources.legres.max" type="number" value="{{data.resources.legres.max}}" placeholder="0"/> <input name="data.resources.legres.max" type="number" value="{{data.resources.legres.max}}"
placeholder="0" />
</div> </div>
</div> </div>
<div class="counter flexrow lair"> <div class="counter flexrow lair">
<h4>{{ localize "SW5E.LairAct" }}</h4> <h4>{{ localize "SW5E.LairAct" }}</h4>
<div class="counter-value"> <div class="counter-value">
<input name="data.resources.lair.value" type="checkbox" value="{{data.resources.lair.value}}" <input name="data.resources.lair.value" type="checkbox"
data-dtype="Boolean" {{checked data.resources.lair.value}}/> value="{{data.resources.lair.value}}" data-dtype="Boolean"
<input name="data.resources.lair.initiative" type="number" value="{{data.resources.lair.initiative}}" placeholder="20"/> {{checked data.resources.lair.value}} />
<input name="data.resources.lair.initiative" type="number"
value="{{data.resources.lair.initiative}}" placeholder="20" />
</div> </div>
</div> </div>
</div> </div>