180 lines
4.9 KiB
Plaintext
180 lines
4.9 KiB
Plaintext
{% liquid
|
|
if section.settings.line_1 != blank
|
|
assign line_1 = section.settings.line_1
|
|
else
|
|
assign line_1 = 'signup.line_1' | t
|
|
endif
|
|
|
|
if section.settings.line_2 != blank
|
|
assign line_2 = section.settings.line_2
|
|
else
|
|
assign line_2 = 'signup.line_2' | t
|
|
endif
|
|
|
|
if section.settings.line_3 != blank
|
|
assign line_3 = section.settings.line_3
|
|
else
|
|
assign line_3 = 'signup.line_3' | t
|
|
endif
|
|
|
|
if section.settings.line_4 != blank
|
|
assign line_4 = section.settings.line_4
|
|
else
|
|
assign line_4 = 'signup.line_4' | t
|
|
endif
|
|
|
|
if section.settings.text != blank
|
|
assign text = section.settings.text
|
|
else
|
|
assign text = 'signup.text' | t
|
|
endif
|
|
|
|
if section.settings.placeholder != blank
|
|
assign placeholder = section.settings.placeholder
|
|
else
|
|
assign placeholder = 'signup.placeholder' | t
|
|
endif
|
|
|
|
assign form_id = 'SignupForm-' | append: section.id
|
|
assign email_id = 'SignupEmail-' | append: section.id
|
|
assign message_id = 'SignupMessage-' | append: section.id
|
|
%}
|
|
|
|
<section class="signup full-width" id="Signup-{{ section.id }}">
|
|
<div class="signup__panel">
|
|
<div class="signup__art" aria-hidden="true">
|
|
<img
|
|
src="{{ 'Capa_1.avif' | asset_url }}"
|
|
alt=""
|
|
width="317"
|
|
height="360"
|
|
loading="lazy"
|
|
decoding="async"
|
|
>
|
|
</div>
|
|
|
|
<div class="signup__copy">
|
|
<h2 class="signup__title">
|
|
<span class="signup__line signup__line--medium">{{ line_1 | escape }}</span>
|
|
<span class="signup__line signup__line--light">{{ line_2 | escape }}</span>
|
|
<span class="signup__line">
|
|
<span class="signup__line--medium">{{ line_3 | escape }}</span>
|
|
<span class="signup__line--light"> {{ line_4 | escape }}</span>
|
|
</span>
|
|
</h2>
|
|
|
|
{% if text != blank %}
|
|
<p class="signup__text">{{ text | escape | newline_to_br }}</p>
|
|
{% endif %}
|
|
|
|
{% form 'customer', id: form_id, class: 'signup__form' %}
|
|
<input type="hidden" name="contact[tags]" value="newsletter">
|
|
|
|
<div class="signup__field">
|
|
<label class="signup__label" for="{{ email_id }}">{{ 'signup.email_label' | t }}</label>
|
|
<input
|
|
id="{{ email_id }}"
|
|
class="signup__input"
|
|
type="email"
|
|
name="contact[email]"
|
|
value="{{ form.email }}"
|
|
placeholder="{{ placeholder | escape }}"
|
|
autocomplete="email"
|
|
autocapitalize="off"
|
|
autocorrect="off"
|
|
spellcheck="false"
|
|
required
|
|
aria-required="true"
|
|
{% if form.errors %}
|
|
aria-invalid="true"
|
|
aria-describedby="{{ message_id }}"
|
|
{% elsif form.posted_successfully? %}
|
|
aria-describedby="{{ message_id }}"
|
|
{% endif %}
|
|
>
|
|
<button class="signup__submit" type="submit" aria-label="{{ 'signup.submit' | t }}">
|
|
<span class="signup__arrow">
|
|
<img src="{{ 'signup-arrow.svg' | asset_url }}" alt="" width="20" height="20"
|
|
loading="lazy"
|
|
decoding="async"
|
|
>
|
|
</span>
|
|
</button>
|
|
</div>
|
|
|
|
{% if form.posted_successfully? %}
|
|
<p id="{{ message_id }}" class="signup__message" role="status" tabindex="-1" autofocus>
|
|
{{ 'signup.success' | t }}
|
|
</p>
|
|
{% elsif form.errors %}
|
|
<p id="{{ message_id }}" class="signup__message signup__message--error" role="alert">
|
|
{% if form.errors.messages.email != blank %}
|
|
{{ form.errors.messages.email | escape }}
|
|
{% else %}
|
|
{{ 'signup.error' | t }}
|
|
{% endif %}
|
|
</p>
|
|
{% endif %}
|
|
{% endform %}
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
{% schema %}
|
|
{
|
|
"name": "t:signup.name",
|
|
"tag": "section",
|
|
"class": "signup-section",
|
|
"disabled_on": {
|
|
"groups": ["header", "footer"]
|
|
},
|
|
"settings": [
|
|
{
|
|
"type": "paragraph",
|
|
"content": "t:signup.form_info"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"id": "line_1",
|
|
"label": "t:signup.line_1",
|
|
"default": "Regístrate"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"id": "line_2",
|
|
"label": "t:signup.line_2",
|
|
"default": "hoy mismo y disfruta de un"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"id": "line_3",
|
|
"label": "t:signup.line_3",
|
|
"default": "10 % de descuento"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"id": "line_4",
|
|
"label": "t:signup.line_4",
|
|
"default": "en tu primer pedido"
|
|
},
|
|
{
|
|
"type": "textarea",
|
|
"id": "text",
|
|
"label": "t:signup.text",
|
|
"default": "Accede a beneficios exclusivos para miembros, acceso anticipado a los nuevos lanzamientos y recompensas exclusivas, solo para ti."
|
|
},
|
|
{
|
|
"type": "text",
|
|
"id": "placeholder",
|
|
"label": "t:signup.placeholder",
|
|
"default": "Tu email"
|
|
}
|
|
],
|
|
"presets": [
|
|
{
|
|
"name": "t:signup.name"
|
|
}
|
|
]
|
|
}
|
|
{% endschema %}
|