From 13b2b2b81a0a8906cdbafec0cd4c4303ecce96c5 Mon Sep 17 00:00:00 2001 From: Ludo Segura Date: Mon, 31 Jan 2022 14:56:46 -0500 Subject: [PATCH 01/51] Feat. collection updates --- locales/en.default.schema.json | 46 ++++++++++++ sections/featured-collection.liquid | 111 +++++++++++++++++++++++++--- 2 files changed, 148 insertions(+), 9 deletions(-) diff --git a/locales/en.default.schema.json b/locales/en.default.schema.json index a4c7e477224..8c38ccff33f 100644 --- a/locales/en.default.schema.json +++ b/locales/en.default.schema.json @@ -578,6 +578,52 @@ "title": { "label": "Heading" }, + "title_size": { + "label": "Heading size", + "options__1":{ + "label": "Small" + }, + "options__2":{ + "label": "Medium" + }, + "options__3":{ + "label": "Large" + } + }, + "vertical_offset": { + "label": "Heading vertical offset" + }, + "horizontal_offset": { + "label": "Heading horizontal offset" + }, + "show_description": { + "label": "Show collection description" + }, + "description": { + "label": "Description", + "info": "Leave blank to use the collection description from the admin" + }, + "description_style": { + "label": "Description style", + "options__1": { + "label": "Body" + }, + "options__2": { + "label": "Subtitle" + } + }, + "heading_alignment": { + "label": "Heading and description alignment", + "options__1": { + "label": "Left" + }, + "options__2": { + "label": "Center" + }, + "options__3": { + "label": "Right" + } + }, "collection": { "label": "Collection" }, diff --git a/sections/featured-collection.liquid b/sections/featured-collection.liquid index 7b6e15bc891..f00acf7889a 100644 --- a/sections/featured-collection.liquid +++ b/sections/featured-collection.liquid @@ -33,15 +33,19 @@
{% unless section.settings.title == blank %} - {% endunless %} - +
    {%- for product in section.settings.collection.products limit: section.settings.products_to_show -%} @@ -75,7 +79,7 @@
{%- endif -%} - + {%- if section.settings.show_view_all and more_in_collection -%}

", + "info": "t:sections.featured-collection.settings.description.info" + }, + { + "type": "select", + "id": "description_style", + "label": "t:sections.featured-collection.settings.description_style.label", + "options": [ + { + "value": "body", + "label": "t:sections.featured-collection.settings.description_style.options__1.label" + }, + { + "value": "subtitle", + "label": "t:sections.featured-collection.settings.description_style.options__2.label" + } + ], + "default": "body" + }, + { + "type": "select", + "id": "heading_alignment", + "label": "t:sections.featured-collection.settings.heading_alignment.label", + "options": [ + { + "value": "left", + "label": "t:sections.featured-collection.settings.heading_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:sections.featured-collection.settings.heading_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:sections.featured-collection.settings.heading_alignment.options__3.label" + } + ], + "default": "left" }, { "type": "range", @@ -230,4 +323,4 @@ } ] } -{% endschema %} \ No newline at end of file +{% endschema %} From e13619e2281c0906e94d097d5b9b6b968ae59b76 Mon Sep 17 00:00:00 2001 From: Ludo Segura Date: Mon, 31 Jan 2022 15:54:57 -0500 Subject: [PATCH 02/51] add uppercase option --- locales/en.default.schema.json | 3 +++ sections/featured-collection.liquid | 16 ++++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/locales/en.default.schema.json b/locales/en.default.schema.json index 8c38ccff33f..b84b8882009 100644 --- a/locales/en.default.schema.json +++ b/locales/en.default.schema.json @@ -610,6 +610,9 @@ }, "options__2": { "label": "Subtitle" + }, + "options__3": { + "label": "Uppercase" } }, "heading_alignment": { diff --git a/sections/featured-collection.liquid b/sections/featured-collection.liquid index f00acf7889a..6ce57665e21 100644 --- a/sections/featured-collection.liquid +++ b/sections/featured-collection.liquid @@ -41,7 +41,7 @@ {%- endif -%} {% if section.settings.show_description %} - {% if section.settings.description == empty %}{{ section.settings.collection.description }}{% else %}{{ section.settings.description }}{% endif %}
+
{% if section.settings.description == empty %}{{ section.settings.collection.description }}{% else %}{{ section.settings.description }}{% endif %}
{% endif %}
{% endunless %} @@ -99,11 +99,6 @@ "tag": "section", "class": "section", "settings": [ - { - "type": "collection", - "id": "collection", - "label": "t:sections.featured-collection.settings.collection.label" - }, { "type": "text", "id": "title", @@ -175,6 +170,10 @@ { "value": "subtitle", "label": "t:sections.featured-collection.settings.description_style.options__2.label" + }, + { + "value": "uppercase", + "label": "t:sections.featured-collection.settings.description_style.options__3.label" } ], "default": "body" @@ -199,6 +198,11 @@ ], "default": "left" }, + { + "type": "collection", + "id": "collection", + "label": "t:sections.featured-collection.settings.collection.label" + }, { "type": "range", "id": "products_to_show", From 2b9742ed62ac0f02a61951436fae5d829df7e408 Mon Sep 17 00:00:00 2001 From: Ludo Segura Date: Tue, 1 Feb 2022 17:18:48 -0500 Subject: [PATCH 03/51] updates to add slider option on desktop --- assets/template-collection.css | 4 ++ locales/en.default.schema.json | 27 ++++++++++ sections/featured-collection.liquid | 78 ++++++++++++++++++++++------- 3 files changed, 91 insertions(+), 18 deletions(-) diff --git a/assets/template-collection.css b/assets/template-collection.css index d26af021f3e..756fcae2bf0 100644 --- a/assets/template-collection.css +++ b/assets/template-collection.css @@ -44,6 +44,10 @@ margin-bottom: 15rem; } +.collection .slider.slider--everywhere .slider__slide { + scroll-snap-align: start; +} + .collection__view-all { margin-top: 2rem; } diff --git a/locales/en.default.schema.json b/locales/en.default.schema.json index b84b8882009..de9ab0268c9 100644 --- a/locales/en.default.schema.json +++ b/locales/en.default.schema.json @@ -636,6 +636,33 @@ "show_view_all": { "label": "Enable \"View all\" button if collection has more products than shown" }, + "view_all_style": { + "label": "View all style", + "options__1": { + "label": "Link" + }, + "options__2": { + "label": "Outline button" + }, + "options__3": { + "label": "Solid button" + } + }, + "carousel_type": { + "label": "Carousel type", + "options__1": { + "label": "None" + }, + "options__2": { + "label": "Tablet down" + }, + "options__3": { + "label": "Everywhere" + } + }, + "enable_desktop_carousel": { + "label": "Enable carousel on desktop" + }, "swipe_on_mobile": { "label": "Enable swipe on mobile" }, diff --git a/sections/featured-collection.liquid b/sections/featured-collection.liquid index 6ce57665e21..7e5dc517713 100644 --- a/sections/featured-collection.liquid +++ b/sections/featured-collection.liquid @@ -35,11 +35,6 @@ {% unless section.settings.title == blank %}