inventory/templates/fragments/_link_fragment.html

30 lines
1,002 B
HTML

{% import "fragments/_icon_fragment.html" as icons %}
{% macro category_link(endpoint, label, icon_html=none, arguments={}) %}
<div class="col text-center">
<a href="{{ url_for('main.' + endpoint, **arguments) }}"
class="d-flex flex-column justify-content-center link-success link-underline-opacity-0">
{% if icon_html %}
{{ icon_html | safe }}
{% endif %}
{{ label }}
</a>
</div>
{% endmacro %}
{% macro navigation_link(endpoint, label, icon_html=none, arguments={}, active=false) %}
<li class="nav-item">
<a href="{{ url_for('main.' + endpoint, **arguments) }}" class="nav-link{% if active %} active{% endif %}">
{% if icon_html %}
{{ icon_html | safe }}
{% endif %}
{{ label }}
</a>
</li>
{% endmacro %}
{% macro entry_link(endpoint, id) %}
<a href="{{ url_for('main.' + endpoint, id=id) }}" class="link-success link-underline-opacity-0">
{{ icons.render_icon('link', 12) }}
</a>
{% endmacro %}