- 启用和下拉代码
启用 : theme watch --allow-live
下拉 : theme get
- 常用代码
{% for block in section.blocks %}
{{block.settings.product_name}}
{% endfor %}
{% if form.context == 'footer' %}
{% endif %}
<img src="{{ block.settings.product_img | img_url: 'master' }}" alt="" class="lazyload mobile-hide">
{{ section.settings.header }}
- css
@media screen and (min-width: 769px) {
.more_deals_wrap {
padding-bottom: 4.5vw;
background: #F5F5F7;
}
.more_deals_wrap .more_deals_header {
padding: 4.5vw 0;
text-align: center;
}
.more_deals_wrap .more_deals_item {
max-width: 1400px;
display: flex;
justify-content: space-between;
}
.more_deals_wrap .content_one {
width: calc(25% - 1vw);
box-sizing: border-box;
max-height: 310px;
padding-bottom: 2vw;
border: 1px solid #DEDEDE;
background-color: #fff;
}
}
@media screen and (max-width: 768px) {}
- schema设置
{% schema %}
{
"name": "more deals",
"settings": [
{
"type": "text",
"id": "header",
"label": "more deals header"
}
],
"blocks": [
{
"type": "more",
"name": "they_saying items",
"limit": 4,
"settings": [
{
"type": "image_picker",
"id": "product_img",
"label": "item image"
},
{
"type": "text",
"id": "product_name",
"label": "item name"
},
{
"type": "url",
"id": "product_url",
"label": "item link"
}
]
}
],
"presets": [{
"name": "more deals"
}]
}
{% endschema %}