From c84dd120e5725642ae393e265df286111b68ccfa Mon Sep 17 00:00:00 2001 From: samhaslam Date: Tue, 13 Aug 2024 14:19:18 -0600 Subject: [PATCH] updating base intro theme with the new range setting type --- configs/settings_data.json | 8 +-- configs/settings_schema.json | 102 +++++++++-------------------- manifest.json | 2 +- partials/recommended_products.html | 2 +- templates/index.html | 8 +-- 5 files changed, 42 insertions(+), 80 deletions(-) diff --git a/configs/settings_data.json b/configs/settings_data.json index a26d5b0..753f3b6 100644 --- a/configs/settings_data.json +++ b/configs/settings_data.json @@ -35,7 +35,7 @@ "fc_header": "Featured Categories", "fc_header_size": "3", "fc_header_align": "center", - "featured_cats_count": "3", + "featured_cats_count": 3, "fc_text_color": "#ffffff", "fc_overlay": "#000000", "fc_overlay_opacity": 40, @@ -43,13 +43,13 @@ "featured_product": "", "fp_bg_color": "#ffffff", "fp_text_color": "#000000", - "fp_desc": "Lorem ipsum dolor sit amet. Et eligendi vero et labore quia et esse exercitationem est sint sint aut praesentium vero et omnis consequatur et adipisci dolor. Sed facilis galisum qui suscipit voluptas sit maiores omnis.", + "fp_desc": "

Lorem ipsum dolor sit amet. Et eligendi vero et labore quia et esse exercitationem est sint sint aut praesentium vero et omnis consequatur et adipisci dolor. Sed facilis galisum qui suscipit voluptas sit maiores omnis.

", "fp_cta_text": "View Product", "fp_cta_outline": false, "fp_cta_color": "primary", "featured_products": [], "fps_card_bg": "#ffffff", - "featured_products_count": "2", + "featured_products_count": 2, "fps_bg_color": "#ffffff", "fps_header": "Featured Products", "fps_header_size": "3", @@ -64,7 +64,7 @@ "product_description_placement": "column", "product_reviews": true, "recommended_products_card_bg": "#ffffff", - "recommended_products_count": "4", + "recommended_products_count": 4, "recommended_products_bg_color": "#ffffff", "recommended_products_header": "Recommended Products", "recommended_products_header_size": "3", diff --git a/configs/settings_schema.json b/configs/settings_schema.json index c3c268f..bc7f6b8 100644 --- a/configs/settings_schema.json +++ b/configs/settings_schema.json @@ -5,7 +5,7 @@ { "name": "font_script", "label": "Add custom Embed code.", - "type": "textarea", + "type": "html", "help_text": "An embed code is a code snippet generated by a third-party and shared with you to allow you to add code from an external source to your own website." }, { @@ -365,12 +365,14 @@ "help_text": "Overlay Color" }, { - "type": "number", + "type": "range", "name": "hero_overlay_opacity", "label": "Overlay Opacity", "help_text": "Overlay Opacity Percentage %", - "max_value": 100, - "min_value": 0, + "max": 100, + "min": 0, + "step": 1, + "unit": "%", "default": 40 } ], @@ -436,28 +438,14 @@ "default": "Small" }, { - "type": "select", + "type": "range", "name": "featured_cats_count", "label": "Number of columns on desktop", - "options": [ - { - "name": "2", - "value": "2" - }, - { - "name": "3", - "value": "3" - }, - { - "name": "4", - "value": "4" - }, - { - "name": "5", - "value": "5" - } - ], - "default": "3" + "max": 5, + "min": 2, + "step": 1, + "unit": "", + "default": 3 }, { "name": "fc_text_color", @@ -471,12 +459,14 @@ "help_text": "Overlay Color" }, { - "type": "number", + "type": "range", "name": "fc_overlay_opacity", "label": "Overlay Opacity", "help_text": "Overlay Opacity Percentage %", - "max_value": 100, - "min_value": 0, + "max": 100, + "min": 0, + "step": 1, + "unit": "%", "default": 40 } ], @@ -510,7 +500,7 @@ { "name": "fp_desc", "label": "Custom Description", - "type": "text", + "type": "richtext", "max_length": 500 }, { @@ -558,28 +548,14 @@ "default": "#ffffff" }, { - "type": "select", + "type": "range", "name": "featured_products_count", "label": "Number of columns on desktop", - "options": [ - { - "name": "2", - "value": "2" - }, - { - "name": "3", - "value": "3" - }, - { - "name": "4", - "value": "4" - }, - { - "name": "5", - "value": "5" - } - ], - "default": "4" + "max": 5, + "min": 2, + "step": 1, + "unit": "", + "default": 2 }, { "name": "fps_bg_color", @@ -769,28 +745,14 @@ "help_text": "If left blank will be transparent" }, { - "type": "select", + "type": "range", "name": "recommended_products_count", "label": "Number of columns on desktop", - "options": [ - { - "name": "2", - "value": "2" - }, - { - "name": "3", - "value": "3" - }, - { - "name": "4", - "value": "4" - }, - { - "name": "5", - "value": "5" - } - ], - "default": "4" + "max": 5, + "min": 2, + "step": 1, + "unit": "", + "default": 4 }, { "name": "recommended_products_bg_color", @@ -1139,7 +1101,7 @@ "name": "site_disclaimer", "label": "Site Disclaimer", "help_text": "Add a site disclaimer", - "type": "textarea" + "type": "richtext" } ] @@ -1207,4 +1169,4 @@ } ] } -} +} \ No newline at end of file diff --git a/manifest.json b/manifest.json index cc39b12..30f753c 100644 --- a/manifest.json +++ b/manifest.json @@ -1,4 +1,4 @@ { "name": "Intro Bootstrap", - "version": "1.1.1" + "version": "1.1.2" } diff --git a/partials/recommended_products.html b/partials/recommended_products.html index 953fa0a..fe92b4a 100644 --- a/partials/recommended_products.html +++ b/partials/recommended_products.html @@ -13,7 +13,7 @@

{% t "store.catal {% endif %} -
+
{% for product in product.sorted_recommended_products %} {% purchase_info_for_product request product as session %} {% if session.availability.is_available_to_buy %} diff --git a/templates/index.html b/templates/index.html index c35ac21..c154074 100644 --- a/templates/index.html +++ b/templates/index.html @@ -7,13 +7,13 @@ :root { --hero-text-color: {{ settings.hero_text_color }}; --hero-overlay: {{ settings.hero_overlay }}; - --hero-overlay-opacity: {{ settings.hero_overlay_opacity }}%; + --hero-overlay-opacity: {{ settings.hero_overlay_opacity }}; --hero-bg-size: {{ settings.hero_bg_size }}; --hero-bg-color: {{ settings.hero_bg_color }}; --fc-bg-color: {{ settings.fc_bg_color }}; --fc-text-color: {{ settings.fc_text_color }}; --fc-overlay: {{ settings.fc_overlay }}; - --fc-overlay-opacity: {{ settings.fc_overlay_opacity }}%; + --fc-overlay-opacity: {{ settings.fc_overlay_opacity }}; --fp-bg-color: {{ settings.fp_bg_color }}; --fp-text-color: {{ settings.fp_text_color }}; --fps-bg-color: {{ settings.fps_bg_color }}; @@ -79,7 +79,7 @@

{{ settings.fc_header }}

{% endif %} -
+
{% for category in settings.featured_categories %}
@@ -152,7 +152,7 @@

{{ settings.fps_header }}

{% endif %} -
+
{% for product in settings.featured_products %} {% purchase_info_for_product request product as session %} {% if session.availability.is_available_to_buy %}