Created
January 17, 2018 19:38
-
-
Save xerosai/96399e6385cd50e808288d9aaaf9a233 to your computer and use it in GitHub Desktop.
Simple HTML Section for Shopify Themes
This file contains hidden or 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
nice but its too simple needs a little customization to it