Hi,
is it possible to add a second button in the video-hero? i will post my hero-video.liquid below. Can you please help to modify it?
Thank you in advance and sorry for my bad english.
{% include 'gravityadmin' %}
{% style %}
.hero--{{ section.id }} .hero__title {
font-size: {{ section.settings.title_size | times: 0.5 }}px;
}
@media only screen and (min-width: 769px) {
.hero--{{ section.id }} .hero__title {
font-size: {{ section.settings.title_size }}px;
}
}
{% endstyle %}
{% if section.settings.video_url contains 'youtube.com/watch' %}
{%- assign video_id = section.settings.video_url | split: 'v=' -%}
{%- assign video_id = video_id[1] | split: '&' | first -%}
{% endif %}
{% if section.settings.video_url contains 'youtu.be/' %}
{%- assign video_id = section.settings.video_url | split: '.be/' -%}
{%- assign video_id = video_id[1] | split: '&' | first -%}
{% endif %}
{% if section.settings.video_url contains 'vimeo.com' %}
{%- assign video_id = section.settings.video_url | split: '.com/' -%}
{%- assign video_id = video_id[1] | split: '/' | first -%}
{% endif %}
{% if section.settings.video_url contains '.mp4' or section.settings.video_url contains '.MP4' %}
{% endif %}
{% if section.settings.video_url contains 'vimeo.com' %}
{% endif %}
{% unless section.settings.title == blank %}
##
{{ section.settings.title | newline_to_br }}
{% endunless %}
{% if section.settings.subheading or section.settings.link %}
{% unless section.settings.subheading == blank %}
{{ section.settings.subheading | escape }}
{% endunless %}
{% if section.settings.link_text != blank %}
{%- assign link_href = section.settings.link -%}
{% if section.settings.link == blank %}
{%- assign link_href = section.settings.video_url -%}
{% endif %}
{%- assign youtube_video_link = false -%}
{%- if link_href contains 'youtube.com/watch' or link_href contains 'youtu.be/' -%}
{%- assign youtube_video_link = true -%}
{%- endif -%}
{%- if youtube_video_link -%}
{%- endif -%}
{{ section.settings.link_text }}
{% endif %}
{% endif %}
{% schema %}
{
"name": "Video hero",
"class": "index-section--hero",
"settings": [
{
"type": "textarea",
"id": "title",
"label": "Heading",
"default": "Bring your\nbrand to life."
},
{
"type": "range",
"id": "title_size",
"label": "Heading text size",
"default": 80,
"min": 40,
"max": 100,
"unit": "px"
},
{
"type": "text",
"id": "subheading",
"label": "Subheading",
"default": "Seamless hero videos"
},
{
"type": "text",
"id": "link_text",
"label": "Button text",
"default": "Optional button"
},
{
"type": "url",
"id": "link",
"label": "Button link",
"info": "Links to YouTube videos will be opened in a video player"
},
{
"type": "select",
"id": "text_align",
"label": "Text alignment",
"default": "vertical-center horizontal-center",
"options": [
{
"value": "vertical-center horizontal-left",
"label": "Center left"
},
{
"value": "vertical-center horizontal-center",
"label": "Center"
},
{
"value": "vertical-center horizontal-right",
"label": "Center right"
},
{
"value": "vertical-bottom horizontal-left",
"label": "Bottom left"
},
{
"value": "vertical-bottom horizontal-center",
"label": "Bottom center"
},
{
"value": "vertical-bottom horizontal-right",
"label": "Bottom right"
}
]
},
{
"type": "text",
"id": "video_url",
"label": "Background video link",
"default": "https://www.youtube.com/watch?v=_9VUPq3SxOc",
"info": "Supports YouTube, .MP4 and Vimeo. Not all features supported by Vimeo. [Learn more](https://archetypethemes.co/blogs/motion/how-do-i-add-background-videos)"
},
{
"type": "select",
"id": "section_height",
"label": "Desktop height",
"default": "650px",
"options": [
{
"label": "450px",
"value": "450px"
},
{
"label": "550px",
"value": "550px"
},
{
"label": "650px",
"value": "650px"
},
{
"label": "750px",
"value": "750px"
},
{
"label": "Full screen",
"value": "100vh"
}
]
},
{
"type": "select",
"id": "mobile_height",
"label": "Mobile height",
"default": "auto",
"options": [
{
"label": "Auto",
"value": "auto"
},
{
"label": "250px",
"value": "250px"
},
{
"label": "300px",
"value": "300px"
},
{
"label": "400px",
"value": "400px"
},
{
"label": "500px",
"value": "500px"
},
{
"label": "Full screen",
"value": "100vh"
}
]
}
],
"presets": [{
"name": "Video hero",
"category": "Video"
}]
}
{% endschema %}