mirror of
https://github.com/ToxicCrack/PrintABrick.git
synced 2025-05-19 05:30:08 -07:00
40 lines
1.4 KiB
Twig
40 lines
1.4 KiB
Twig
{% macro part(model) %}
|
|
<div class="column">
|
|
<div class="ui bordered fluid image">
|
|
<a href="{{ url('model_detail', {'number': model.number})}}">
|
|
<div class="image">
|
|
<img src="{{ asset('/ldraw/images/'~model.number~'.png') | imagine_filter('model_min') }}" data-src="{{ asset('/ldraw/images/'~model.number~'.png') | imagine_filter('model_min') }}" class="transition visible">
|
|
</div>
|
|
<div class="ui bottom attached label {% if model.parts|length == 0 %}black{% endif %}">{{ model.number }}</div>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
{% endmacro %}
|
|
|
|
{% macro flash(type,message) %}
|
|
{% if type == 'error' %}
|
|
{% set icon = 'ban' %}
|
|
{% set title = 'flash.error.title' %}
|
|
{% elseif type == 'warning' %}
|
|
{% set icon = 'warning' %}
|
|
{% set title = 'flash.warning.title' %}
|
|
{% elseif type == 'success' %}
|
|
{% set icon = 'check' %}
|
|
{% set title = 'flash.success.title' %}
|
|
{% elseif type == 'info' %}
|
|
{% set icon = 'info' %}
|
|
{% set title = 'flash.info.title' %}
|
|
{% endif %}
|
|
|
|
|
|
<div class="ui icon {{ type ? type : '' }} message">
|
|
<i class="{{ icon }} icon"></i>
|
|
<i class="close icon"></i>
|
|
<div class="content">
|
|
<div class="header">
|
|
{{ title|trans }}
|
|
</div>
|
|
<p>{{ message|trans }}</p>
|
|
</div>
|
|
</div>
|
|
{% endmacro %} |