Section
App Optimiztion
0 个模板实例,2 个 section 配置,1 类 block。
真实模板变体
当前模板未直接使用该 section。
Schema
{
"name": "App Optimiztion",
"settings": [
{
"type": "checkbox",
"id": "enable",
"label": "Enable App Optimization?",
"default": true
},
{
"type": "checkbox",
"id": "debug_enable",
"label": "Enable debug?",
"default": false,
"info": "Output script loading information in console.log"
}
],
"blocks": [
{
"type": "app",
"name": "Application",
"settings": [
{
"type": "text",
"id": "title",
"label": "App title"
},
{
"type": "text",
"id": "url",
"label": "App ScriptTag URL",
"placeholder": "e.g. shopifycdn.com/assets/v4/spr.js",
"info": "Use partial URL, e.g: shopifycdn.com/assets/v4/spr.js"
},
{
"type": "header",
"content": "Block script from loading"
},
{
"type": "paragraph",
"content": "On selected pages, the app will not be loaded"
},
{
"type": "checkbox",
"id": "block_index",
"label": "Index"
},
{
"type": "checkbox",
"id": "block_product",
"label": "Product"
},
{
"type": "checkbox",
"id": "block_collection",
"label": "Collection"
},
{
"type": "checkbox",
"id": "block_page",
"label": "Page"
},
{
"type": "checkbox",
"id": "block_blog",
"label": "Blog"
},
{
"type": "checkbox",
"id": "block_article",
"label": "Article"
},
{
"type": "checkbox",
"id": "block_cart",
"label": "Cart"
},
{
"type": "checkbox",
"id": "block_search",
"label": "Search"
},
{
"type": "checkbox",
"id": "block_customers",
"label": "Customers"
},
{
"type": "checkbox",
"id": "block_gift_card",
"label": "Gift card"
},
{
"type": "header",
"content": "Load script on user page scroll"
},
{
"type": "paragraph",
"content": "On selected pages, the app will start to load when the user scrolls the page."
},
{
"type": "checkbox",
"id": "scroll_index",
"label": "Index"
},
{
"type": "checkbox",
"id": "scroll_product",
"label": "Product"
},
{
"type": "checkbox",
"id": "scroll_collection",
"label": "Collection"
},
{
"type": "checkbox",
"id": "scroll_page",
"label": "Page"
},
{
"type": "checkbox",
"id": "scroll_blog",
"label": "Blog"
},
{
"type": "checkbox",
"id": "scroll_article",
"label": "Article"
},
{
"type": "checkbox",
"id": "scroll_cart",
"label": "Cart"
},
{
"type": "checkbox",
"id": "scroll_search",
"label": "Search"
},
{
"type": "checkbox",
"id": "scroll_customers",
"label": "Customers"
},
{
"type": "checkbox",
"id": "scroll_gift_card",
"label": "Gift card"
},
{
"type": "header",
"content": "Load script on user interaction"
},
{
"type": "paragraph",
"content": "On selected pages, the app will start to load when the user will trigger the assigned events."
},
{
"type": "checkbox",
"id": "interaction_index",
"label": "Index"
},
{
"type": "checkbox",
"id": "interaction_product",
"label": "Product"
},
{
"type": "checkbox",
"id": "interaction_collection",
"label": "Collection"
},
{
"type": "checkbox",
"id": "interaction_page",
"label": "Page"
},
{
"type": "checkbox",
"id": "interaction_blog",
"label": "Blog"
},
{
"type": "checkbox",
"id": "interaction_article",
"label": "Article"
},
{
"type": "checkbox",
"id": "interaction_cart",
"label": "Cart"
},
{
"type": "checkbox",
"id": "interaction_search",
"label": "Search"
},
{
"type": "checkbox",
"id": "interaction_customers",
"label": "Customers"
},
{
"type": "checkbox",
"id": "interaction_gift_card",
"label": "Gift card"
},
{
"type": "header",
"content": "User interaction event 1"
},
{
"type": "text",
"id": "interaction_selectors_1",
"label": "CSS selectors list",
"info": "Comma separated CSS selectors",
"placeholder": ".btn, .menu"
},
{
"type": "select",
"id": "interaction_event_1",
"label": "Interaction event name",
"options": [
{
"value": "click",
"label": "click"
},
{
"value": "mousedown",
"label": "mousedown"
},
{
"value": "mouseup",
"label": "mouseup"
},
{
"value": "focus",
"label": "focus"
}
],
"default": "click"
},
{
"type": "header",
"content": "User interaction event 2"
},
{
"type": "text",
"id": "interaction_selectors_2",
"label": "CSS selectors list",
"info": "Comma separated CSS selectors",
"placeholder": ".btn, .menu"
},
{
"type": "select",
"id": "interaction_event_2",
"label": "Interaction event name",
"options": [
{
"value": "click",
"label": "click"
},
{
"value": "mousedown",
"label": "mousedown"
},
{
"value": "mouseup",
"label": "mouseup"
},
{
"value": "focus",
"label": "focus"
}
],
"default": "click"
}
]
}
],
"presets": []
}