Widen stamina bars and mark injury thresholds
This commit is contained in:
parent
d8feb89355
commit
fa3a7d3ec9
2 changed files with 37 additions and 6 deletions
|
|
@ -18,6 +18,7 @@
|
|||
EQUIPMENT,
|
||||
INJURIES,
|
||||
EXHAUSTION,
|
||||
INJURY_AT,
|
||||
CHARACTER_COLORS,
|
||||
hasSkill,
|
||||
activeDice,
|
||||
|
|
@ -300,8 +301,6 @@
|
|||
>{SKILLS[p.skill].name}{#if p.skill === "gatherer"}<span class="public-bars">
|
||||
· {p.powerBars} power bar{p.powerBars === 1 ? "" : "s"}</span
|
||||
>{/if}</span
|
||||
><span class="stamina-track" aria-hidden="true"
|
||||
><i style:width={`${(1 - p.stamina / EXHAUSTION) * 100}%`}></i></span
|
||||
>
|
||||
</div>
|
||||
<div class="teammate-status">
|
||||
|
|
@ -331,6 +330,15 @@
|
|||
: ""}</span
|
||||
>
|
||||
</div>
|
||||
<span class="stamina-track" title="Injuries at 20, 15, 10 and 5 stamina remaining." aria-hidden="true">
|
||||
<i style:width={`${(1 - p.stamina / EXHAUSTION) * 100}%`}></i>
|
||||
{#each INJURY_AT as threshold}<span
|
||||
class="injury-tick"
|
||||
class:crossed={p.stamina >= threshold}
|
||||
style:left={`${(1 - threshold / EXHAUSTION) * 100}%`}
|
||||
title={`Injury at ${EXHAUSTION - threshold} stamina remaining`}><span>◆</span></span
|
||||
>{/each}
|
||||
</span>
|
||||
</button>
|
||||
{/each}
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@ h3 {
|
|||
}
|
||||
.teammate {
|
||||
flex: 1;
|
||||
flex-wrap: wrap;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
@ -157,11 +158,33 @@ h3 {
|
|||
}
|
||||
.stamina-track {
|
||||
display: block;
|
||||
height: 3px;
|
||||
position: relative;
|
||||
flex: 0 0 100%;
|
||||
height: 5px;
|
||||
background: #142a23;
|
||||
margin-top: 10px;
|
||||
max-width: 130px;
|
||||
overflow: hidden;
|
||||
margin: 5px 0 2px;
|
||||
}
|
||||
.injury-tick {
|
||||
position: absolute;
|
||||
top: -2px;
|
||||
width: 2px;
|
||||
height: 9px;
|
||||
background: #d8debd;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
.injury-tick > span {
|
||||
position: absolute;
|
||||
font-size: 7px;
|
||||
top: -8px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
color: #d8debd;
|
||||
}
|
||||
.injury-tick.crossed {
|
||||
background: #d5896b;
|
||||
}
|
||||
.injury-tick.crossed > span {
|
||||
color: #d5896b;
|
||||
}
|
||||
.stamina-track i {
|
||||
display: block;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue