248 lines
14 KiB
Plaintext
248 lines
14 KiB
Plaintext
{% doc %}
|
|
Renders the Glow Army rewards page.
|
|
|
|
When the Glow Army section renders this snippet, its settings and blocks are used.
|
|
On the default page template it falls back to the theme copy.
|
|
|
|
@example
|
|
{% render 'glow-army-page' %}
|
|
{% enddoc %}
|
|
|
|
{% liquid
|
|
assign glow_editor = false
|
|
if section.type == 'glow-army'
|
|
assign glow_editor = true
|
|
endif
|
|
|
|
assign heading = 'glow_army.heading' | t
|
|
if glow_editor
|
|
if section.settings.heading != blank
|
|
assign heading = section.settings.heading
|
|
endif
|
|
endif
|
|
|
|
assign intro = 'glow_army.text' | t
|
|
assign join_label = 'glow_army.join' | t
|
|
assign points_label = 'glow_army.points' | t
|
|
assign join_url = routes.account_register_url
|
|
assign points_url = routes.account_url
|
|
assign how_heading = 'glow_army.how' | t
|
|
assign earn_heading = 'glow_army.earn' | t
|
|
assign redeem_heading = 'glow_army.redeem' | t
|
|
assign referral_heading = 'glow_army.referral_heading' | t
|
|
assign referral_text = 'glow_army.referral_text' | t
|
|
assign referral_button = 'glow_army.referral_button' | t
|
|
assign referral_url = join_url
|
|
|
|
if glow_editor
|
|
if section.settings.text != blank
|
|
assign intro = section.settings.text
|
|
endif
|
|
if section.settings.join_label != blank
|
|
assign join_label = section.settings.join_label
|
|
endif
|
|
if section.settings.points_label != blank
|
|
assign points_label = section.settings.points_label
|
|
endif
|
|
if section.settings.join_link != blank
|
|
assign join_url = section.settings.join_link
|
|
endif
|
|
if section.settings.points_link != blank
|
|
assign points_url = section.settings.points_link
|
|
endif
|
|
if section.settings.how_heading != blank
|
|
assign how_heading = section.settings.how_heading
|
|
endif
|
|
if section.settings.earn_heading != blank
|
|
assign earn_heading = section.settings.earn_heading
|
|
endif
|
|
if section.settings.redeem_heading != blank
|
|
assign redeem_heading = section.settings.redeem_heading
|
|
endif
|
|
if section.settings.referral_heading != blank
|
|
assign referral_heading = section.settings.referral_heading
|
|
endif
|
|
if section.settings.referral_text != blank
|
|
assign referral_text = section.settings.referral_text
|
|
endif
|
|
if section.settings.referral_button != blank
|
|
assign referral_button = section.settings.referral_button
|
|
endif
|
|
if section.settings.referral_link != blank
|
|
assign referral_url = section.settings.referral_link
|
|
endif
|
|
endif
|
|
%}
|
|
|
|
<section class="glow-army" id="GlowArmy-{{ section.id }}">
|
|
<div class="glow-army__hero">
|
|
<div class="glow-army__hero-copy">
|
|
<h1 class="glow-army__title">{{ heading }}</h1>
|
|
<p class="glow-army__intro">{{ intro }}</p>
|
|
<div class="glow-army__actions">
|
|
<a class="glow-army__button glow-army__button--fill" href="{{ join_url }}">{{ join_label }}</a>
|
|
<a class="glow-army__button glow-army__button--ghost" href="{{ points_url }}">{{ points_label }}</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% if section.blocks.size > 0 %}
|
|
<div class="glow-army__body">
|
|
{% assign step_count = 0 %}
|
|
{% assign earn_count = 0 %}
|
|
{% assign reward_count = 0 %}
|
|
{% for block in section.blocks %}
|
|
{% if block.type == 'step' %}
|
|
{% assign step_count = step_count | plus: 1 %}
|
|
{% endif %}
|
|
{% if block.type == 'earn' %}
|
|
{% assign earn_count = earn_count | plus: 1 %}
|
|
{% endif %}
|
|
{% if block.type == 'reward' %}
|
|
{% assign reward_count = reward_count | plus: 1 %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
{% if step_count > 0 %}
|
|
<div class="glow-army__block">
|
|
<h2 class="glow-army__heading">{{ how_heading }}</h2>
|
|
<ol class="glow-army__steps">
|
|
{% for block in section.blocks %}
|
|
{% if block.type == 'step' %}
|
|
<li class="glow-army__step" {{ block.shopify_attributes }}>
|
|
<p class="glow-army__number">{{ block.settings.number }}</p>
|
|
<h3 class="glow-army__card-title">{{ block.settings.title }}</h3>
|
|
<p class="glow-army__card-text">{{ block.settings.text }}</p>
|
|
</li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</ol>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if earn_count > 0 %}
|
|
<div class="glow-army__block">
|
|
<h2 class="glow-army__heading">{{ earn_heading }}</h2>
|
|
<ul class="glow-army__cards">
|
|
{% for block in section.blocks %}
|
|
{% if block.type == 'earn' %}
|
|
<li class="glow-army__card" {{ block.shopify_attributes }}>
|
|
<span class="glow-army__icon" aria-hidden="true">
|
|
{% case block.settings.icon %}
|
|
{% when 'birthday' %}
|
|
<svg width="32" height="32" viewBox="0 0 32 32" fill="none"><path d="M6 22.5h20v3.2a2.3 2.3 0 0 1-2.3 2.3H8.3A2.3 2.3 0 0 1 6 25.7v-3.2Z" stroke="currentColor" stroke-width="1.4"/><path d="M6.5 22.5c1.2-1.6 2.2-1.6 3.4 0s2.2 1.6 3.4 0 2.2-1.6 3.4 0 2.2 1.6 3.4 0 2.2-1.6 3.4 0" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/><path d="M16 14.2v8.3M16 8.2c.8 1.3.4 2.4-.6 3.1" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/></svg>
|
|
{% when 'review' %}
|
|
<svg width="32" height="32" viewBox="0 0 32 32" fill="none"><path d="M8.5 10.5h9.2a3 3 0 0 1 3 3v4.2a3 3 0 0 1-3 3H14l-3.2 2.6v-2.6H8.5a3 3 0 0 1-3-3v-4.2a3 3 0 0 1 3-3Z" stroke="currentColor" stroke-width="1.4"/><path d="M16.2 12.2h7.3a3 3 0 0 1 3 3v3.4a3 3 0 0 1-3 3h-.4" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/></svg>
|
|
{% when 'profile' %}
|
|
<svg width="32" height="32" viewBox="0 0 32 32" fill="none"><rect x="8" y="6.5" width="16" height="19" rx="2" stroke="currentColor" stroke-width="1.4"/><path d="M12 12.5h8M12 16.5h8M12 20.5h5" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/></svg>
|
|
{% else %}
|
|
<svg width="32" height="32" viewBox="0 0 32 32" fill="none"><rect x="8" y="11" width="16" height="13" rx="2.2" stroke="currentColor" stroke-width="1.4"/><path d="M12.5 11V9.8a3.5 3.5 0 0 1 7 0V11" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/><path d="M16 16.2v3.2" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/></svg>
|
|
{% endcase %}
|
|
</span>
|
|
<h3 class="glow-army__card-title">{{ block.settings.title }}</h3>
|
|
<p class="glow-army__card-text">{{ block.settings.text }}</p>
|
|
</li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if reward_count > 0 %}
|
|
<div class="glow-army__block">
|
|
<h2 class="glow-army__heading">{{ redeem_heading }}</h2>
|
|
<ul class="glow-army__cards">
|
|
{% for block in section.blocks %}
|
|
{% if block.type == 'reward' %}
|
|
<li class="glow-army__card" {{ block.shopify_attributes }}>
|
|
{% if block.settings.image != blank %}
|
|
{{
|
|
block.settings.image
|
|
| image_url: width: 160
|
|
| image_tag: class: 'glow-army__reward-image', alt: block.settings.title, widths: '80, 160', loading: 'lazy'
|
|
}}
|
|
{% endif %}
|
|
<h3 class="glow-army__card-title">{{ block.settings.title }}</h3>
|
|
<p class="glow-army__card-text">{{ block.settings.text }}</p>
|
|
</li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% else %}
|
|
<div class="glow-army__body">
|
|
<div class="glow-army__block">
|
|
<h2 class="glow-army__heading">{{ how_heading }}</h2>
|
|
<ol class="glow-army__steps">
|
|
<li class="glow-army__step">
|
|
<p class="glow-army__number">01</p>
|
|
<h3 class="glow-army__card-title">{{ 'glow_army.steps.one_title' | t }}</h3>
|
|
<p class="glow-army__card-text">{{ 'glow_army.steps.one_text' | t }}</p>
|
|
</li>
|
|
<li class="glow-army__step">
|
|
<p class="glow-army__number">02</p>
|
|
<h3 class="glow-army__card-title">{{ 'glow_army.steps.two_title' | t }}</h3>
|
|
<p class="glow-army__card-text">{{ 'glow_army.steps.two_text' | t }}</p>
|
|
</li>
|
|
<li class="glow-army__step">
|
|
<p class="glow-army__number">03</p>
|
|
<h3 class="glow-army__card-title">{{ 'glow_army.steps.three_title' | t }}</h3>
|
|
<p class="glow-army__card-text">{{ 'glow_army.steps.three_text' | t }}</p>
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
<div class="glow-army__block">
|
|
<h2 class="glow-army__heading">{{ earn_heading }}</h2>
|
|
<ul class="glow-army__cards">
|
|
<li class="glow-army__card">
|
|
<span class="glow-army__icon" aria-hidden="true"><svg width="32" height="32" viewBox="0 0 32 32" fill="none"><rect x="8" y="11" width="16" height="13" rx="2.2" stroke="currentColor" stroke-width="1.4"/><path d="M12.5 11V9.8a3.5 3.5 0 0 1 7 0V11" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/><path d="M16 16.2v3.2" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/></svg></span>
|
|
<h3 class="glow-army__card-title">{{ 'glow_army.earn_items.order_title' | t }}</h3>
|
|
<p class="glow-army__card-text">{{ 'glow_army.earn_items.order_text' | t }}</p>
|
|
</li>
|
|
<li class="glow-army__card">
|
|
<span class="glow-army__icon" aria-hidden="true"><svg width="32" height="32" viewBox="0 0 32 32" fill="none"><path d="M6 22.5h20v3.2a2.3 2.3 0 0 1-2.3 2.3H8.3A2.3 2.3 0 0 1 6 25.7v-3.2Z" stroke="currentColor" stroke-width="1.4"/><path d="M6.5 22.5c1.2-1.6 2.2-1.6 3.4 0s2.2 1.6 3.4 0 2.2-1.6 3.4 0 2.2 1.6 3.4 0 2.2-1.6 3.4 0" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/><path d="M16 14.2v8.3M16 8.2c.8 1.3.4 2.4-.6 3.1" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/></svg></span>
|
|
<h3 class="glow-army__card-title">{{ 'glow_army.earn_items.birthday_title' | t }}</h3>
|
|
<p class="glow-army__card-text">{{ 'glow_army.earn_items.birthday_text' | t }}</p>
|
|
</li>
|
|
<li class="glow-army__card">
|
|
<span class="glow-army__icon" aria-hidden="true"><svg width="32" height="32" viewBox="0 0 32 32" fill="none"><path d="M8.5 10.5h9.2a3 3 0 0 1 3 3v4.2a3 3 0 0 1-3 3H14l-3.2 2.6v-2.6H8.5a3 3 0 0 1-3-3v-4.2a3 3 0 0 1 3-3Z" stroke="currentColor" stroke-width="1.4"/><path d="M16.2 12.2h7.3a3 3 0 0 1 3 3v3.4a3 3 0 0 1-3 3h-.4" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/></svg></span>
|
|
<h3 class="glow-army__card-title">{{ 'glow_army.earn_items.review_title' | t }}</h3>
|
|
<p class="glow-army__card-text">{{ 'glow_army.earn_items.review_text' | t }}</p>
|
|
</li>
|
|
<li class="glow-army__card">
|
|
<span class="glow-army__icon" aria-hidden="true"><svg width="32" height="32" viewBox="0 0 32 32" fill="none"><rect x="8" y="6.5" width="16" height="19" rx="2" stroke="currentColor" stroke-width="1.4"/><path d="M12 12.5h8M12 16.5h8M12 20.5h5" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/></svg></span>
|
|
<h3 class="glow-army__card-title">{{ 'glow_army.earn_items.profile_title' | t }}</h3>
|
|
<p class="glow-army__card-text">{{ 'glow_army.earn_items.profile_text' | t }}</p>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="glow-army__block">
|
|
<h2 class="glow-army__heading">{{ redeem_heading }}</h2>
|
|
<ul class="glow-army__cards">
|
|
<li class="glow-army__card"><h3 class="glow-army__card-title">{{ 'glow_army.rewards.rate_title' | t }}</h3><p class="glow-army__card-text">{{ 'glow_army.rewards.rate_text' | t }}</p></li>
|
|
<li class="glow-army__card"><h3 class="glow-army__card-title">{{ 'glow_army.rewards.off_50_title' | t }}</h3><p class="glow-army__card-text">{{ 'glow_army.rewards.off_50_text' | t }}</p></li>
|
|
<li class="glow-army__card"><h3 class="glow-army__card-title">{{ 'glow_army.rewards.balm_title' | t }}</h3><p class="glow-army__card-text">{{ 'glow_army.rewards.balm_text' | t }}</p></li>
|
|
<li class="glow-army__card"><h3 class="glow-army__card-title">{{ 'glow_army.rewards.off_100_title' | t }}</h3><p class="glow-army__card-text">{{ 'glow_army.rewards.off_100_text' | t }}</p></li>
|
|
<li class="glow-army__card"><h3 class="glow-army__card-title">{{ 'glow_army.rewards.toner_title' | t }}</h3><p class="glow-army__card-text">{{ 'glow_army.rewards.toner_text' | t }}</p></li>
|
|
<li class="glow-army__card"><h3 class="glow-army__card-title">{{ 'glow_army.rewards.off_200_title' | t }}</h3><p class="glow-army__card-text">{{ 'glow_army.rewards.off_200_text' | t }}</p></li>
|
|
<li class="glow-army__card"><h3 class="glow-army__card-title">{{ 'glow_army.rewards.off_300_title' | t }}</h3><p class="glow-army__card-text">{{ 'glow_army.rewards.off_300_text' | t }}</p></li>
|
|
<li class="glow-army__card"><h3 class="glow-army__card-title">{{ 'glow_army.rewards.sunscreen_title' | t }}</h3><p class="glow-army__card-text">{{ 'glow_army.rewards.sunscreen_text' | t }}</p></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="glow-army__referral">
|
|
<div class="glow-army__referral-copy">
|
|
<h2 class="glow-army__referral-title">{{ referral_heading }}</h2>
|
|
<p class="glow-army__intro">{{ referral_text }}</p>
|
|
<a class="glow-army__button glow-army__button--fill" href="{{ referral_url }}">{{ referral_button }}</a>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
|
|
|