RC-60 | Ammo | Layout

This commit is contained in:
Oliver-Akins 2025-01-26 15:59:58 -07:00
parent 1bdaa958ad
commit 517913f20c
5 changed files with 37 additions and 31 deletions

View file

@ -18,6 +18,7 @@
"HeroSkillsCardV1": "Hero Skill Card"
},
"common": {
"ammo": "Ammo",
"quantity": "Quantity",
"equipped": "Equipped",
"edit": "Edit",

View file

@ -79,6 +79,7 @@ export class CombinedHeroSheet extends GenericAppMixin(HandlebarsApplicationMixi
ctx = await HeroSummaryCardV1.prepareLevelData(ctx);
ctx = await HeroSkillsCardV1.prepareGear(ctx);
ctx = await HeroSkillsCardV1.prepareAmmo(ctx);
Logger.debug(`Context:`, ctx);
return ctx;

View file

@ -80,6 +80,7 @@ export class HeroSkillsCardV1 extends GenericAppMixin(HandlebarsApplicationMixin
ctx.actor = this.document;
ctx = await HeroSkillsCardV1.prepareGear(ctx);
ctx = await HeroSkillsCardV1.prepareAmmo(ctx);
Logger.debug(`Context:`, ctx);
return ctx;
@ -116,6 +117,11 @@ export class HeroSkillsCardV1 extends GenericAppMixin(HandlebarsApplicationMixin
return ctx;
};
static async prepareAmmo(ctx) {
ctx.ammo = 0;
return ctx;
};
// #endregion
// #region Actions

View file

@ -60,14 +60,21 @@
{{/each}}
</ol>
<div class="ammo half-pill">
<div class="label">
{{ rc-i18n "RipCrypt.common.ammo"}}
</div>
<div class="input">
{{ ammo }}
</div>
</div>
{{!-- * Currencies --}}
<div class="currencies">
<div class="currency half-pill">
<{{{ifThen meta.editable "label" "div" }}}
for="{{meta.idp}}-gold"
class="label"
>
<label for="{{meta.idp}}-gold" >
{{ rc-i18n "RipCrypt.common.currency.gold"}}
</{{{ifThen meta.editable "label" "div" }}}>
</label>
<input
type="number"
id="{{meta.idp}}-gold"
@ -76,12 +83,9 @@
>
</div>
<div class="currency half-pill">
<{{{ifThen meta.editable "label" "div" }}}
for="{{meta.idp}}-silver"
class="label"
>
<label for="{{meta.idp}}-silver" >
{{ rc-i18n "RipCrypt.common.currency.silver"}}
</{{{ifThen meta.editable "label" "div" }}}>
</label>
<input
type="number"
id="{{meta.idp}}-silver"
@ -90,12 +94,9 @@
>
</div>
<div class="currency half-pill">
<{{{ifThen meta.editable "label" "div" }}}
for="{{meta.idp}}-copper"
class="label"
>
<label for="{{meta.idp}}-copper" >
{{ rc-i18n "RipCrypt.common.currency.copper"}}
</{{{ifThen meta.editable "label" "div" }}}>
</label>
<input
type="number"
id="{{meta.idp}}-copper"

View file

@ -101,12 +101,14 @@
display: grid;
column-gap: var(--col-gap);
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.currency {
.half-pill {
display: grid;
grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
align-items: center;
background: var(--section-header-background);
border-radius: 0 999px 999px 0;
color: var(--section-header-text);
--input-background: var(--base-background);
--input-text: var(--base-text);
@ -117,9 +119,4 @@
text-align: center;
}
}
}
.half-pill {
border-radius: 0 999px 999px 0;
}
}