{% if section.settings.template-type == 'template-stories' %}
{% assign min_height = 140 %}
{% else %}
{% assign min_height = section.settings.min-height %}
{% endif %}
{% assign widget_id = section.settings.widget-identity | default: 'wgt_default' %}
<div class="whatmore-base" data-wht-widget="{{ widget_id }}" style="position: relative; overflow: hidden; min-height:{{ min_height }}px">
<div id="whatmoreShopId" data-wh="{{ shop.id }}"> </div>
<div id="whatmoreProductId" data-wh="{{ product.id }}"> </div>
{%- if section.settings.heading -%}
<div id="whatmoreHeading" data-wh="{{ section.settings.heading }}"> </div>
{%- endif -%}
{%- if section.settings.color-primary -%}
<div id="whatmorePrimaryColor" data-wh="{{ section.settings.color-primary }}"> </div>
{%- endif -%}
{%- if section.settings.color-secondary -%}
<div id="whatmoreSecondaryColor" data-wh="{{ section.settings.color-secondary }}"> </div>
{%- endif -%}
{%- if section.settings.title-font-size -%}
<div id="whatmoreTitleFontSize" data-wh="{{ section.settings.title-font-size }}"> </div>
{%- endif -%}
{%- if section.settings.title-font-size-portrait -%}
<div id="whatmoreTitleFontSizePortrait" data-wh="{{ section.settings.title-font-size-portrait }}"> </div>
{%- endif -%}
{%- if section.settings.landscape-padding -%}
<div id="whatmoreLandscapePadding" data-wh="{{ section.settings.landscape-padding }}"> </div>
{%- endif -%}
{%- if section.settings.top-bottom-padding -%}
<div id="whatmoreTopBottomPadding" data-wh="{{ section.settings.top-bottom-padding }}"> </div>
{%- endif -%}
{%- if section.settings.scroll-video-tile-size -%}
<div id="whatmoreVideoTileSize" data-wh="{{ section.settings.scroll-video-tile-size }}"> </div>
{%- endif -%}
{%- if section.settings.scroll-video-tile-size-portrait -%}
<div id="whatmoreVideoTileSizePortrait" data-wh="{{ section.settings.scroll-video-tile-size-portrait }}"> </div>
{%- endif -%}
{%- if section.settings.title-font -%}
{% assign title_font = section.settings.title-font %}
<div id="whatmoreTitleFont" data-wh={{title_font}}> </div>
{%- endif -%}
{%- if section.settings.primary-font -%}
{% assign primary_font = section.settings.primary-font %}
<div id="whatmorePrimaryFont" data-wh={{primary_font}}> </div>
{%- endif -%}
{%- if section.settings.show-views -%}
<div id="whatmoreShowViews" data-wh="{{ section.settings.show-views }}"> </div>
{%- endif -%}
{%- if section.settings.template-type -%}
<div class="whatmore-template-type" data-wh="{{ section.settings.template-type }}"> </div>
{%- endif -%}
<div id="whatmoreWidgetIdentity" data-wh="{{ widget_id }}"> </div>
{% if request.design_mode %}
<div id="whatmoreIsInDesignMode" data-wh='true'> </div>
{% else %}
<div id="whatmoreIsInDesignMode" data-wh='false'> </div>
{% endif %}
<div id="whatmoreExtensionType" data-wh="{{ template }}"> </div>
<div class="whatmore-widget" data-wh="carousel"></div>
<div class="whatmore-render-root"></div>
</div>
{% schema %}
{
"name": "Whatmore Carousel",
"tag": "section",
"class": "section",
"settings": [
{
"type": "text",
"id": "heading",
"label": "Heading",
"default": "Watch and Buy"
},
{
"type": "text",
"id": "widget-identity",
"label": "Widget ID",
"default": "wgt_default",
"info": "Paste the widget ID from whatmore dashboard. Leave empty for default carousel."
},
{
"type": "select",
"id": "template-type",
"label": "Tile Type",
"info": "Note: '2 tiles' and '3 tiles' refer to the layout in mobile view",
"options": [
{
"value": "template-a",
"label": "Video Card-Img & Transparent Text Overlay-3 tiles"
},
{
"value": "template-g",
"label": "Video Card-Img & Transparent Text Overlay-2 tiles"
},
{
"value": "template-b",
"label": "Video Card-Img & Opaque Text Overlay-3 tiles"
},
{
"value": "template-e",
"label": "Video Card-Single Tile (No Overlay)"
},
{
"value": "template-h",
"label": "Video Card-Product Info Below tile-3 tiles"
},
{
"value": "template-f",
"label": "Video Card-Product Info Below tile-2 tiles"
},
{
"value": "template-stories",
"label": "Video Card-Story Like Format"
},
{
"value": "template-a-1",
"label": "Video Card Feed-View More"
},
{
"value": "template-feed-a",
"label": "Video Card Feed-On Scroll"
},
{
"value": "template-c",
"label": "Video Card Grid-Theme Border"
},
{
"value": "template-d",
"label": "Video Card Grid-No Border"
},
{
"value": "template-i",
"label": "Video Card 3D Navigation"
},
{
"value": "template-j",
"label": "Video Card Minimal"
}
],
"default": "template-h"
},
{
"type": "range",
"id": "title-font-size",
"min": 8,
"max": 101,
"step": 1,
"unit": "px",
"label": "Heading font size - Landscape (Desktop)",
"default": 40
},
{
"type": "range",
"id": "title-font-size-portrait",
"min": 8,
"max": 101,
"step": 1,
"unit": "px",
"label": "Heading Font size - Portrait (Mobile)",
"default": 24
},
{
"type": "number",
"id": "landscape-padding",
"label": "Horizontal padding in Desktop/Laptop",
"default": 40
},
{
"type": "number",
"id": "top-bottom-padding",
"label": "Vertical padding",
"default": 20
},
{
"type": "range",
"id": "scroll-video-tile-size",
"label": "Scroll-Video-Tile size ( in percentage ) ",
"default": 80,
"step": 1,
"min": 50,
"max": 150
},
{
"type": "range",
"id": "scroll-video-tile-size-portrait",
"label": "Scroll-Video-Tile size mobile ( in percentage ) ",
"default": 80,
"step": 1,
"min": 40,
"max": 130
},
{
"type": "range",
"id": "min-height",
"label": "Minimum Height ( in pixels )",
"default": 380,
"step": 10,
"min": 0,
"max": 1000
}
],
"presets": [
{
"name": "Whatmore Carousel"
}
]
}
{% endschema %}
{% stylesheet %}
{% endstylesheet %}
{% javascript %}
{% endjavascript %}
https://github.com/projectx-tech/whatmorelive/blob/50c5b4146ccfbff352326b5a65c246c27b2e31eb/theme-app-extension-liquid/block-stories.liquid