Skip to content

Commit

Permalink
Fix custom activity icon display.
Browse files Browse the repository at this point in the history
  • Loading branch information
Fyorl committed Aug 30, 2024
1 parent c8e5656 commit b0ef575
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 11 deletions.
14 changes: 13 additions & 1 deletion less/v2/activities.less
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,24 @@
align-items: center;
padding: 6px 56px 6px 6px;

> span {
> .name {
flex: 1;
text-transform: none;
font-family: var(--dnd5e-font-roboto-slab);
line-height: normal;
font-size: var(--font-size-14);
}

> .icon {
flex: 0 0 50px;
height: 24px;
text-align: left;
}

.gold-icon {
border-width: 1px;
width: 24px;
height: 24px;
}
}
}
8 changes: 6 additions & 2 deletions less/v2/items.less
Original file line number Diff line number Diff line change
Expand Up @@ -518,9 +518,13 @@
--icon-size: 24px;
--icon-fill: var(--color-text-dark-primary);
flex: 0 0 50px;
width: 24px;
height: 24px;
.gold-icon { border-width: 1px; }

.gold-icon {
border-width: 1px;
width: 24px;
height: 24px;
}
}

> .name {
Expand Down
18 changes: 10 additions & 8 deletions templates/activity/activity-choices.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
{{#each activities}}
<li>
<button type="button" data-action="choose" data-activity-id="{{ id }}">
{{#with icon}}
{{#if svg}}
<dnd5e-icon src="{{ src }}"></dnd5e-icon>
{{else}}
<img src="{{ src }}" alt="{{ ../name }}">
{{/if}}
{{/with}}
<span>{{ name }}</span>
<span class="icon">
{{#with icon}}
{{#if svg}}
<dnd5e-icon src="{{ src }}"></dnd5e-icon>
{{else}}
<img src="{{ src }}" alt="{{ ../name }}" class="gold-icon">
{{/if}}
{{/with}}
</span>
<span class="name">{{ name }}</span>
</button>
</li>
{{/each}}
Expand Down

0 comments on commit b0ef575

Please sign in to comment.