Skip to content

Instantly share code, notes, and snippets.

@amis92
Created March 15, 2022 20:55
Show Gist options
  • Save amis92/f516c3db6bae1ec7bc79400e40de5e27 to your computer and use it in GitHub Desktop.
Save amis92/f516c3db6bae1ec7bc79400e40de5e27 to your computer and use it in GitHub Desktop.
<style>
#hideCostButton:checked ~ * .costs {
display: none;
}
</style>
<label>
Hide costs
</label>
<input id="hideCostButton" type="checkbox">
<h1>
{{roster.name}} ({{roster.gameSystemName}})
<em class="costs">
{{> costs roster}}
</em>
</h1>
<ul>
{{#each roster.forces}}
<li>
{{> force}}
</li>
{{/each}}
</ul>
{{#*inline "costs"}}
{{#each costs as |cost|}}
{{#if cost.value}}
{{cost.value}}
{{cost.name}}{{#unless @last}}, {{/unless}}
{{/if}}
{{/each}}
{{/inline}}
{{#*inline "force"}}
<h2>
{{name}} ({{catalogueName}})
<em class="costs">
{{> costs}}
</em>
</h2>
<ul>
{{#each selections}}
<li>
{{> selection}}
</li>
{{/each}}
</ul>
{{/inline}}
{{#*inline "selection"}}
<span>
<strong>
{{name}}
</strong>
<em class="costs">
{{> costs}}
</em>
</span>
<ul>
{{#each selections}}
<li>{{> selection}}</li>
{{/each}}
</ul>
{{/inline}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment