Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 116 additions & 0 deletions sections/custom-features.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
{%- style -%}
#CustomFeatures-{{ section.id }} .custom-features__grid {
display: grid;
gap: 2rem;
grid-template-columns: repeat({{ section.settings.columns | default: 3 }}, 1fr);
}

@media screen and (max-width: 749px) {
#CustomFeatures-{{ section.id }} .custom-features__grid {
grid-template-columns: 1fr;
}
}
{%- endstyle -%}

<div id="CustomFeatures-{{ section.id }}" class="page-width section-{{ section.id }}-padding" data-cascade>

{%- if section.settings.heading != blank -%}
<h2 class="title">{{ section.settings.heading }}</h2>
{%- endif -%}

{%- if section.settings.show_subheading and section.settings.subheading != blank -%}
<p class="subtitle">{{ section.settings.subheading }}</p>
{%- endif -%}

{%- if section.blocks.size > 0 -%}
<div class="custom-features__grid">
{%- for block in section.blocks -%}
<div
class="custom-features__item scroll-trigger animate--slide-in"
{{ block.shopify_attributes }}
data-cascade
style="--animation-order: {{ forloop.index }};"
>
{% render 'feature-card',
icon: block.settings.icon,
title: block.settings.title,
text: block.settings.text %}
</div>
{%- endfor -%}
</div>
{%- endif -%}

</div>

{% schema %}
{
"name": "Переваги",
"tag": "section",
"class": "section",
"settings": [
{
"type": "text",
"id": "heading",
"default": "Чому саме ми",
"label": "Заголовок"
},
{
"type": "checkbox",
"id": "show_subheading",
"default": false,
"label": "Показати підзаголовок"
},
{
"type":"textarea",
"id": "subheading",
"label": "Підзаголовок",
"visible_if": "{{ section.settings.show_subheading }}"
},
{
"type": "range",
"id": "columns",
"min": 2,
"max": 4,
"step": 1,
"default": 3,
"label": "Колонок на десктопі"
}
],
"blocks": [
{
"type": "feature",
"name": "Перевага",
"limit": 6,
"settings": [
{
"type": "image_picker",
"id": "icon",
"label": "Іконка"
},
{
"type": "text",
"id": "title",
"default": "Назва переваги",
"label": "Назва"
},
{
"type": "textarea",
"id": "text",
"default": "Короткий опис переваги.",
"label": "Опис"
}
]
}
],
"presets": [
{
"name": "Переваги",
"blocks": [
{ "type": "feature" },
{ "type": "feature" },
{ "type": "feature" }
]
}
]
}
{% endschema %}
11 changes: 11 additions & 0 deletions sections/footer.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@
{%- if section.settings.newsletter_heading != blank -%}
<h2 class="footer-block__heading inline-richtext">{{ section.settings.newsletter_heading }}</h2>
{%- endif -%}
{%- if section.settings.newsletter_subheading != blank -%}
<div class="footer-block__newsletter-subheading rte">
{{ section.settings.newsletter_subheading }}
</div>
{%- endif -%}
{%- form 'customer', id: 'ContactFooter', class: 'footer__newsletter newsletter-form' -%}
<input type="hidden" name="contact[tags]" value="newsletter">
<div class="newsletter-form__field-wrapper">
Expand Down Expand Up @@ -447,6 +452,12 @@
"default": "t:sections.footer.settings.newsletter_heading.default",
"label": "t:sections.footer.settings.newsletter_heading.label"
},
{
"type": "richtext",
"id": "newsletter_subheading",
"default": "<p>Отримуйте новини першими</p>",
"label": "Підзаголовок розсилки"
},
{
"type": "header",
"content": "t:sections.footer.settings.header__9.content"
Expand Down
26 changes: 26 additions & 0 deletions snippets/feature-card.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{%- comment -%}
Картка переваги.

Параметри:
- icon {Image} іконка (опційно)
- title {String} заголовок
- text {String} опис
{%- endcomment -%}

{%- if icon != blank -%}
<img
src="{{ icon | image_url: width: 96 }}"
alt="{{ icon.alt | escape }}"
width="48"
height="48"
loading="lazy"
>
{%- endif -%}

{%- if title != blank -%}
<h3 class="custom-features__title">{{ title }}</h3>
{%- endif -%}

{%- if text != blank -%}
<p class="custom-features__text">{{ text }}</p>
{%- endif -%}
Loading