Update the Actor sheets to not be prefixed with Hero in their files/classes
This commit is contained in:
parent
5b74fd6beb
commit
cfc744e42f
14 changed files with 84 additions and 81 deletions
360
templates/Apps/StatsCardV1/content.hbs
Normal file
360
templates/Apps/StatsCardV1/content.hbs
Normal file
|
|
@ -0,0 +1,360 @@
|
|||
<div class="StatsCardV1">
|
||||
{{!-- * Header --}}
|
||||
<div class="header">
|
||||
<div class="image">Logo Image</div>
|
||||
<label class="row-alt left-pill" for="{{meta.idp}}-name">
|
||||
Hero
|
||||
</label>
|
||||
<div>
|
||||
Player
|
||||
</div>
|
||||
</div>
|
||||
<input
|
||||
id="{{meta.idp}}-name"
|
||||
type="text"
|
||||
class="hero_name row-alt"
|
||||
value="{{actor.name}}"
|
||||
name="name"
|
||||
>
|
||||
|
||||
{{!-- * Armour --}}
|
||||
<div class="armour">
|
||||
<div class="section-header label row-alt right-pill">
|
||||
{{ rc-i18n "RipCrypt.common.armour" }}
|
||||
</div>
|
||||
<div class="person">
|
||||
<rc-svg
|
||||
var:fill="var(--section-header-background)"
|
||||
var:stroke="var(--base-background)"
|
||||
var:stroke-width="2"
|
||||
var:stroke-linejoin="rounded"
|
||||
class="silhouette"
|
||||
name="hero-silhouette"
|
||||
></rc-svg>
|
||||
{{#each armours as | slot |}}
|
||||
<div class="{{@key}}">
|
||||
<div class="compass small">
|
||||
<span class="value">
|
||||
{{ slot.defense }}
|
||||
</span>
|
||||
{{#if slot.shielded}}
|
||||
<rc-icon
|
||||
class="shield"
|
||||
name="icons/shield-solid"
|
||||
data-tooltip="{{ rc-i18n "RipCrypt.tooltips.shield-bonus" value=@root.shield.bonus }}"
|
||||
data-tooltip-direction="UP"
|
||||
var:size="20px"
|
||||
var:fill="var(--accent-3)"
|
||||
var:stroke="black"
|
||||
var:stroke-width="8px"
|
||||
></rc-icon>
|
||||
{{/if}}
|
||||
</div>
|
||||
<span class="label">{{ rc-i18n (concat "RipCrypt.common.anatomy." @key) }}</span>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
<ul class="armour-items">
|
||||
<li
|
||||
class="row-alt right-pill"
|
||||
data-ctx-menu="armour"
|
||||
data-item-id="{{armours.head.uuid}}"
|
||||
>
|
||||
<span class="label small">{{ rc-i18n "RipCrypt.common.anatomy.head" }}</span>
|
||||
<span class="value ellipses">{{ armours.head.name }}</span>
|
||||
</li>
|
||||
<li
|
||||
data-ctx-menu="armour"
|
||||
data-item-id="{{armours.body.uuid}}"
|
||||
>
|
||||
<span class="label small">{{ rc-i18n "RipCrypt.common.anatomy.body" }}</span>
|
||||
<span class="value ellipses">{{ armours.body.name }}</span>
|
||||
</li>
|
||||
<li
|
||||
class="row-alt full-pill"
|
||||
data-ctx-menu="armour"
|
||||
data-item-id="{{armours.arms.uuid}}"
|
||||
>
|
||||
<span class="label small">{{ rc-i18n "RipCrypt.common.anatomy.arms" }}</span>
|
||||
<span class="value ellipses">{{ armours.arms.name }}</span>
|
||||
</li>
|
||||
<li
|
||||
data-ctx-menu="armour"
|
||||
data-item-id="{{armours.legs.uuid}}"
|
||||
>
|
||||
<span class="label small">{{ rc-i18n "RipCrypt.common.anatomy.legs" }}</span>
|
||||
<span class="value ellipses">{{ armours.legs.name }}</span>
|
||||
</li>
|
||||
<li
|
||||
class="row-alt full-pill"
|
||||
data-ctx-menu="armour"
|
||||
data-item-id="{{shield.uuid}}"
|
||||
>
|
||||
<span class="label small">{{ rc-i18n "RipCrypt.common.shield" }}</span>
|
||||
<span class="value ellipses">{{ shield.name }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{{!-- * Fate & Advancement --}}
|
||||
<div class="fate">
|
||||
<label for="{{meta.idp}}-fate-path" class="col-header left-pill fate-label">
|
||||
{{ rc-i18n "RipCrypt.common.fate" }}
|
||||
</label>
|
||||
<select
|
||||
class="row-alt left-pill fate-value"
|
||||
id="{{meta.idp}}-fate-path"
|
||||
name="system.fate"
|
||||
>
|
||||
{{rc-options fate.selected fate.options localize=true}}
|
||||
</select>
|
||||
</div>
|
||||
{{#if meta.editable}}
|
||||
<label
|
||||
for="{{meta.idp}}-glory"
|
||||
class="glory-label col-header"
|
||||
>
|
||||
{{ rc-i18n "RipCrypt.common.glory" }}
|
||||
</label>
|
||||
<input
|
||||
id="{{meta.idp}}-glory"
|
||||
type="number"
|
||||
class="glory row-alt"
|
||||
name="system.level.glory"
|
||||
value="{{level.glory}}"
|
||||
min="0"
|
||||
>
|
||||
{{else}}
|
||||
<div
|
||||
id="{{meta.idp}}-glory-label"
|
||||
class="glory-label label col-header"
|
||||
>
|
||||
{{ rc-i18n "RipCrypt.common.glory" }}
|
||||
</div>
|
||||
<div
|
||||
class="glory row-alt input"
|
||||
aria-describedby="{{meta.idp}}-glory-label"
|
||||
>
|
||||
{{ level.glory }}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if meta.editable}}
|
||||
<label
|
||||
for="{{meta.idp}}-step"
|
||||
class="step-label col-header"
|
||||
>
|
||||
{{ rc-i18n "RipCrypt.common.step" }}
|
||||
</label>
|
||||
<input
|
||||
id="{{meta.idp}}-step"
|
||||
type="number"
|
||||
class="step row-alt"
|
||||
name="system.level.step"
|
||||
value="{{level.step}}"
|
||||
min="1"
|
||||
max="3"
|
||||
>
|
||||
{{else}}
|
||||
<div
|
||||
id="{{meta.idp}}-step-label"
|
||||
class="step-label label col-header"
|
||||
>
|
||||
{{ rc-i18n "RipCrypt.common.step" }}
|
||||
</div>
|
||||
<div
|
||||
class="step row-alt input"
|
||||
aria-describedby="{{meta.idp}}-step-label"
|
||||
>
|
||||
{{ level.step }}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<{{{ifThen meta.editable "label" "div"}}}
|
||||
id="{{meta.idp}}-rank-label"
|
||||
for="{{meta.idp}}-rank"
|
||||
class="rank-label label col-header right-pill"
|
||||
>
|
||||
{{ rc-i18n "RipCrypt.common.rank" }}
|
||||
</{{{ifThen meta.editable "label" "div"}}}>
|
||||
{{#if meta.editable}}
|
||||
<select
|
||||
id="{{meta.idp}}-rank"
|
||||
name="system.level.rank"
|
||||
class="rank row-alt right-pill"
|
||||
>
|
||||
{{ rc-options level.rank.selected level.rank.options localize=true }}
|
||||
</select>
|
||||
{{else}}
|
||||
<div
|
||||
aria-describedby="{{meta.idp}}-rank-label"
|
||||
class="rank row-alt input"
|
||||
>
|
||||
{{ level.rank.selected }}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{!-- * Weapons --}}
|
||||
<table class="weapons">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="label col-header left-pill">{{ rc-i18n "RipCrypt.common.weapon.singular" }}</th>
|
||||
<th class="label col-header">{{ rc-i18n "RipCrypt.Apps.traits-range" }}</th>
|
||||
<th class="label col-header">{{ rc-i18n "RipCrypt.common.wear" }}</th>
|
||||
<th class="label col-header right-pill">{{ rc-i18n "RipCrypt.common.damage" }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each weapons as | slot |}}
|
||||
{{#if slot.empty}}
|
||||
<tr
|
||||
data-row="{{slot.index}}"
|
||||
class="{{slot.class}}"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<td class="left-pill">{{ rc-i18n "RipCrypt.common.empty" }}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td {{#unless @last}}class="right-pill"{{/unless}}></td>
|
||||
</tr>
|
||||
{{else}}
|
||||
<tr
|
||||
data-row="{{ slot.index }}"
|
||||
class="{{slot.class}}"
|
||||
data-ctx-menu="weapon"
|
||||
data-item-id="{{ slot.data.uuid }}"
|
||||
>
|
||||
<td class="left-pill">
|
||||
{{!-- ? NOTE: Disabled for now to see what user feedback spawns
|
||||
<rc-icon
|
||||
var:size="1rem"
|
||||
var:fill="var(--accent-3)"
|
||||
name="icons/edit"
|
||||
data-action="editItem"
|
||||
></rc-icon> --}}
|
||||
<span class="ellipses">
|
||||
{{ slot.data.quantifiedName }}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
{{#if slot.data.system.traitString}}
|
||||
<span class="traits">{{ slot.data.system.traitString }}</span>
|
||||
{{/if}}
|
||||
{{#if slot.data.system.rangeString}}
|
||||
<span class="range">{{ slot.data.system.rangeString }}</span>
|
||||
{{/if}}
|
||||
</td>
|
||||
<td>
|
||||
{{ slot.data.system.wear.value }} / {{ slot.data.system.wear.max }}
|
||||
</td>
|
||||
<td {{#unless @last}}class="right-pill"{{/unless}}>
|
||||
{{ slot.data.system.damage }}
|
||||
</td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{{!-- * Abilities --}}
|
||||
<div class="abilities">
|
||||
{{!-- Actual Abilities --}}
|
||||
{{#each abilities as | ability |}}
|
||||
<div class="ability">
|
||||
<div class="compass">
|
||||
{{#unless ability.readonly}}
|
||||
<input
|
||||
type="number"
|
||||
id="{{@root.meta.idp}}-{{ability.id}}-input"
|
||||
class="value"
|
||||
value="{{ability.value}}"
|
||||
name="system.ability.{{ability.id}}"
|
||||
min=0
|
||||
>
|
||||
{{else}}
|
||||
<span>{{ability.value}}</span>
|
||||
{{/unless}}
|
||||
{{#if @root.meta.editable}}
|
||||
<button
|
||||
type="button"
|
||||
class="roll icon"
|
||||
data-action="roll"
|
||||
data-dice-count="{{ability.value}}"
|
||||
data-flavor="{{ability.name}} Roll"
|
||||
>
|
||||
<rc-icon
|
||||
var:size="20px"
|
||||
var:fill="currentColor"
|
||||
name="icons/roll"
|
||||
></rc-icon>
|
||||
</button>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#unless ability.readonly}}
|
||||
<label
|
||||
class="col-header {{#if @first}}left-pill{{/if}}"
|
||||
for="{{@root.meta.idp}}-{{ability.id}}-input"
|
||||
>
|
||||
{{ ability.name }}
|
||||
</label>
|
||||
{{else}}
|
||||
<div class="col-header label {{#if @first}}left-pill{{/if}}">
|
||||
{{ ability.name }}
|
||||
</div>
|
||||
{{/unless}}
|
||||
</div>
|
||||
{{/each}}
|
||||
|
||||
{{!-- Health --}}
|
||||
<div class="ability">
|
||||
<div class="compass dual">
|
||||
{{#if meta.editable}}
|
||||
<input
|
||||
type="number"
|
||||
id="{{meta.idp}}-guts-value"
|
||||
class="value"
|
||||
name="system.guts.value"
|
||||
value="{{guts.value}}"
|
||||
min="0"
|
||||
>
|
||||
{{else}}
|
||||
<span
|
||||
class="value"
|
||||
aria-describedby="{{meta.idp}}-guts-value-label"
|
||||
{{!-- TODO: aria-label="{{ rc-i18n "RipCrypt.Apps.a11y.guts-value-readonly" }}" --}}
|
||||
>
|
||||
{{ guts.value }}
|
||||
</span>
|
||||
{{/if}}
|
||||
<span
|
||||
class="max"
|
||||
aria-hidden="true"
|
||||
{{!-- TODO: aria-label="{{ rc-i18n "RipCrypt.Apps.a11y.guts-max-readonly" }}" --}}
|
||||
>
|
||||
{{ guts.max }}
|
||||
</span>
|
||||
</div>
|
||||
{{#if meta.editable}}
|
||||
<label class="col-header" for="{{meta.idp}}-guts-value">
|
||||
{{ rc-i18n "RipCrypt.common.guts" }}
|
||||
</label>
|
||||
{{else}}
|
||||
<div class="col-header label" id="{{meta.idp}}-guts-value-label">
|
||||
{{ rc-i18n "RipCrypt.common.guts" }}
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
{{!-- Move & Run --}}
|
||||
<div class="ability">
|
||||
<div class="compass dual">
|
||||
<span class="value">{{speed.move}}</span>
|
||||
<span class="max">{{speed.run}}</span>
|
||||
</div>
|
||||
<div aria-hidden="true" class="col-header label right-pill">
|
||||
{{ rc-i18n "RipCrypt.common.move" }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{!-- * Equipment --}}
|
||||
</div>
|
||||
274
templates/Apps/StatsCardV1/style.css
Normal file
274
templates/Apps/StatsCardV1/style.css
Normal file
|
|
@ -0,0 +1,274 @@
|
|||
.ripcrypt .StatsCardV1 {
|
||||
|
||||
/* Foundry Variable Tweaks */
|
||||
--input-height: 1rem;
|
||||
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 3fr) minmax(0, 2fr) minmax(0, 2fr) minmax(0, 1.25fr) minmax(0, 2.5fr);
|
||||
grid-template-rows: repeat(15, minmax(0, 1fr));
|
||||
column-gap: var(--col-gap);
|
||||
|
||||
background: var(--base-background);
|
||||
color: var(--base-text);
|
||||
|
||||
.col-header {
|
||||
background: var(--section-header-background);
|
||||
color: var(--section-header-text);
|
||||
}
|
||||
.row-alt {
|
||||
background: var(--alt-row-background);
|
||||
color: var(--alt-row-text);
|
||||
}
|
||||
|
||||
label, .label {
|
||||
box-sizing: border-box;
|
||||
padding: 2px 4px;
|
||||
text-transform: uppercase;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.header {
|
||||
grid-row: span 2;
|
||||
grid-column: span 1;
|
||||
display: grid;
|
||||
grid-template-rows: subgrid;
|
||||
grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
|
||||
|
||||
.image {
|
||||
grid-row: span 2;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.hero_name {
|
||||
grid-column: span 3;
|
||||
margin-left: calc(var(--col-gap) * -1);
|
||||
padding-left: var(--col-gap);
|
||||
}
|
||||
|
||||
.glory-label {
|
||||
grid-column: 2 / span 1;
|
||||
grid-row: 4 / span 1;
|
||||
}
|
||||
.glory {
|
||||
grid-column: 2 / span 1;
|
||||
grid-row: 5 / span 1;
|
||||
}
|
||||
|
||||
.step-label {
|
||||
grid-column: 3 / span 1;
|
||||
grid-row: 4 / span 1;
|
||||
}
|
||||
.step {
|
||||
grid-column: 3 / span 1;
|
||||
grid-row: 5 / span 1;
|
||||
}
|
||||
|
||||
.rank-label {
|
||||
grid-column: 4 / span 1;
|
||||
grid-row: 4 / span 1;
|
||||
}
|
||||
.rank {
|
||||
grid-column: 4 / span 1;
|
||||
grid-row: 5 / span 1;
|
||||
}
|
||||
|
||||
.fate {
|
||||
grid-column: 1 / span 1;
|
||||
grid-row: 4 / span 2;
|
||||
display: grid;
|
||||
grid-template-rows: subgrid;
|
||||
}
|
||||
.fate-value {
|
||||
padding-left: 2px;
|
||||
}
|
||||
|
||||
.weapons {
|
||||
grid-column: 1 / span 4;
|
||||
grid-row: 7 / span 5;
|
||||
display: grid;
|
||||
grid-template-columns: subgrid;
|
||||
grid-template-rows: subgrid;
|
||||
|
||||
thead,
|
||||
tbody,
|
||||
tr {
|
||||
display: contents;
|
||||
}
|
||||
td {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
.row-alt > * {
|
||||
background: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
.abilities {
|
||||
grid-column: 1 / span 4;
|
||||
grid-row: 12 / span 4;
|
||||
display: grid;
|
||||
/* grid-template-rows: minmax(0, 3fr) minmax(0, 1fr); */
|
||||
grid-template-columns: repeat(6, minmax(0, 1fr));
|
||||
|
||||
}
|
||||
|
||||
.ability {
|
||||
display: grid;
|
||||
grid-template-rows: minmax(0, 3fr) minmax(0, 1fr);
|
||||
justify-items: center;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
|
||||
label, .label {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.compass {
|
||||
--size: 45px;
|
||||
width: var(--size);
|
||||
height: var(--size);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border: 2px solid var(--accent-1);
|
||||
border-radius: 50%;
|
||||
font-size: 1.5rem;
|
||||
position: relative;
|
||||
background: var(--base-background);
|
||||
|
||||
> .value {
|
||||
background: none;
|
||||
width: 70%;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
> .roll {
|
||||
--distance: -15%;
|
||||
position: absolute;
|
||||
top: var(--distance);
|
||||
right: var(--distance);
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
&.small {
|
||||
--size: 35px;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
&.dual {
|
||||
font-size: var(--font-size-14);
|
||||
--distance-from-edge: 4px;
|
||||
|
||||
&::after {
|
||||
display: block;
|
||||
content: "";
|
||||
width: 69%;
|
||||
height: 2px;
|
||||
background: var(--accent-1);
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
|
||||
> .value,
|
||||
> .max {
|
||||
width: 50%;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
/* border-bottom: none; */
|
||||
}
|
||||
|
||||
> .value {
|
||||
top: var(--distance-from-edge);
|
||||
left: var(--distance-from-edge);
|
||||
clip-path: polygon(100% 0, 100% 60%, 60% 100%, 0 100%, 0 0);
|
||||
}
|
||||
> .max {
|
||||
bottom: var(--distance-from-edge);
|
||||
right: var(--distance-from-edge);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.armour {
|
||||
grid-column: -2 / span 1;
|
||||
grid-row: 1 / -1;
|
||||
display: grid;
|
||||
grid-template-rows: subgrid;
|
||||
|
||||
.section-header {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.person {
|
||||
grid-row: 2 / span 9;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
grid-template-rows: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr);
|
||||
justify-items: center;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
|
||||
> div {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
> rc-svg {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 58%;
|
||||
}
|
||||
}
|
||||
|
||||
/* Positioning */
|
||||
.head, .body, .legs { grid-column: 1; }
|
||||
.arms { grid-column: 2; }
|
||||
.head { grid-row: 1; }
|
||||
.body, .arms { grid-row: 2; }
|
||||
.legs { grid-row: 3; }
|
||||
|
||||
.shield {
|
||||
--distance: -7px;
|
||||
position: absolute;
|
||||
top: var(--distance);
|
||||
right: var(--distance);
|
||||
}
|
||||
|
||||
.armour-items {
|
||||
display: contents;
|
||||
|
||||
> li {
|
||||
display: flex;
|
||||
flex-direction: row-reverse;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
padding: 0 4px;
|
||||
gap: 4px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.label {
|
||||
text-overflow: initial;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue