-
-
Save Surinder05/d6e9b0e2863cf86d2b3621988d592f48 to your computer and use it in GitHub Desktop.
Simple HTML Section for Shopify Themes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% comment %} | |
Created by: Simon Neufville | |
Generic HTML section that can be placed anywhere in the customizer. | |
{% endcomment %} | |
<div class="shopify-section" data-section-id="{{ section.id }}"> | |
{% if section.settings.heading %} | |
<h4 class="section-title">{{ section.settings.heading }}</h2> | |
{% endif %} | |
<div> | |
{{ section.settings.html_content }} | |
</div> | |
</div> | |
{% schema %} | |
{ | |
"name": "Text Block", | |
"settings": [ | |
{ | |
"type": "text", | |
"id": "heading", | |
"label": "Section Title (optional)" | |
}, | |
{ | |
"type": "html", | |
"id": "html_content", | |
"label": "Custom HTML", | |
"default": "<div><p>Enter HTML content</p></div>" | |
} | |
], | |
"presets": [ | |
{ | |
"name": "Text Block", | |
"category": "Custom Text Block" | |
} | |
] | |
} | |
{% endschema %} | |
{% comment %} | |
Add styling as required | |
{% endcomment %} | |
{% stylesheet %} | |
{% endstylesheet %} | |
{% comment %} | |
Add JavaScript as required | |
{% endcomment %} | |
{% javascript %} | |
{% endjavascript %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment