{% assign video_type = section.settings.video.type | default: 'youtube' %} {% assign video_id = section.settings.video.id | default: '_9VUPq3SxOc' %} {% assign overlay_color = section.settings.overlay_color %} {% assign overlay_color_opacity = section.settings.overlay_color_opacity %} {% assign overlay_opacity_constrained = overlay_color_opacity | times: 0.01 %} {% assign overlay_color_with_opacity = overlay_color | color_modify: 'alpha', overlay_opacity_constrained %}
{% if section.settings.title != blank or section.settings.text != blank %}
{% if section.settings.title != blank %}

{{ section.settings.title }}

{% endif %} {% if section.settings.text != blank %}
{{ section.settings.text }}
{% endif %}
{% endif %}
{% if section.settings.overlay_show %}
{% if section.settings.overlay_heading != blank or section.settings.overlay_text != blank %}
{% if section.settings.overlay_heading != blank %}

{{ section.settings.overlay_heading }}

{% endif %} {% if section.settings.overlay_text != blank %}
{{ section.settings.overlay_text }}
{% endif %}
{% endif %}
{% endif %}
{% schema %} { "name": "Video", "class": "pxs-video-section", "settings": [ { "type": "text", "id": "title", "label": "Heading", "default": "Video" }, { "type": "richtext", "id": "text", "label": "Text", "default": "

Enhance your home page with a video that relates to your process, products, or story.

" }, { "type": "header", "content": "Video" }, { "type": "video_url", "id": "video", "label": "YouTube or Vimeo link", "accept": ["youtube", "vimeo"], "default": "https://www.youtube.com/watch?v=_9VUPq3SxOc" }, { "type": "select", "id": "aspect_ratio", "label": "Aspect ratio", "options": [ { "label": "16:9", "value": "16-9" }, { "label": "21:9", "value": "21-9" } ], "default": "16-9" }, { "type": "checkbox", "id": "autoplay", "label": "Autoplay", "default": false }, { "type": "header", "content": "Overlay" }, { "type": "checkbox", "id": "overlay_show", "label": "Show overlay", "default": false }, { "type": "text", "id": "overlay_heading", "label": "Heading", "default": "Video" }, { "type": "richtext", "id": "overlay_text", "label": "Text", "default": "

Enhance your home page with a video that relates to your process, products, or story.

" }, { "type": "select", "id": "overlay_header_position", "label": "Heading and text position", "options": [ { "label": "Above button", "value": "above-button" }, { "label": "Below button", "value": "below-button" } ], "default": "above-button" }, { "type": "color", "id": "overlay_header_color", "label": "Text color", "default": "#FFFFFF" }, { "type": "color", "id": "overlay_color", "label": "Background color", "default": "#000000" }, { "type": "range", "id": "overlay_color_opacity", "label": "Background color opacity", "min": 0, "max": 100, "step": 1, "unit": "%", "default": 50 }, { "type": "image_picker", "id": "overlay_image", "label": "Image" }, { "type": "select", "id": "overlay_image_position", "label": "Image position", "options": [ { "label": "Left Top", "value": "left-top" }, { "label": "Left Center", "value": "left-center" }, { "label": "Left Bottom", "value": "left-bottom" }, { "label": "Center Top", "value": "center-top" }, { "label": "Center", "value": "center-center" }, { "label": "Center Bottom", "value": "center-bottom" }, { "label": "Right Top", "value": "right-top" }, { "label": "Right Center", "value": "right-center" }, { "label": "Right Bottom", "value": "right-bottom" } ], "default": "center-center", "info": "Adjust the focal point of the image. Note: This setting will not have much of an impact if your background image's dimensions are roughly the same size as the section." }, { "type": "select", "id": "overlay_button_style", "label": "Button style", "options": [ { "label": "Primary", "value": "primary" }, { "label": "Secondary", "value": "secondary" } ], "default": "primary" } ], "presets": [ { "category": "Video", "name": "Video" } ] } {% endschema %}