Add a component that handles displaying the person silhouette with some content inside of it

This commit is contained in:
Oliver-Akins 2025-07-20 21:32:46 -06:00
parent 26a2e0f3ff
commit 2b88bcc2ef
4 changed files with 146 additions and 0 deletions

View file

@ -0,0 +1,54 @@
{{#if (eq type "hero")}}
<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>
{{else}}
<rc-svg
var:fill="var(--section-header-background)"
var:stroke="var(--base-background)"
var:stroke-width="2"
var:stroke-linejoin="rounded"
class="silhouette"
name="geist-silhouette.v2"
></rc-svg>
{{/if}}
{{!-- {{#each armours as | slot |}}
<div slot="{{@key}}" 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>
{{/each}} --}}
<div class="head">
<slot name="head"></slot>
<span class="label">{{ rc-i18n "RipCrypt.common.anatomy.head" }}</span>
</div>
<div class="body">
<slot name="body"></slot>
<span class="label">{{ rc-i18n "RipCrypt.common.anatomy.body" }}</span>
</div>
<div class="arms">
<slot name="arms"></slot>
<span class="label">{{ rc-i18n "RipCrypt.common.anatomy.arms" }}</span>
</div>
<div class="legs">
<slot name="legs"></slot>
<span class="label">{{ rc-i18n "RipCrypt.common.anatomy.legs" }}</span>
</div>

View file

@ -0,0 +1,34 @@
:host {
display: inline-block;
}
.person {
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;
row-gap: var(--row-gap);
> 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%;
}
.head, .body, .legs { grid-column: 1; }
.arms { grid-column: 2; }
.head { grid-row: 1; }
.body, .arms { grid-row: 2; }
.legs { grid-row: 3; }
}