glacier-web-cli 0.5.0

Command-line tool for creating and running Glacier applications.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{% props title: String, action: String, description: String = "", method: String = "post", submit: String = "Save", status: String = "", layout: String = "", inner_block: Slot %}
{# submit names the section ("Save profile"); status is the footer's note ("Last saved 3 days ago") #}
<form class="ui-form-section" method="{% if method == "get" %}get{% else %}post{% end %}" action="{{ action }}"{% if !layout.is_empty() %} data-layout="{{ layout }}"{% end %}>
  {%- if method != "get" %}
  {{ csrf_field() }}
  {%- end %}
  {%- if method != "get" && method != "post" %}
  <input type="hidden" name="_method" value="{{ method }}">
  {%- end %}
  <div class="ui-form-section-head">
    <h2>{{ title }}</h2>
    {%- if !description.is_empty() %}
    <p>{{ description }}</p>
    {%- end %}
  </div>
  <div class="ui-form-section-body">{{ inner_block }}</div>
  <div class="ui-form-section-foot">{% if !status.is_empty() %}<span class="ui-muted">{{ status }}</span>{% end %}<button class="ui-btn" data-variant="outline" type="reset">Cancel</button><button class="ui-btn">{{ submit }}</button></div>
</form>