Section

Image with text

4 个模板实例,20 个 section 配置,7 类 block。

真实模板变体

Schema

{
  "name": "Image with text",
  "class": "section-image-with-text",
  "settings": [
    {
      "type": "image_picker",
      "id": "image",
      "label": "Image",
      "info": "1340 x 1340 .jpg recommended."
    },
    {
      "type": "header",
      "content": "Video"
    },
    {
      "type": "checkbox",
      "id": "use_video",
      "default": false,
      "label": "Use video instead of image"
    },
    {
      "type": "video_url",
      "id": "video",
      "label": "Video URL",
      "accept": [
        "youtube",
        "vimeo"
      ],
      "placeholder": "Use a YouTube or Vimeo URL",
      "default": "https://www.youtube.com/watch?v=_9VUPq3SxOc",
      "info": "Video plays in a lightbox."
    },
    {
      "type": "video",
      "id": "video_hosted",
      "label": "Shopify-hosted video",
      "info": "Overrides the Video URL setting."
    },
    {
      "type": "checkbox",
      "id": "video_autoplay",
      "default": true,
      "label": "Autoplay",
      "info": "Video will be muted"
    },
    {
      "type": "checkbox",
      "id": "video_controls",
      "default": true,
      "label": "Display video controls"
    },
    {
      "type": "header",
      "content": "Layout"
    },
    {
      "type": "select",
      "id": "height",
      "options": [
        {
          "value": "adapt",
          "label": "Adapt to image"
        },
        {
          "value": "small",
          "label": "Small"
        },
        {
          "value": "large",
          "label": "Large"
        }
      ],
      "default": "adapt",
      "label": "Image height"
    },
    {
      "type": "select",
      "id": "desktop_image_width",
      "options": [
        {
          "value": "small",
          "label": "Small"
        },
        {
          "value": "medium",
          "label": "Medium"
        },
        {
          "value": "large",
          "label": "Large"
        }
      ],
      "default": "medium",
      "label": "Desktop image width",
      "info": "Image is automatically optimized for mobile."
    },
    {
      "type": "select",
      "id": "section_width",
      "options": [
        {
          "value": "grid",
          "label": "Grid"
        },
        {
          "value": "full-width-row",
          "label": "Full width"
        },
        {
          "value": "full-width-row-full",
          "label": "Full width, no spacing"
        }
      ],
      "default": "grid",
      "label": "Section width"
    },
    {
      "type": "select",
      "id": "layout",
      "options": [
        {
          "value": "image_first",
          "label": "Image first"
        },
        {
          "value": "text_first",
          "label": "Image second"
        }
      ],
      "default": "image_first",
      "label": "Desktop image placement",
      "info": "Image first is the default mobile layout."
    },
    {
      "type": "select",
      "id": "content_position",
      "label": "Desktop content alignment",
      "options": [
        {
          "value": "text-center",
          "label": "Center"
        },
        {
          "value": "text-left",
          "label": "Left"
        },
        {
          "value": "text-right",
          "label": "Right"
        }
      ],
      "default": "text-left"
    },
    {
      "type": "header",
      "content": "Colors"
    },
    {
      "type": "color",
      "id": "color_bg",
      "label": "Background",
      "default": "#ffffff"
    },
    {
      "type": "color",
      "id": "color_text",
      "label": "Text",
      "default": "#151515"
    },
    {
      "type": "color",
      "id": "color_border",
      "label": "Borders",
      "default": "#e2e2e2"
    },
    {
      "type": "header",
      "content": "Spacing"
    },
    {
      "type": "checkbox",
      "id": "disable_top_spacing",
      "default": false,
      "label": "Remove top spacing"
    },
    {
      "type": "checkbox",
      "id": "disable_bottom_spacing",
      "default": false,
      "label": "Remove bottom spacing"
    }
  ],
  "blocks": [
    {
      "type": "image",
      "name": "Image",
      "settings": [
        {
          "type": "image_picker",
          "id": "image",
          "label": "Image"
        },
        {
          "type": "checkbox",
          "id": "retina",
          "label": "Enable retina",
          "default": true,
          "info": "Image will be displayed at half the size, making it look crisp on retina screens."
        }
      ]
    },
    {
      "type": "subheading",
      "name": "Subheading",
      "settings": [
        {
          "type": "text",
          "id": "text",
          "label": "Text",
          "default": "Add a tagline"
        }
      ]
    },
    {
      "type": "heading",
      "name": "Heading",
      "settings": [
        {
          "type": "text",
          "id": "text",
          "label": "Text",
          "default": "Image with text"
        },
        {
          "type": "select",
          "id": "heading_size",
          "label": "Size",
          "options": [
            {
              "value": "h1",
              "label": "Extra Large"
            },
            {
              "value": "h2",
              "label": "Large"
            },
            {
              "value": "h3",
              "label": "Medium"
            },
            {
              "value": "h4",
              "label": "Small"
            }
          ],
          "default": "h3"
        }
      ]
    },
    {
      "type": "text",
      "name": "Text",
      "settings": [
        {
          "type": "richtext",
          "id": "text",
          "label": "Content",
          "default": "<p>Pair text with an image to focus on your chosen product, collection, or blog post. Add details on availability, style, or even provide a review.</p>"
        }
      ]
    },
    {
      "type": "button",
      "name": "Button",
      "settings": [
        {
          "id": "button_text",
          "type": "text",
          "label": "Button label",
          "default": "Shop Now",
          "info": "Leave the label blank to hide the button."
        },
        {
          "id": "button_link",
          "type": "url",
          "label": "Button link"
        }
      ]
    },
    {
      "type": "space",
      "name": "Empty space",
      "settings": [
        {
          "type": "range",
          "id": "height",
          "min": 0,
          "max": 100,
          "step": 1,
          "unit": "px",
          "label": "Height",
          "default": 50
        }
      ]
    },
    {
      "type": "collapsible_tab",
      "name": "Collapsible row",
      "settings": [
        {
          "type": "text",
          "id": "heading",
          "default": "Collapsible row",
          "info": "Include a heading that explains the content.",
          "label": "Heading"
        },
        {
          "type": "checkbox",
          "id": "open",
          "default": false,
          "label": "Open by default"
        },
        {
          "type": "richtext",
          "id": "content",
          "label": "Row content"
        },
        {
          "type": "page",
          "id": "page",
          "label": "Row content from page"
        }
      ]
    }
  ],
  "presets": [
    {
      "name": "Image with text",
      "blocks": [
        {
          "type": "subheading"
        },
        {
          "type": "heading"
        },
        {
          "type": "text"
        }
      ]
    }
  ]
}