Layout change

This commit is contained in:
WBHarry 2025-06-07 00:03:01 +02:00
parent 19a71a6a7f
commit d79249076d
3 changed files with 76 additions and 73 deletions

View file

@ -1318,6 +1318,9 @@
.combat-sidebar .encounter-controls.combat .control-buttons {
width: min-content;
}
.combat-sidebar .combatant-controls {
flex: 0;
}
.combat-sidebar .token-actions {
align-self: stretch;
display: flex;
@ -1330,7 +1333,8 @@
gap: 4px;
}
.combat-sidebar .token-actions .action-tokens .action-token {
height: 24px;
height: 22px;
width: 22px;
border: 1px solid;
border-radius: 50%;
display: flex;
@ -1357,14 +1361,17 @@
.combat-sidebar .token-actions button.main:hover {
filter: drop-shadow(0 0 3px var(--button-hover-text-color));
}
.combat-sidebar .token-actions button.discrete:hover {
background: inherit;
.combat-sidebar .spotlight-control {
font-size: 26px;
}
.combat-sidebar .token-actions .combatant-control:focus {
.combat-sidebar .spotlight-control:focus {
outline: none;
box-shadow: none;
}
.combat-sidebar .token-actions .combatant-control.requesting {
.combat-sidebar .spotlight-control.discrete:hover {
background: inherit;
}
.combat-sidebar .spotlight-control.requesting {
filter: drop-shadow(0 0 3px gold);
color: var(--button-hover-text-color);
}

View file

@ -30,6 +30,10 @@
}
}
.combatant-controls {
flex: 0;
}
.token-actions {
align-self: stretch;
display: flex;
@ -42,7 +46,8 @@
gap: 4px;
.action-token {
height: 24px;
height: 22px;
width: 22px;
border: 1px solid;
border-radius: 50%;
display: flex;
@ -73,22 +78,24 @@
filter: drop-shadow(0 0 3px var(--button-hover-text-color));
}
}
}
}
&.discrete:hover {
background: inherit;
}
.spotlight-control {
font-size: 26px;
&:focus {
outline: none;
box-shadow: none;
}
.combatant-control {
&:focus {
outline: none;
box-shadow: none;
}
&.discrete:hover {
background: inherit;
}
&.requesting {
filter: drop-shadow(0 0 3px gold);
color: var(--button-hover-text-color);
}
&.requesting {
filter: drop-shadow(0 0 3px gold);
color: var(--button-hover-text-color);
}
}

View file

@ -9,65 +9,54 @@
{{!-- Name & Controls --}}
<div class="token-name">
<strong class="name">{{ name }}</strong>
<div class="combatant-controls">
{{#if @root.user.isGM}}
<button type="button" class="inline-control combatant-control icon fa-solid fa-eye-slash {{#if hidden}}active{{/if}}"
data-action="toggleHidden" data-tooltip aria-label="{{ localize "COMBAT.ToggleVis" }}"></button>
<button type="button" class="inline-control combatant-control icon fa-solid fa-skull {{#if isDefeated}}active{{/if}}"
data-action="toggleDefeated" data-tooltip
aria-label="{{ localize "COMBAT.ToggleDead" }}"></button>
{{/if}}
{{#if canPing}}
<button type="button" class="inline-control combatant-control icon fa-solid fa-bullseye-arrow"
data-action="pingCombatant" data-tooltip
aria-label="{{ localize "COMBAT.PingCombatant" }}"></button>
{{/if}}
{{#unless @root.user.isGM}}
<button type="button" class="inline-control combatant-control icon fa-solid fa-arrows-to-eye"
data-action="panToCombatant" data-tooltip
aria-label="{{ localize "COMBAT.PanToCombatant" }}"></button>
{{/unless}}
{{!-- TODO: Target Control --}}
<div class="token-effects" data-tooltip-html="{{ effects.tooltip }}">
{{#each effects.icons}}
<img class="token-effect" src="{{ img }}" alt="{{ name }}">
{{/each}}
<div class="flexrow">
<div class="combatant-controls flex-0">
{{#if @root.user.isGM}}
<button type="button" class="inline-control combatant-control icon fa-solid fa-eye-slash {{#if hidden}}active{{/if}}"
data-action="toggleHidden" data-tooltip aria-label="{{ localize "COMBAT.ToggleVis" }}"></button>
<button type="button" class="inline-control combatant-control icon fa-solid fa-skull {{#if isDefeated}}active{{/if}}"
data-action="toggleDefeated" data-tooltip
aria-label="{{ localize "COMBAT.ToggleDead" }}"></button>
{{/if}}
{{#if canPing}}
<button type="button" class="inline-control combatant-control icon fa-solid fa-bullseye-arrow"
data-action="pingCombatant" data-tooltip
aria-label="{{ localize "COMBAT.PingCombatant" }}"></button>
{{/if}}
{{#unless @root.user.isGM}}
<button type="button" class="inline-control combatant-control icon fa-solid fa-arrows-to-eye"
data-action="panToCombatant" data-tooltip
aria-label="{{ localize "COMBAT.PanToCombatant" }}"></button>
{{/unless}}
</div>
{{#if ../combat.round}}
<div class="token-actions">
{{#if isOwner}}
{{#if (and (not isNPC) ../actionTokens.enabled)}}
<div class="action-tokens">
{{#times ../actionTokens.tokens}}
<button type="button" class="inline-control main icon fa-solid fa-bolt-lightning action-token {{#if (lte ../system/actionTokens this)}}used{{/if}}" data-action="setActionTokens" data-combatant-id="{{../id}}" data-token-index="{{this}}">
</button>
{{/times}}
</div>
{{/if}}
{{/if}}
</div>
{{/if}}
</div>
</div>
{{!-- Resource --}}
{{#if resource includeZero=true}}
<div class="token-resource">
<span class="resource">{{ resource }}</span>
</div>
{{/if}}
{{#if ../combat.round}}
<div class="token-actions">
{{#if isOwner}}
{{#if (and (not isNPC) ../actionTokens.enabled)}}
<div class="action-tokens">
{{#times ../actionTokens.tokens}}
<button type="button" class="inline-control main icon fa-solid fa-bolt-lightning action-token {{#if (lte ../system/actionTokens this)}}used{{/if}}" data-action="setActionTokens" data-combatant-id="{{../id}}" data-token-index="{{this}}">
</button>
{{/times}}
</div>
{{/if}}
{{#if @root.user.isGM}}
<button
type="button" class="inline-control combatant-control discrete icon fa-solid {{#if system.spotlight.requesting}}fa-hand-sparkles requesting{{else}}fa-hand{{/if}}"
data-action="toggleSpotlight" data-combatant-id="{{id}}" data-tooltip aria-label="{{localize "DAGGERHEART.Combat.giveSpotlight"}}"
></button>
{{else}}
<button
type="button" class="inline-control combatant-control discrete icon fa-solid {{#if system.spotlight.requesting}}fa-hand-sparkles requesting{{else}}fa-hand{{/if}}"
data-action="requestSpotlight" data-combatant-id="{{id}}" data-tooltip aria-label="{{#if system.spotlight.requesting}}{{localize "DAGGERHEART.Combat.requestingSpotlight"}}{{else}}{{localize "DAGGERHEART.Combat.requestSpotlight"}}{{/if}}"
></button>
{{/if}}
{{/if}}
</div>
{{#if @root.user.isGM}}
<button
type="button" class="inline-control spotlight-control discrete icon fa-solid {{#if system.spotlight.requesting}}fa-hand-sparkles requesting{{else}}fa-hand{{/if}}"
data-action="toggleSpotlight" data-combatant-id="{{id}}" data-tooltip aria-label="{{localize "DAGGERHEART.Combat.giveSpotlight"}}"
></button>
{{else}}
<button
type="button" class="inline-control spotlight-control discrete icon fa-solid {{#if system.spotlight.requesting}}fa-hand-sparkles requesting{{else}}fa-hand{{/if}}"
data-action="requestSpotlight" data-combatant-id="{{id}}" data-tooltip aria-label="{{#if system.spotlight.requesting}}{{localize "DAGGERHEART.Combat.requestingSpotlight"}}{{else}}{{localize "DAGGERHEART.Combat.requestSpotlight"}}{{/if}}"
></button>
{{/if}}
</li>
{{/each}}