Skip to content

Commit

Permalink
improve visibility of chat card properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Muttley committed Oct 1, 2023
1 parent a0df1f8 commit 6e78553
Show file tree
Hide file tree
Showing 37 changed files with 614 additions and 529 deletions.
1 change: 1 addition & 0 deletions i18n/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,7 @@ SHADOWDARK.sheet.player.ranged_attacks: Ranged Attacks
SHADOWDARK.sheet.player.roll_initiative: Roll Initiative
SHADOWDARK.sheet.player.spells_tier: Tier
SHADOWDARK.sheet.player.spells: Spells
SHADOWDARK.sheet.abilities.label: Abilities
SHADOWDARK.sheet.player.tab.abilities: Abilities
SHADOWDARK.sheet.player.tab.background: Background
SHADOWDARK.sheet.player.tab.inventory: Inventory
Expand Down
4 changes: 4 additions & 0 deletions scss/base/_tags.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ $sans-serif: 'Roboto', system, -apple-system, sans-serif !default;
&_secondary {
background-color: var(--primary);
}

&_small {
font-size: 10px;
}
}
}

Expand Down
10 changes: 8 additions & 2 deletions scss/sheets/actors/_player.scss
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
margin-bottom: 2px;
}

.attacks-label {
.actions-label {
@include p-reset;
display: block;
padding: 4px;
Expand Down Expand Up @@ -265,11 +265,17 @@
}

.fixed-header {
@include p-reset;
padding-left: 8px;
padding-right: 8px;
padding-top: 8px;

position: sticky;
top: 0;

background: url("/ui/parchment.jpg") repeat;

z-index: 10;
padding: 8px;
}

.hit-points {
Expand Down
1 change: 1 addition & 0 deletions system/src/templates.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default function() {
"systems/shadowdark/templates/actors/player/abilities/ac.hbs",
"systems/shadowdark/templates/actors/player/abilities/attacks.hbs",
"systems/shadowdark/templates/actors/player/abilities/hp.hbs",
"systems/shadowdark/templates/actors/player/abilities/class.hbs",
"systems/shadowdark/templates/actors/player/abilities/initiative.hbs",
"systems/shadowdark/templates/actors/player/abilities/luck.hbs",
"systems/shadowdark/templates/actors/player/background.hbs",
Expand Down
58 changes: 29 additions & 29 deletions system/templates/actors/partials/background-selector.hbs
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
<div class="pc pc_{{config.name}}">
<label for="pc_{{config.name}}">
{{config.label}}
</label>
{{#if owner}}
<a class="item-selector" data-options="{{config.name}}" for="system.{{config.name}}">
<i class="fa-solid fa-pen-to-square fa-sm"></i>
</a>
{{/if}}
<div class="compendium-items flexrow">
<div class="compendium-item flexrow">
{{#if config.item}}
<a
class="content-link uuid-link"
data-type="Item"
data-uuid="{{config.item.uuid}}"
>
{{config.item.name}}
</a>
{{else}}
<input
id="pc pc_{{config.name}}"
type="text"
title="{{config.tooltip}}"
value=""
data-dtype="String"
disabled="disabled"
/>
{{/if}}
</div>
<label for="pc_{{config.name}}">
{{config.label}}
</label>
{{#if owner}}
<a class="item-selector" data-options="{{config.name}}" for="system.{{config.name}}">
<i class="fa-solid fa-pen-to-square fa-sm"></i>
</a>
{{/if}}
<div class="compendium-items flexrow">
<div class="compendium-item flexrow">
{{#if config.item}}
<a
class="content-link uuid-link"
data-type="Item"
data-uuid="{{config.item.uuid}}"
>
{{config.item.name}}
</a>
{{else}}
<input
id="pc pc_{{config.name}}"
type="text"
title="{{config.tooltip}}"
value=""
data-dtype="String"
disabled="disabled"
/>
{{/if}}
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion system/templates/actors/player.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@

</div>
</nav>
<hr />
</div>
<hr />
<section class="player-body">
{{> actors/player/abilities }}
{{> actors/player/spells }}
Expand Down
5 changes: 4 additions & 1 deletion system/templates/actors/player/abilities.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
{{> actors/player/abilities/ac }}
{{> actors/player/abilities/initiative }}
</div>
{{> actors/player/abilities/attacks }}
<div class="actions-grid">
{{> actors/player/abilities/attacks }}
{{> actors/player/abilities/class }}
</div>
</div>
</section>
52 changes: 26 additions & 26 deletions system/templates/actors/player/abilities/attacks.hbs
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
<div class="attacks-grid">
<label class="attacks-label">{{localize 'SHADOWDARK.sheet.player.melee_attacks'}}</label>
<ol>
{{#each attacks.melee as |attack|}}
<li
class="rollable item-rollable attack-item"
data-action="item-attack"
data-item-id="{{attack.itemId}}"
>
{{{attack.display}}}
</li>
{{/each}}
</ol>
<label class="attacks-label">{{localize 'SHADOWDARK.sheet.player.ranged_attacks'}}</label>
<ol>
{{#each attacks.ranged as |attack|}}
<li
class="rollable item-rollable attack-item"
data-action="item-attack"
data-item-id="{{attack.itemId}}"
>
{{{attack.display}}}
</li>
{{/each}}
</ol>
</div>
<label class="actions-label">{{localize 'SHADOWDARK.sheet.player.melee_attacks'}}</label>
<ol>
{{#each attacks.melee as |attack|}}
<li
class="rollable item-rollable attack-item"
data-action="item-attack"
data-item-id="{{attack.itemId}}"
data-tooltip="Roll Attack"
>
{{{attack.display}}}
</li>
{{/each}}
</ol>
<label class="actions-label">{{localize 'SHADOWDARK.sheet.player.ranged_attacks'}}</label>
<ol>
{{#each attacks.ranged as |attack|}}
<li
class="rollable item-rollable attack-item"
data-action="item-attack"
data-item-id="{{attack.itemId}}"
data-tooltip="Roll Attack"
>
{{{attack.display}}}
</li>
{{/each}}
</ol>
12 changes: 12 additions & 0 deletions system/templates/actors/player/abilities/class.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<label class="actions-label">{{characterClass}} {{localize 'SHADOWDARK.sheet.abilities.label'}}</label>
<ol>
{{#each classAbilities as |ability|}}
<li
class="rollable item-rollable ability-item"
data-action="ability-use"
data-item-id="{{ability._id}}"
>
{{{ability.name}}}
</li>
{{/each}}
</ol>
106 changes: 55 additions & 51 deletions system/templates/apps/effect-panel.hbs
Original file line number Diff line number Diff line change
@@ -1,70 +1,74 @@
<section class="effect-panel" style="{{topStyle}}">
<div id="effect-panel-drag-handler" />
{{#each conditionEffects as |effect|}}
{{> effect effect=effect }}
{{/each}}
{{#each conditionEffects as |effect|}}
{{> effect effect=effect }}
{{/each}}

{{#if (and conditionEffects.length (or temporaryEffects.length passiveEffects.length))}}
<hr />
<hr />
{{/if}}

{{#each temporaryEffects as |effect|}}
{{> effect effect=effect }}
{{/each}}
{{#each temporaryEffects as |effect|}}
{{> effect effect=effect }}
{{/each}}

{{#if (and temporaryEffects.length passiveEffects.length)}}
<hr />
<hr />
{{/if}}

{{#each passiveEffects as |effect|}}
{{> effect effect=effect }}
{{/each}}
{{> effect effect=effect }}
{{/each}}
</section>

{{#*inline "effect"}}
<div class="effect-item">
<div class="effect-info">
<h1>
{{effect.effectName}} ({{effect.originName}})
</h1>
<div class="effect-item">
<div class="effect-info">
<h1>
{{effect.effectName}} ({{effect.originName}})
</h1>

<div class="tags">
<div class="tags">
{{#if effect.temporary}}
<h2 class="duration">{{remainingTimeLabel effect}}</h2>
{{else if effect.talentType}}
<h2 class="talent">
{{#ifEq effect.talentType "level"}}
{{localize "SHADOWDARK.talent.class.level"}}
{{/ifEq}}
{{#ifEq effect.talentType "ancestry"}}
{{localize "SHADOWDARK.talent.class.ancestry"}}
{{/ifEq}}
{{#ifEq effect.talentType "class"}}
{{localize "SHADOWDARK.talent.class.class"}}
{{/ifEq}}
</h2>
{{/if}}
</div>

<h2>
<em>
{{localize "SHADOWDARK.apps.effect_panel.right_click_to_remove"}}
</em>
</h3>
</div>

<div
class="icon"
data-effect-id="{{effect.id}}"
style="background-image: url({{effect.icon}});"
>
{{#if effect.temporary}}
<h2 class="duration">{{remainingTimeLabel effect}}</h2>
{{else if effect.talentType}}
<h2 class="talent">
{{#ifEq effect.talentType "level"}}
{{localize "SHADOWDARK.talent.class.level"}}
{{/ifEq}}
{{#ifEq effect.talentType "ancestry"}}
{{localize "SHADOWDARK.talent.class.ancestry"}}
{{/ifEq}}
{{#ifEq effect.talentType "class"}}
{{localize "SHADOWDARK.talent.class.class"}}
{{/ifEq}}
</h2>
<i class="badge fas fa-xs fa-clock"></i>
<div
class="progress"
style="--progress: {{effect.remainingDuration.progress}}%;
{{getProgressColor effect.remainingDuration.progress}}"
>
</div>
{{else}}
<i class="badge unlimited fas fa-xs fa-infinity"></i>
{{/if}}
</div>

<h2><em>{{localize "SHADOWDARK.apps.effect_panel.right_click_to_remove"}}</em></h3>
</div>

<div
class="icon"
data-effect-id="{{effect.id}}"
style="background-image: url({{effect.icon}});"
>
{{#if effect.temporary}}
<i class="badge fas fa-xs fa-clock"></i>
<div
class="progress"
style="--progress: {{effect.remainingDuration.progress}}%;
{{getProgressColor effect.remainingDuration.progress}}"
>
</div>
{{else}}
<i class="badge unlimited fas fa-xs fa-infinity"></i>
{{/if}}
</div>
</div>
{{/inline}}
{{/inline}}
28 changes: 14 additions & 14 deletions system/templates/apps/module-art-config.hbs
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<form>
{{#each config}}
<div class="form-group-stacked" data-id="{{id}}">
<label>{{label}}</label>
<div class="form-fields">
<label>
{{localize "SHADOWDARK.module_art_config.portraits"}}
<input type="checkbox" name="{{id}}.portraits" {{checked portraits}}>
</label>
<label>
{{localize "SHADOWDARK.module_art_config.tokens"}}
<input type="checkbox" name="{{id}}.tokens" {{checked tokens}}>
</label>
</div>
<label>{{label}}</label>
<div class="form-fields">
<label>
{{localize "SHADOWDARK.module_art_config.portraits"}}
<input type="checkbox" name="{{id}}.portraits" {{checked portraits}}>
</label>
<label>
{{localize "SHADOWDARK.module_art_config.tokens"}}
<input type="checkbox" name="{{id}}.tokens" {{checked tokens}}>
</label>
</div>
</div>
{{/each}}
<footer class="sheet-footer flexrow">
<button type="submit">
<i class="far fa-save"></i> {{localize "SHADOWDARK.settings.module_art.save"}}
</button>
<button type="submit">
<i class="far fa-save"></i> {{localize "SHADOWDARK.settings.module_art.save"}}
</button>
</footer>
</form>
Loading

0 comments on commit 6e78553

Please sign in to comment.