Some initial, tentative trait display changes

This commit is contained in:
WBHarry 2026-05-09 16:22:47 +02:00
parent e8828b70db
commit 700fb97f4e
2 changed files with 39 additions and 13 deletions

View file

@ -23,15 +23,27 @@
gap: 2px; gap: 2px;
.trait-container { .trait-container {
width: 65px;
height: 65px;
background: url(../assets/svg/trait-shield.svg) no-repeat;
background-size: 100%; background-size: 100%;
padding-top: 3px; padding-top: 3px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
row-gap: 3px; text-align: center;
.trait-name {
background-color: light-dark(var(--semi-transparent-dark-blue, rgba(24, 22, 46, 0.33)), var(--golden-40, #f3c26740));
border: 1px solid light-dark(@semi-transparent-dark-blue, @golden-60);
border-radius: 3px;
color: light-dark(var(--color-light-1), var(--golden, #f3c267));
font-size: var(--font-size-12);
font-weight: 600;
height: 1rem;
line-height: 1rem;
white-space: nowrap;
width: 100%;
text-shadow: 1px 1px 2px var(--light-black, rgba(0, 0, 0, 0.3));
padding: 0 2px;
}
span { span {
font-size: var(--font-size-10); font-size: var(--font-size-10);
@ -43,15 +55,23 @@
font-size: var(--font-size-12); font-size: var(--font-size-12);
} }
.trait-inner-container {
--color-border: light-dark(@semi-transparent-dark-blue, @golden-60);
--background: light-dark(#e8e6e3, @dark-blue);
display: flex;
align-items: center;
justify-content: center;
input { input {
text-align: center; text-align: center;
width: 32px; width: 32px;
height: 24px; height: 24px;
position: relative; position: absolute;
top: 2px; margin-bottom: 6px;
padding: 0; padding: 0;
} }
} }
} }
} }
} }
}

View file

@ -10,9 +10,15 @@
<div class="traits-inner-container"> <div class="traits-inner-container">
{{#each document._source.system.traits as | trait key |}} {{#each document._source.system.traits as | trait key |}}
<div class="trait-container"> <div class="trait-container">
<span>{{localize (concat "DAGGERHEART.CONFIG.Traits." key ".name" )}}</span> <span class="trait-name">{{localize (concat "DAGGERHEART.CONFIG.Traits." key ".name" )}}</span>
<div class="trait-inner-container">
<svg width="52" height="46" viewBox="0 0 52 46" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M 0,0 H 52 L 51.0714,18.254 48.781,24.0952 47.5745,39.9596 26,46 4.42553,39.9596 3.219,24.0952 0.928571,18.254 Z" fill="var(--color-border)"></path>
<path d="M 3.312,5.357 8.58596,0 H 43.414 l 5.274,5.357 -1.8797,28.846 c -0.2431,2.605 -2.1461,4.7522 -4.7031,5.3064 l -14.8343,3.2151 c -0.8375,0.1816 -1.7043,0.1816 -2.5418,0 L 9.89482,39.5094 C 7.33785,38.9552 5.43478,36.808 5.19169,34.203 Z" fill="var(--background)"></path>
</svg>
<input type="text" data-dtype="Number" name="{{concat "system.traits." key ".value"}}" value="{{trait.value}}" /> <input type="text" data-dtype="Number" name="{{concat "system.traits." key ".value"}}" value="{{trait.value}}" />
</div> </div>
</div>
{{/each}} {{/each}}
</div> </div>
</div> </div>