vikrantnegi
6/19/2017 - 11:28 AM

Sectioned block - new (no-grid)

Sectioned block - new (no-grid)

<div class="wrap-doors">
  <div class="container-doors">
    <div class="container-doors">
      <div class="full-width text-center wrap-btn-door">
       <span class="btn btn-door">{{ section.settings.title | escape }}</span>
      </div>
    </div>

    {% for block in section.blocks %}
    <article class="art-doors-wrap">
      {% if block.settings.img-layout == 'left' %}
        {{ block.settings.block-image  | img_url: '1000x1000'  | img_tag: block.settings.image.alt, "img-left" }}
      {% endif %}
      {% if block.settings.img-layout == 'right' %}
        {{ block.settings.block-image | img_url: '1000x1000'  | img_tag: block.settings.image.alt }}
      {% endif %}
      <h2>{{ block.settings.block-title }}</h2>
      <h3>{{ block.settings.block-date }}</h3>
      <p>{{ block.settings.block-text }}</p>
    </article>
    {% endfor %}
  </div>
</div>

{% schema %}
  {
    "name": "Doors Section",
    "class": "index-section",
    "max_blocks": 10,
    "settings": [
      {
        "type": "text",
        "id": "title",
        "label": "Section Heading",
        "default": "Default Section Heading"
      }
    ],
    "blocks": [
      {
        "type": "doors-block",
        "name": "Doors Block",
        "settings": [
          {
            "type": "image_picker",
            "id": "block-image",
            "label": "Door One Image"
          },
          {
            "type": "select",
            "id": "img-layout",
            "label": "Layout",
            "default": "right",
            "options": [
              {
                "value": "left",
                "label": "Image on left"
              },
              {
                "value": "right",
                "label": "Image on right"
              }
            ]
          },
          {
            "type": "text",
            "id": "block-title",
            "label": "Door Title"
          },
          {
            "type": "text",
            "id": "block-date",
            "label": "Door Date"
          },
          {
            "type": "richtext",
            "id": "block-text",
            "label": "Door Text"
          }
        ]
      }
    ],
    "presets": [
      {
        "name": "Doors Section",
        "blocks": [
          {
            "type": "doors-block"
          },
          {
            "type": "doors-block"
          },
          {
            "type": "doors-block"
          }
        ]
      }
    ]
  }
{% endschema %}