feat: várias melhorias e evoluções no projeto

This commit is contained in:
root
2025-05-26 14:22:19 +02:00
parent 78e994eb6a
commit 9dca0d6022
108 changed files with 2601 additions and 2131 deletions

View File

@ -0,0 +1,7 @@
{% load i18n %}
{% load allauth %}
<div class="alert alert-error">
{% slot message %}
{% endslot %}
</div>

View File

@ -0,0 +1,6 @@
{% load allauth %}
<span class="badge {% if 'success' in attrs.tags %}bg-success{% endif %} {% if 'warning' in attrs.tags %}bg-warning{% endif %} {% if 'secondary' in attrs.tags %}bg-secondary{% endif %} {% if 'danger' in attrs.tags %}bg-danger{% endif %} {% if 'primary' in attrs.tags %}bg-primary{% endif %}">
{% slot %}
{% endslot %}
</span>

View File

@ -0,0 +1,20 @@
{% load allauth %}
{% comment %} djlint:off {% endcomment %}
<{% if attrs.href %}a href="{{ attrs.href }}"{% else %}button{% endif %}
{% if attrs.form %}form="{{ attrs.form }}"{% endif %}
{% if attrs.id %}id="{{ attrs.id }}"{% endif %}
{% if attrs.name %}name="{{ attrs.name }}"{% endif %}
{% if attrs.type %}type="{{ attrs.type }}"{% endif %}
class="btn
{% if 'success' in attrs.tags %}btn-success
{% elif 'warning' in attrs.tags %}btn-warning
{% elif 'secondary' in attrs.tags %}btn-secondary
{% elif 'danger' in attrs.tags %}btn-danger
{% elif 'primary' in attrs.tags %}btn-primary
{% else %}btn-primary
{% endif %}"
>
{% slot %}
{% endslot %}
</{% if attrs.href %}a{% else %}button{% endif %}>

View File

@ -0,0 +1,66 @@
{% load allauth %}
{% load crispy_forms_tags %}
{% if attrs.type == "textarea" %}
<div class="row mb-3">
<div class="col-sm-10">
<label for="{{ attrs.id }}">
{% slot label %}
{% endslot %}
</label>
</div>
<textarea {% if attrs.required %}required{% endif %}
{% if attrs.rows %}rows="{{ attrs.rows }}"{% endif %}
{% if attrs.disabled %}disabled{% endif %}
{% if attrs.readonly %}readonly{% endif %}
{% if attrs.checked %}checked{% endif %}
{% if attrs.name %}name="{{ attrs.name }}"{% endif %}
{% if attrs.id %}id="{{ attrs.id }}"{% endif %}
{% if attrs.placeholder %}placeholder="{{ attrs.placeholder }}"{% endif %}
class="form-control">{% slot value %}{% endslot %}</textarea>
</div>
{% elif attrs.type == "radio" %}
<div class="row mb-3">
<div class="col-sm-10">
<div class="form-check">
<input {% if attrs.required %}required{% endif %}
{% if attrs.disabled %}disabled{% endif %}
{% if attrs.readonly %}readonly{% endif %}
{% if attrs.checked %}checked{% endif %}
{% if attrs.name %}name="{{ attrs.name }}"{% endif %}
{% if attrs.id %}id="{{ attrs.id }}"{% endif %}
{% if attrs.placeholder %}placeholder="{{ attrs.placeholder }}"{% endif %}
{% if attrs.autocomplete %}autocomplete="{{ attrs.autocomplete }}"{% endif %}
value="{{ attrs.value|default_if_none:"" }}"
type="{{ attrs.type }}" />
<label class="form-check-label" for="{{ attrs.id }}">
{% slot label %}
{% endslot %}
</label>
</div>
</div>
</div>
{% else %}
<div class="col-sm-10">
<label for="{{ attrs.id }}">
{% slot label %}
{% endslot %}
</label>
</div>
<div class="col-sm-10">
<input {% if attrs.required %}required{% endif %}
{% if attrs.disabled %}disabled{% endif %}
{% if attrs.readonly %}readonly{% endif %}
{% if attrs.checked %}checked{% endif %}
{% if attrs.name %}name="{{ attrs.name }}"{% endif %}
{% if attrs.id %}id="{{ attrs.id }}"{% endif %}
{% if attrs.placeholder %}placeholder="{{ attrs.placeholder }}"{% endif %}
{% if attrs.autocomplete %}autocomplete="{{ attrs.autocomplete }}"{% endif %}
value="{{ attrs.value|default_if_none:"" }}"
type="{{ attrs.type }}"
class="form-control" />
</div>
{% endif %}
{% if slots.help_text %}
<div class="form-text">{% slot help_text %}{% endslot %}</div>
{% endif %}

View File

@ -0,0 +1,3 @@
{% load crispy_forms_tags %}
{{ attrs.form|crispy }}

View File

@ -0,0 +1,19 @@
{% load allauth %}
<section>
<div class="card mb-4">
<div class="card-body">
<h2 class="card-title">
{% slot title %}
{% endslot %}
</h2>
{% slot body %}
{% endslot %}
{% if slots.actions %}
<ul>
{% for action in slots.actions %}<li>{{ action }}</li>{% endfor %}
</ul>
{% endif %}
</div>
</div>
</section>

View File

@ -0,0 +1,6 @@
{% load allauth %}
<table class="table">
{% slot %}
{% endslot %}
</table>

View File

@ -0,0 +1,31 @@
{% extends "base.html" %}
{% load i18n %}
{% block bodyclass %}bg-light{% endblock bodyclass %}
{% block css %}{{ block.super }}{% endblock css %}
{% block title %}
{% block head_title %}
{% trans "Sign In" %}
{% endblock head_title %}
{% endblock title %}
{% block body %}
<div class="d-flex justify-content-center h-100 py-4">
<div class="col-md-4 py-4 my-4 px-4">
{% if messages %}
{% for message in messages %}
<div class="alert alert-dismissible {% if message.tags %}alert-{{ message.tags }}{% endif %}">
{{ message }}
<button type="button"
class="btn-close"
data-bs-dismiss="alert"
aria-label="Close"></button>
</div>
{% endfor %}
{% endif %}
{% block content %}
{% endblock content %}
{% block extra_body %}
{% endblock extra_body %}
</div>
</div>
{% endblock body %}

View File

@ -0,0 +1,6 @@
{% extends "base.html" %}
{% block main %}
{% block content %}
{% endblock content %}
{% endblock main %}