collapse zones with no active quests
This commit is contained in:
parent
91257a09f4
commit
3541eff537
3 changed files with 18 additions and 2 deletions
|
|
@ -101,6 +101,12 @@ export class Armory {
|
|||
helpers: {
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
...require("handlebars-helpers")(),
|
||||
eq: function(a: any, b: any) {
|
||||
return a === b;
|
||||
},
|
||||
hasInProgressQuests: function(quests: any[]) {
|
||||
return quests.some(quest => quest.status === 'In Progress');
|
||||
}
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -4,18 +4,24 @@
|
|||
const aowow_tooltips = { "renamelinks": true, };
|
||||
</script>
|
||||
|
||||
<script type="application/javascript" src="{{aowow}}/static/widgets/power.js"></script>
|
||||
|
||||
{{> character-header }}
|
||||
|
||||
{{#each data.categories as |quests category|}}
|
||||
<div class="quests-table" style="margin-bottom: 20px;">
|
||||
{{#if (hasInProgressQuests quests)}}
|
||||
<h2 class="is-size-4 category-header collapsible expanded">
|
||||
{{else}}
|
||||
<h2 class="is-size-4 category-header collapsible">
|
||||
{{/if}}
|
||||
{{category}}
|
||||
<span class="collapse-icon">▼</span>
|
||||
</h2>
|
||||
|
||||
{{#if (hasInProgressQuests quests)}}
|
||||
<div class="category-content expanded">
|
||||
{{else}}
|
||||
<div class="category-content">
|
||||
{{/if}}
|
||||
<!-- In Progress Quests -->
|
||||
<h3 class="is-size-5 collapsible">
|
||||
In Progress
|
||||
|
|
|
|||
|
|
@ -101,4 +101,8 @@
|
|||
|
||||
.category-header.expanded .collapse-icon {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
.category-header:not(.expanded) .collapse-icon {
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue