diff --git a/themes/aura/sections/desktop-slider.liquid b/themes/aura/sections/desktop-slider.liquid index 43ab00a3..be4e15a3 100644 --- a/themes/aura/sections/desktop-slider.liquid +++ b/themes/aura/sections/desktop-slider.liquid @@ -4,7 +4,7 @@ .section-slider-{{ id }} #yc_slider_{{ id }} .splide__arrow { --slider-height: {{- section.settings.slider_height_percentage -}}vh; } - + .section-slider-{{ id }} #yc_slider_{{ id }} .splide__arrow { background: {{ section.settings.slider_desktop_arrows_background_color.hex }} !important; width: 54px; @@ -271,9 +271,15 @@ { "type": "image_picker", "id": "image", - "label": "Image", + "label": "🖥 Desktop Image", "info": "To ensure your images look great and load quickly, use a size of \"1920px x 1080px\" (16:9 aspect ratio)." }, + { + "type": "image_picker", + "id": "mobile_image", + "label": "📱 Mobile Image", + "info": "To ensure your images look great and load quickly, use a size of \"500 x 500px\" (1:1 aspect ratio)." + }, { "type": "richtext", "id": "caption", diff --git a/themes/aura/snippets/slider.liquid b/themes/aura/snippets/slider.liquid index 8a03c70f..56f5c7d8 100644 --- a/themes/aura/snippets/slider.liquid +++ b/themes/aura/snippets/slider.liquid @@ -16,26 +16,38 @@ margin-top: 1rem; } -{% for block in blocks %} - #yc_slider_{{ id }} .btn-{{ forloop.index }} { - {% if block.settings.button_font_weight %} - font-weight: {{ block.settings.button_font_weight }}; - {% endif %} - {% if block.settings.button_bg_color %} - background-color: {{ block.settings.button_bg_color.hex }} !important; - {% endif %} - {% if block.settings.button_color %} - color: {{ block.settings.button_color.hex }} !important; - {% endif %} - } -{% endfor %} - + {% for block in blocks %} + #yc_slider_{{ id }} .btn-{{ forloop.index }} { + {% if block.settings.button_font_weight %} + font-weight: {{ block.settings.button_font_weight }}; + {% endif %} + {% if block.settings.button_bg_color %} + background-color: {{ block.settings.button_bg_color.hex }} !important; + {% endif %} + {% if block.settings.button_color %} + color: {{ block.settings.button_color.hex }} !important; + {% endif %} + } + + #yc_slider_{{ id }} .hero-image-{{ forloop.index }} { + background: center center / cover no-repeat url('{%- if block.settings.image.src -%} {{ block.settings.image.src }} {%- else -%} {{ 'hero.png' | asset_url }} {%- endif -%}'); + } + + {%- if block.settings.mobile_image.src -%} + @media screen and (max-width: 768px) { + #yc_slider_{{ id }} .hero-image-{{ forloop.index }} { + background: center center / cover no-repeat url('{{ block.settings.mobile_image.src }}'); + } + } + {%- endif -%} + {% endfor %} +
@@ -44,8 +56,8 @@ {%- for block in blocks %} {% assign count = count | plus: 1 %}
  • {%- if block.settings.caption %} diff --git a/themes/harmony/assets/desktop-slider.css b/themes/harmony/assets/desktop-slider.css index 4bdac0b5..0893d582 100644 --- a/themes/harmony/assets/desktop-slider.css +++ b/themes/harmony/assets/desktop-slider.css @@ -1,6 +1,11 @@ .splide{ height:var(--mobile-height); } +@media (min-width: 768px){ + .splide{ + height:var(--desktop-height); + } +} .splide .splide__arrow{ margin:0 100px; } @@ -23,9 +28,6 @@ display:none; } @media (min-width: 768px){ - .splide{ - height:var(--desktop-height); - } .yc-slider__desktop{ display:block; } diff --git a/themes/harmony/sections/desktop-slider.liquid b/themes/harmony/sections/desktop-slider.liquid index a8528197..681af38c 100644 --- a/themes/harmony/sections/desktop-slider.liquid +++ b/themes/harmony/sections/desktop-slider.liquid @@ -261,9 +261,15 @@ { "type": "image_picker", "id": "image", - "label": "Image", + "label": "🖥 Desktop Image", "info": "To ensure your images look great and load quickly, use a size of \"1920px x 1080px\" (16:9 aspect ratio)." }, + { + "type": "image_picker", + "id": "mobile_image", + "label": "📱 Mobile Image", + "info": "To ensure your images look great and load quickly, use a size of \"500 x 500px\" (1:1 aspect ratio)." + }, { "type": "richtext", "id": "caption", diff --git a/themes/harmony/snippets/slider.liquid b/themes/harmony/snippets/slider.liquid index 55b76153..a700969a 100644 --- a/themes/harmony/snippets/slider.liquid +++ b/themes/harmony/snippets/slider.liquid @@ -1,44 +1,56 @@ {% assign count = 0 %}
    @@ -47,8 +59,8 @@ {%- for block in blocks %} {% assign count = count | plus: 1 %}
  • {%- if block.settings.caption %} diff --git a/themes/meraki/assets/desktop-slider.css b/themes/meraki/assets/desktop-slider.css index 1adb1a36..b0669269 100644 --- a/themes/meraki/assets/desktop-slider.css +++ b/themes/meraki/assets/desktop-slider.css @@ -1,6 +1,12 @@ .splide{ height:var(--mobile-height); } +@media (min-width: 768px){ + .splide{ + height:var(--desktop-height); + } +} + .slider-container{ max-width:1440px; margin:0 auto; @@ -25,9 +31,6 @@ display:none; } @media (min-width: 768px){ - .splide{ - height:var(--desktop-height); - } .yc-slider__desktop{ display:block; } diff --git a/themes/meraki/assets/default-hero.png b/themes/meraki/assets/hero.png similarity index 100% rename from themes/meraki/assets/default-hero.png rename to themes/meraki/assets/hero.png diff --git a/themes/meraki/sections/desktop-slider.liquid b/themes/meraki/sections/desktop-slider.liquid index 09a4f0be..109d46f3 100644 --- a/themes/meraki/sections/desktop-slider.liquid +++ b/themes/meraki/sections/desktop-slider.liquid @@ -287,9 +287,15 @@ { "type": "image_picker", "id": "image", - "label": "Image", + "label": "🖥 Desktop Image", "info": "To ensure your images look great and load quickly, use a size of \"1920px x 1080px\" (16:9 aspect ratio)." }, + { + "type": "image_picker", + "id": "mobile_image", + "label": "📱 Mobile Image", + "info": "To ensure your images look great and load quickly, use a size of \"500 x 500px\" (1:1 aspect ratio)." + }, { "type": "richtext", "id": "caption", diff --git a/themes/meraki/snippets/slider.liquid b/themes/meraki/snippets/slider.liquid index ee370847..ddace505 100644 --- a/themes/meraki/snippets/slider.liquid +++ b/themes/meraki/snippets/slider.liquid @@ -1,42 +1,54 @@ {% assign count = 0 %}
    @@ -45,8 +57,8 @@ {%- for block in blocks %} {% assign count = count | plus: 1 %}
  • {%- if block.settings.caption %}