Skip to content

Instantly share code, notes, and snippets.

@whistlerbrad
Last active February 26, 2020 03:38
Show Gist options
  • Save whistlerbrad/0db1110427d9464c748a03e5c8d9b0dc to your computer and use it in GitHub Desktop.
Save whistlerbrad/0db1110427d9464c748a03e5c8d9b0dc to your computer and use it in GitHub Desktop.
<!-- /sections/index-code.liquid -->
<div class="rte">
{% if section.settings.code != blank %}
{{ section.settings.code }}
{% else %}
{{ 'home_page.onboarding.no_content' | t }}
{% endif %}
</div>
{% schema %}
{
"name": "Code section",
"settings": [
{
"id": "code",
"type": "html",
"label": "Code",
"default": "<p>Use HTML code in this section</p>"
}
],
"presets": [{
"name": "Code section",
"category": "Text"
}]
}
{% endschema %}
<!-- /sections/index-page-full-width.liquid -->
<div class="homepage-page {{ section.settings.homepage_page_color }}">
<div class="grid">
{% if section.settings.home_page_content != blank or page.empty? %}
{% assign page = pages[section.settings.home_page_content] %}
<div class="grid__item one-whole">
{% if section.settings.home_page_show_title %}
<h4 class="home__subtitle">{{ page.title | escape }}</h4>
{% endif %}
<div class="rte homepage-page__content">
{{ page.content }}
</div>
</div>
{% else %}
<div class="grid__item large--five-sixths push--large--one-twelfth">
<div class="rte homepage-page__content">
{{ 'home_page.onboarding.no_content' | t }}
</div>
</div>
{% endif %}
</div>
</div>
{% schema %}
{
"name": "Page Custom",
"settings": [
{
"id": "home_page_content",
"type": "page",
"label": "Page"
},
{
"type": "checkbox",
"id": "home_page_show_title",
"label": "Show page title",
"default": true
},
{
"type": "select",
"id": "homepage_page_color",
"label": "Background color",
"default": "homepage--white",
"options": [
{ "value": "homepage--white", "label": "White"},
{ "value": "homepage--light", "label": "Light"},
{ "value": "homepage--splash", "label": "Accent"},
{ "value": "homepage--dark", "label": "Dark"}
]
}
],
"presets": [{
"name": "Page full width",
"category": "Text"
}]
}
{% endschema %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment