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" "HeroSkillsCardV1": "Hero Skill Card"
}, },
"common": { "common": {
"ammo": "Ammo",
"quantity": "Quantity", "quantity": "Quantity",
"equipped": "Equipped", "equipped": "Equipped",
"edit": "Edit", "edit": "Edit",

View file

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

View file

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

View file

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

View file

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