glacier-web-cli 0.5.0

Command-line tool for creating and running Glacier applications.
1
2
3
4
5
6
7
{# items: (question, answer). A shared `name` lets only one open at a time; `open` lists the indexes rendered open. #}
{% props items: Vec<(String, String)>, name: String = "", open: Vec<usize> = Vec::new() %}
<div class="ui-accordion">
  {%- for (i, (title, body)) in items.iter().enumerate() %}
  <details class="ui-accordion-item"{% if !name.is_empty() %} name="{{ name }}"{% end %}{% if open.contains(&i) %} open{% end %}><summary>{{ title }}<svg class="ui-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="m6 9 6 6 6-6"/></svg></summary><div class="ui-accordion-content"><p>{{ body }}</p></div></details>
  {%- end %}
</div>