40 lines
2.0 KiB
HTML
40 lines
2.0 KiB
HTML
{% macro header(title, description="", button_text="", button_url="", icon="fa-folder", button_class="", button_icon="fa-plus", button_style="") %}
|
|
<header class="py-4">
|
|
<div class="container-fluid">
|
|
<div class="d-flex justify-content-between align-items-center">
|
|
<div>
|
|
<h3 class="mb-0">
|
|
<i class="fas {{ icon }} me-2" style="color: var(--primary-color);"></i>
|
|
{{ title }}
|
|
</h3>
|
|
{% if description %}
|
|
<p class="text-muted mb-0 mt-2 small">{{ description }}</p>
|
|
{% endif %}
|
|
</div>
|
|
{% if button_text and button_url %}
|
|
<div>
|
|
{% if button_url == "#" %}
|
|
<button id="emptyTrashBtn"
|
|
class="btn {{ button_class if button_class else '' }}"
|
|
style="{{ 'background-color: var(--primary-color); color: white;' if not button_class else '' }}{{ '; ' + button_style if button_style else '' }}">
|
|
{% if button_icon %}
|
|
<i class="fas {{ button_icon }} me-1"></i>
|
|
{% endif %}
|
|
{{ button_text }}
|
|
</button>
|
|
{% else %}
|
|
<button onclick="window.location.href='{{ button_url }}'"
|
|
class="btn {{ button_class if button_class else '' }}"
|
|
style="{{ 'background-color: var(--primary-color); color: white;' if not button_class else '' }}{{ '; ' + button_style if button_style else '' }}">
|
|
{% if button_icon %}
|
|
<i class="fas {{ button_icon }} me-1"></i>
|
|
{% endif %}
|
|
{{ button_text }}
|
|
</button>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</header>
|
|
{% endmacro %} |