<div class="astron_parallex_section" id="{{ section.id }}">
  <div class="ps_container lazyload" style="{% if section.settings.parallax_image != blank %} background-image: url({{ section.settings.parallax_image | img_url: '1490x' }}); {%else%} background-image: url({{ 'parralex.jpg' | asset_url }}); {% endif %} ">
    <div class="ps_content">
      <div class="page-width">
        <div class="title">
          {% if section.settings.title != blank %}
          	<h2>{{ section.settings.title }}</h2>
          {% endif %}
        </div>
        <ul>
          {% for block in section.blocks %}
            <li>
              <div class="ps_block_content">
                {% if block.settings.icon != blank %}
                {% include 'image-element', image: block.settings.icon, alt: block.settings.title %}
                {% else %}
                 {{ 'image' | placeholder_svg_tag: 'placeholder-svg' }}
                {% endif %}
                {% if block.settings.icon_text != blank %}
                  <p>{{ block.settings.icon_text }}</p>
                {% endif %}
              </div>
            </li>
          {% endfor %}
        </ul>
        <div class="ps_newsletter">
          {%- assign formId = 'Contact_' | append: section.id -%}
          {% form 'customer', id: formId, novalidate: 'novalidate', class: 'contact-form form-single-field' %}
          {%- if form.posted_successfully? -%}
          <p class="form-message form-message--success" tabindex="-1" data-form-status>
            {{ 'general.newsletter_form.confirmation' | t }}
          </p>
          {%- endif -%}
          <input type="hidden" name="contact[tags]" value="newsletter">
          <div class="input-group {% if form.errors %} input-group--error{% endif %}">
            <input type="email"
                   name="contact[email]"
                   id="{{ formId }}-email"
                   class="input-group__field{% if form.errors %} input--error{% endif %}"
                   value="{{ form.email }}"
                   placeholder="{{ 'general.newsletter_form.email_placeholder' | t }}"
                   aria-label="{{ 'general.newsletter_form.email_placeholder' | t }}"
                   aria-required="true"
                   autocorrect="off"
                   autocapitalize="off"
                   {% if form.errors %}
                   aria-invalid="true"
                   aria-describedby="{{ formId }}-email-error"
                   data-form-status
                   {% endif %}
                   >
            <span class="input-group__btn">
              <button type="submit" class="btn" name="commit">
                <span>{{ 'Submit' }}</span>
              </button>
            </span>
          </div>
          {%- if form.errors contains 'email' -%}
          <span id="{{ formId }}-email-error" class="input-error-message">
            <span class="visually-hidden">{{ 'general.accessibility.error' | t }} </span>
            {% include 'icon-error' %}
            <span>{{ form.errors.translated_fields['email'] | capitalize }} {{ form.errors.messages['email'] }}.</span>
          </span>
          {%- endif -%}
          {% endform %}
        </div>
      </div>
    </div>
  </div>
</div>




{% schema %}
{
  "name": "Seção Newsletter Parallax",
  "class": "index-section--flush index-section--slideshow",
  "settings": [
  {
    "type": "text",
    "id": "title",
    "label": "Título",
    "default": "Participe da nossa comunidade"
  },
  {
    "type": "image_picker",
    "id": "parallax_image",
    "label": "Imagem de fundo Desktop"
  },
  {
    "type": "image_picker",
    "id": "parallax_image_mobile",
    "label": "Imagem de fundo Mobile"
  }
],
"blocks": [
  {
    "type": "blog",
    "name": "Blog",
    "settings": [
      {
        "type": "image_picker",
        "id": "icon",
        "label": "Ícone"
      },
      {
        "type": "text",
        "id": "icon_text",
        "label": "Texto",
        "default": "Resumo do artigo"
        }
      ]
    }
  ],
  "presets": [
    {
      "name": "Seção Newsletter Parallax",
      "category": "astron",
      "blocks": [
        {
          "type": "blog"
        },
        {
          "type": "blog"
        },
        {
          "type": "blog"
        }
      ]
    }
  ]
}
{% endschema %}

{% stylesheet %}
{% endstylesheet %}

{% javascript %}
{% endjavascript %}
