feat: add redirect liquid button

This commit is contained in:
Albez0-An7h 2026-03-04 13:44:48 +05:30
parent d9d57adc5b
commit 5be8bec9e4

View File

@ -0,0 +1,36 @@
<a
href="{{block.settings.url}}"
class="btn {{block.settings.class}}"
style="
color: {{block.settings.colour}};
background-color: {{block.settings.background_color}};
padding: {{block.settings.padding}};
margin: {{block.settings.margin}};
"
{% if block.settings.open_tab %}
target="_blank"
{% endif %}
>
{{ block.settings.heading }}
</a>
{% schema %}
{
"name": "Contact SomeOne",
"target": "section",
"settings": [
{ "type": "text", "id": "heading", "label": "button label", "default": "Contact" },
{ "type": "color", "id": "colour", "label": "text_Colour", "default": "#ff0000" },
{ "type": "color", "id": "background_color", "label": "background_color", "default": "#000000" },
{ "type": "text", "id": "url", "label": "url", "default": "youtube.com" },
{ "type": "checkbox", "id": "open_tab", "label": "open_tab", "default": true },
{ "type": "text", "id": "padding", "label": "padding", "default": "10px 5px" },
{ "type": "text", "id": "class", "label": "class", "default": "button" },
{ "type": "text", "id": "margin", "label": "margin", "default": "10px 10px" }
],
"enabled_on": {
"templates": ["product"]
}
}
{% endschema %}