Major Refactor: Refactor the codebase to improve readability and maintainability

This commit is contained in:
2026-06-21 23:38:49 -04:00
parent 9c4753cd1f
commit 801b0b97fc
46 changed files with 2378 additions and 2031 deletions

22
templates/macros/ui.html Normal file
View File

@@ -0,0 +1,22 @@
{% macro flashed_messages() %}
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, message in messages %}
<div class="alert alert-{{ category }}">{{ message|safe }}</div>
{% endfor %}
{% endif %}
{% endwith %}
{% endmacro %}
{% macro back_link(url, text='Volver', icon='bi-arrow-left') %}
<a href="{{ url }}" class="btn btn-outline-secondary btn-sm mb-2">
<i class="bi {{ icon }}"></i> {{ text }}
</a>
{% endmacro %}
{% macro page_header(title, icon='', actions='') %}
<div class="d-flex justify-content-between align-items-center mb-4">
<h2>{% if icon %}<i class="bi {{ icon }} me-2"></i>{% endif %}{{ title }}</h2>
{% if actions %}{{ actions|safe }}{% endif %}
</div>
{% endmacro %}