mirror of
https://github.com/ToxicCrack/PrintABrick.git
synced 2025-05-28 09:40:14 -07:00
44 lines
1.6 KiB
Twig
44 lines
1.6 KiB
Twig
{% macro modelImageMin(model, color) %}
|
|
<div class="image load">
|
|
<img src="{{ asset('/images/'~color~'/'~model.number~'.png') | imagine_filter('media_min') }}">
|
|
</div>
|
|
{% endmacro %}
|
|
|
|
{% macro modelImageLarge(model, color) %}
|
|
<div class="image">
|
|
<img src="{{ asset('/images/'~color~'/'~model.number~'.png')|imagine_filter('media_large') }}">
|
|
</div>
|
|
{% endmacro %}
|
|
|
|
{% macro model(model, quantity = null) %}
|
|
<div class="column">
|
|
<div class="ui bordered fluid image">
|
|
<a href="{{ url('model_detail', {'number': model.number})}}">
|
|
{% import _self as blocks %}
|
|
{{ blocks.modelImageMin(model, -1) }}
|
|
<div class="ui bottom attached label">{% if quantity %}{{ quantity }}x{% endif %} {{ model.number }}</div>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
{% endmacro %}
|
|
|
|
{% macro part(part, quantity, color = -1) %}
|
|
<div class="column">
|
|
<div class="ui bordered fluid image">
|
|
<a href="{{ url('reb_part_detail', {'number': part.number})}}">
|
|
{% import _self as blocks %}
|
|
{#{{ blocks.partImage(part.number, -1) }}#}
|
|
<div class="ui bottom attached label">{{ quantity }}x {{ part.number }}</div>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
{% endmacro %}
|
|
|
|
{% macro empty(message) %}
|
|
<p class="ui center aligned icon header"><i class="circular frown icon"></i>{{ message }}</p>
|
|
{% endmacro %}
|
|
|
|
{% macro ccal2_license(title,author) %}
|
|
"{{ title }}" by {{ author }}, used under <a href="https://creativecommons.org/licenses/by/2.0/">CC BY 2.0</a> / Converted to stl from original
|
|
{% endmacro %}
|