feature_row 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. {% if include.id %}
  2. {% assign feature_row = page[include.id] %}
  3. {% else %}
  4. {% assign feature_row = page.feature_row %}
  5. {% endif %}
  6. <div class="feature__wrapper">
  7. {% for f in feature_row %}
  8. <div class="feature__item{% if include.type %}--{{ include.type }}{% endif %}">
  9. <div class="archive__item">
  10. {% if f.image_path %}
  11. <div class="archive__item-teaser">
  12. <img src="{{ f.image_path | relative_url }}"
  13. alt="{% if f.alt %}{{ f.alt }}{% endif %}">
  14. {% if f.image_caption %}
  15. <span class="archive__item-caption">{{ f.image_caption | markdownify | remove: "<p>" | remove: "</p>" }}</span>
  16. {% endif %}
  17. </div>
  18. {% endif %}
  19. <div class="archive__item-body">
  20. {% if f.title %}
  21. <h2 class="archive__item-title">{{ f.title }}</h2>
  22. {% endif %}
  23. {% if f.excerpt %}
  24. <div class="archive__item-excerpt">
  25. {{ f.excerpt | markdownify }}
  26. </div>
  27. {% endif %}
  28. {% if f.url %}
  29. <p><a href="{{ f.url | relative_url }}" class="btn {{ f.btn_class }}">{{ f.btn_label | default: site.data.ui-text[site.locale].more_label | default: "Learn More" }}</a></p>
  30. {% endif %}
  31. </div>
  32. </div>
  33. </div>
  34. {% endfor %}
  35. </div>