Skip to content

Instantly share code, notes, and snippets.

@o-nkar
Created October 18, 2021 14:29
Show Gist options
  • Save o-nkar/a5bb4669d9ebf85a78b6c7ca35c31e94 to your computer and use it in GitHub Desktop.
Save o-nkar/a5bb4669d9ebf85a78b6c7ca35c31e94 to your computer and use it in GitHub Desktop.
1. This is the 1st way to do the same
<div class="Images">
{% for i in (1..5) %}
{% assign sec = image | append: i %}
{% if section.settins[sec] != blank %}
<div class="img image{{i}}">
<img src="{{section.settins[sec] | img_url: '120x120'}}"/>
</div>
{% endif %}
{% endfor %}
</div>
<style>
.Images{ display:flex; justify-content:center; align-items: center;flex-wrap:wrap;}
.Images .img{ flex:0 0 33%;}
</style>
2. You can use the sections blocks from Shopify and update the schema of your page
and utilize the blocks loop and use logic according to blocks, your page schema is not full so I am not sure what actual you used on the page.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment