{% extends 'base.html' %}

{% block main %}
<div class="container-fluid">
  <h2 class="border-bottom lh-base pb-1">
    <i class="ri-hashtag"></i> {% if config['RANDOM'] %}Random selection of{% else %}Latest added{% endif %} sets
    {% if not config['HIDE_ALL_SETS'] %}
      <a href="{{ url_for('set.list') }}" class="btn btn-sm btn-primary ms-1">All sets</a>
    {% endif %}
  </h2>
  {% if brickset_collection | length %}
    <div class="row" id="grid">
    {% for item in brickset_collection %}
      <div class="col-md-4 col-xl-2 d-flex align-items-stretch">
        {% with solo=false, tiny=true, last=true %}
          {% include 'set/card.html' %}
        {% endwith %}
      </div>
    {% endfor %}
    </div>
  {% else %}
    {% include 'set/empty.html' %}
  {% endif %}
  {% if minifigure_collection | length %}
    <h2 class="border-bottom lh-base pb-1">
      <i class="ri-group-line"></i> {% if config['RANDOM'] %}Random selection of{% else %}Latest added{% endif %} minifigures
      {% if not config['HIDE_ALL_MINIFIGURES'] %}
        <a href="{{ url_for('minifigure.list') }}" class="btn btn-sm btn-primary ms-1">All minifigures</a>
      {% endif %}
      </h2>
    <div class="row" id="grid">
    {% for item in minifigure_collection %}
      <div class="col-md-4 col-xl-2 d-flex align-items-stretch">
        {% with solo=false, tiny=true, last=true %}
          {% include 'minifigure/card.html' %}
        {% endwith %}
      </div>
    {% endfor %}
    </div>
  {% endif %}
</div>
{% endblock %}