53 lines
2.0 KiB
HTML
53 lines
2.0 KiB
HTML
{% macro header(color=false, quantity=false, missing=false, missing_parts=false, sets=false, minifigures=false) %}
|
|
<thead>
|
|
<tr>
|
|
<th class="no-sort" scope="col"><i class="ri-image-line fw-normal"></i> Image</th>
|
|
<th scope="col"><i class="ri-pencil-line fw-normal"></i> Name</th>
|
|
{% if color %}
|
|
<th scope="col"><i class="ri-palette-line fw-normal"></i> Color</th>
|
|
{% endif %}
|
|
{% if quantity %}
|
|
<th scope="col"><i class="ri-functions fw-normal"></i> Quantity</th>
|
|
{% endif %}
|
|
{% if missing %}
|
|
<th scope="col"><i class="ri-error-warning-line fw-normal"></i> Missing</th>
|
|
{% endif %}
|
|
{% if missing_parts %}
|
|
<th scope="col"><i class="ri-error-warning-line fw-normal"></i> Missing parts</th>
|
|
{% endif %}
|
|
{% if sets %}
|
|
<th scope="col"><i class="ri-hashtag fw-normal"></i> Sets</th>
|
|
{% endif %}
|
|
{% if minifigures %}
|
|
<th scope="col"><i class="ri-group-line fw-normal"></i> Minifigures</th>
|
|
{% endif %}
|
|
</tr>
|
|
</thead>
|
|
{% endmacro %}
|
|
|
|
{% macro bricklink(item) %}
|
|
{% set url=item.url_for_bricklink() %}
|
|
{% if url %}
|
|
<a data-search="exclude" href="{{ url }}" target="_blank" class="badge rounded-pill text-bg-light border fw-normal">
|
|
<i class="ri-external-link-line"></i> Bricklink
|
|
</a>
|
|
{% endif %}
|
|
{% endmacro %}
|
|
|
|
{% macro image(image, caption=none, alt=none, accordion=false) %}
|
|
<td class="py-0">
|
|
<a data-lightbox data-caption="{{ caption }}" href="{{ image }}" target="_blank">
|
|
<img class="{% if accordion %}accordion-img{% else %}table-img{% endif %}" src="{{ image }}" {% if alt %}alt="{{ alt }}"{% endif %} loading="lazy">
|
|
</a>
|
|
</td>
|
|
{% endmacro %}
|
|
|
|
{% macro rebrickable(item) %}
|
|
{% set url=item.url_for_rebrickable() %}
|
|
{% if url %}
|
|
<a data-search="exclude" href="{{ url }}" target="_blank" class="badge rounded-pill text-bg-light border fw-normal">
|
|
<i class="ri-external-link-line"></i> Rebrickable
|
|
</a>
|
|
{% endif %}
|
|
{% endmacro %}
|