Last active
October 14, 2019 12:40
-
-
Save loughlincodes/3f13a8455408e8052dbfe83b0bab3a9e to your computer and use it in GitHub Desktop.
Announcement Bar Section (with Blocks - Max 3)
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
<div class="announcement-bar"> | |
<p> | |
{% for block in section.blocks %} | |
<span>{{ block.settings.text }}</span>{% if forloop.last != true %}<span class="middot">·</span>{% endif %} | |
{% endfor %} | |
</p> | |
</div> <!-- end some-div --> | |
{% schema %} | |
{ | |
"name": "Announcement Bar", | |
"class": "announcement-bar", | |
"max_blocks": 3, | |
"settings": [ | |
{ | |
"type": "checkbox", | |
"id": "show_announcement", | |
"label": "Show an announcement" | |
}, | |
{ | |
"type": "url", | |
"id": "announcement_link", | |
"label": "Announcement link" | |
} | |
], | |
"blocks": [ | |
{ | |
"type": "text", | |
"name": "Text Block", | |
"settings": [ | |
{ | |
"type": "textarea", | |
"id": "text", | |
"label": "Text Block" | |
} | |
] | |
} | |
], | |
"presets": [ | |
{ | |
"category": "Announcement Bar", | |
"name": "Announcements", | |
"blocks": [] | |
} | |
] | |
} | |
{% endschema %} | |
{% stylesheet %} | |
{% endstylesheet %} | |
{% javascript %} | |
{% endjavascript %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment