From 4cab71e8fb572e34764e6dac7c95f0f4b4a46c5e Mon Sep 17 00:00:00 2001 From: moanos Date: Tue, 21 Oct 2025 01:28:31 +0200 Subject: [PATCH] feat: Style allauth templates --- .../templates/allauth/elements/button.html | 15 ++++++++++++++ .../allauth/elements/button_group.html | 5 +++++ .../templates/allauth/elements/fields.html | 1 + .../templates/allauth/elements/h1.html | 1 + .../templates/allauth/elements/h2.html | 1 + .../templates/allauth/elements/p.html | 1 + .../templates/allauth/layouts/base.html | 1 + .../fellchensammlung/details/detail-user.html | 20 +++++++++++++++---- .../fellchensammlung/forms/form_snippets.html | 2 +- 9 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 src/fellchensammlung/templates/allauth/elements/button.html create mode 100644 src/fellchensammlung/templates/allauth/elements/button_group.html create mode 100644 src/fellchensammlung/templates/allauth/elements/fields.html create mode 100644 src/fellchensammlung/templates/allauth/elements/h1.html create mode 100644 src/fellchensammlung/templates/allauth/elements/h2.html create mode 100644 src/fellchensammlung/templates/allauth/elements/p.html create mode 100644 src/fellchensammlung/templates/allauth/layouts/base.html diff --git a/src/fellchensammlung/templates/allauth/elements/button.html b/src/fellchensammlung/templates/allauth/elements/button.html new file mode 100644 index 0000000..91b7c4d --- /dev/null +++ b/src/fellchensammlung/templates/allauth/elements/button.html @@ -0,0 +1,15 @@ +{% load allauth %} +{% comment %} djlint:off {% endcomment %} +
+ <{% if attrs.href %}a href="{{ attrs.href }}"{% else %}button{% endif %} + class="button is-primary" + {% if attrs.form %}form="{{ attrs.form }}"{% endif %} + {% if attrs.id %}id="{{ attrs.id }}"{% endif %} + {% if attrs.name %}name="{{ attrs.name }}"{% endif %} + {% if attrs.value %}value="{{ attrs.value }}"{% endif %} + {% if attrs.type %}type="{{ attrs.type }}"{% endif %} + > + {% slot %} + {% endslot %} + +
\ No newline at end of file diff --git a/src/fellchensammlung/templates/allauth/elements/button_group.html b/src/fellchensammlung/templates/allauth/elements/button_group.html new file mode 100644 index 0000000..d6271b6 --- /dev/null +++ b/src/fellchensammlung/templates/allauth/elements/button_group.html @@ -0,0 +1,5 @@ +{% load allauth %} +
+ {% slot %} + {% endslot %} +
diff --git a/src/fellchensammlung/templates/allauth/elements/fields.html b/src/fellchensammlung/templates/allauth/elements/fields.html new file mode 100644 index 0000000..c5a66bb --- /dev/null +++ b/src/fellchensammlung/templates/allauth/elements/fields.html @@ -0,0 +1 @@ +{{ attrs.form }} \ No newline at end of file diff --git a/src/fellchensammlung/templates/allauth/elements/h1.html b/src/fellchensammlung/templates/allauth/elements/h1.html new file mode 100644 index 0000000..5209c44 --- /dev/null +++ b/src/fellchensammlung/templates/allauth/elements/h1.html @@ -0,0 +1 @@ +{% comment %} djlint:off {% endcomment %}{% load allauth %}

{% slot %}{% endslot %}

diff --git a/src/fellchensammlung/templates/allauth/elements/h2.html b/src/fellchensammlung/templates/allauth/elements/h2.html new file mode 100644 index 0000000..c3acba0 --- /dev/null +++ b/src/fellchensammlung/templates/allauth/elements/h2.html @@ -0,0 +1 @@ +{% comment %} djlint:off {% endcomment %}{% load allauth %}

{% slot %}{% endslot %}

diff --git a/src/fellchensammlung/templates/allauth/elements/p.html b/src/fellchensammlung/templates/allauth/elements/p.html new file mode 100644 index 0000000..d4236db --- /dev/null +++ b/src/fellchensammlung/templates/allauth/elements/p.html @@ -0,0 +1 @@ +{% comment %} djlint:off {% endcomment %}{% load allauth %}

{% slot %}{% endslot %}

diff --git a/src/fellchensammlung/templates/allauth/layouts/base.html b/src/fellchensammlung/templates/allauth/layouts/base.html new file mode 100644 index 0000000..e3b47bd --- /dev/null +++ b/src/fellchensammlung/templates/allauth/layouts/base.html @@ -0,0 +1 @@ +{% extends "fellchensammlung/base.html" %} diff --git a/src/fellchensammlung/templates/fellchensammlung/details/detail-user.html b/src/fellchensammlung/templates/fellchensammlung/details/detail-user.html index e5db567..76c6036 100644 --- a/src/fellchensammlung/templates/fellchensammlung/details/detail-user.html +++ b/src/fellchensammlung/templates/fellchensammlung/details/detail-user.html @@ -28,10 +28,22 @@

{% trans 'Profil verwalten' %}

{% translate "E-Mail" %}: {{ user.email }}
- {% translate "Passwort ändern" %} - {% translate "E-Mail Adresse ändern" %} - {% translate "Daten exportieren" %} +
diff --git a/src/fellchensammlung/templates/fellchensammlung/forms/form_snippets.html b/src/fellchensammlung/templates/fellchensammlung/forms/form_snippets.html index c13d419..3c1efa0 100644 --- a/src/fellchensammlung/templates/fellchensammlung/forms/form_snippets.html +++ b/src/fellchensammlung/templates/fellchensammlung/forms/form_snippets.html @@ -27,7 +27,7 @@ {{ field|add_class:"input" }} {% endif %} -
+
{{ field.help_text }}