feat: várias melhorias e evoluções no projeto
This commit is contained in:
@ -0,0 +1,7 @@
|
||||
{% load i18n %}
|
||||
{% load allauth %}
|
||||
|
||||
<div class="alert alert-error">
|
||||
{% slot message %}
|
||||
{% endslot %}
|
||||
</div>
|
||||
@ -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>
|
||||
@ -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 %}>
|
||||
66
diarios_oficiais_alems/templates/allauth/elements/field.html
Normal file
66
diarios_oficiais_alems/templates/allauth/elements/field.html
Normal 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 %}
|
||||
@ -0,0 +1,3 @@
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{{ attrs.form|crispy }}
|
||||
19
diarios_oficiais_alems/templates/allauth/elements/panel.html
Normal file
19
diarios_oficiais_alems/templates/allauth/elements/panel.html
Normal 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>
|
||||
@ -0,0 +1,6 @@
|
||||
{% load allauth %}
|
||||
|
||||
<table class="table">
|
||||
{% slot %}
|
||||
{% endslot %}
|
||||
</table>
|
||||
@ -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 %}
|
||||
@ -0,0 +1,6 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block main %}
|
||||
{% block content %}
|
||||
{% endblock content %}
|
||||
{% endblock main %}
|
||||
Reference in New Issue
Block a user