Skip to content

Instantly share code, notes, and snippets.

@ed-codes
Last active August 15, 2018 16:58
Show Gist options
  • Save ed-codes/e46903f7945472245fe8542c8dd14e6c to your computer and use it in GitHub Desktop.
Save ed-codes/e46903f7945472245fe8542c8dd14e6c to your computer and use it in GitHub Desktop.
Athletes listing page for Fusion Multisport
<div class="athlete-tabs">
{% for block in section.blocks %}
<a href="#{{ block.settings.athlete-name | handleize }}" class="athlete-tab">
<span>{{ block.settings.athlete-name }}</span>
<img class="flag" src="{{ block.settings.athlete-flag | img_url: '20x14' }}" alt="{{ block.settings.athlete-country }}">
</a>
{% endfor %}
</div>
<div class="athletes">
{% for block in section.blocks %}
<div class="athlete" id="{{ block.settings.athlete-name | handleize }}">
<div class="athlete-img">
<img src="{{ block.settings.athlete-image | img_url: '1024x' }}" alt="{{ block.settings.athlete-name }}">
</div>
<div class="athlete-info">
<div class="athlete-left">
<img src="{{ 'fusion-team-logo-small.png' | asset_url }}" alt="Fusion Team logo small">
<h2>{{ block.settings.athlete-name }}</h2>
<h3>{{ block.settings.athlete-country }}</h3>
</div>
<div class="athlete-right">
{{ block.settings.athlete-content }}
<a href="{{ block.settings.athlete-link }}">{{ block.settings.athlete-link-text }}</a>
</div>
</div>
</div>
{% endfor %}
</div>
{% schema %}
{
"name": "Athletes Listing",
"class": "shopify-section__athletes",
"settings": [
],
"blocks": [
{
"type": "athlete",
"name": "Athlete",
"settings": [
{
"type": "text",
"id": "athlete-name",
"label": "Athlete Name"
},
{
"type": "text",
"id": "athlete-country",
"label": "Athlete Country"
},
{
"type": "image_picker",
"id": "athlete-flag",
"label": "Athlete Flag"
},
{
"type": "image_picker",
"id": "athlete-image",
"label": "Athlete Image"
},
{
"type": "html",
"id": "athlete-content",
"label": "Athlete Content"
},
{
"type": "url",
"id": "athlete-link",
"label": "Athlete Profile Link"
},
{
"type": "text",
"id": "athlete-link-text",
"label": "Athlete Profile Link Text",
"default":"See More"
}
]
}
]
}
{% endschema %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment