Reduce template code duplication

This commit is contained in:
Tobias Kunze 2025-03-18 11:56:02 +01:00
parent 2baa3fd5ec
commit e06b472d62
4 changed files with 78 additions and 87 deletions

View file

@ -6,11 +6,7 @@
{% translate "Sign In" %}
{% endblock page_title %}
{% endblock html_title %}
{% block content %}
<section class="section">
<div class="card">
<div class="card-content">
<div class="card-body">
{% block card_content %}
{% if SOCIALACCOUNT_ENABLED %}
{% get_providers as socialaccount_providers %}
{% if socialaccount_providers %}
@ -46,8 +42,4 @@
{% include "includes/form.html" %}
</div>
</div>
</div>
</div>
</div>
</section>
{% endblock content %}

View file

@ -32,6 +32,17 @@
{% include "includes/message.html" %}
{% endfor %}
{% block content %}
<section class="section">
<div class="card">
{% block card_header %}{% endblock %}
<div class="card-content">
<div class="card-body">
{% block card_content %}
{% endblock card_content %}
</div>
</div>
</div>
</section>
{% endblock content %}
</div>
<footer>

View file

@ -5,12 +5,6 @@
{% translate "Create a new organization" %}
{% endblock page_title %}
{% endblock html_title %}
{% block content %}
<section class="section">
<div class="card">
<div class="card-content">
<div class="card-body">{% include "includes/form.html" %}</div>
</div>
</div>
</section>
{% endblock content %}
{% block card_content %}
{% include "includes/form.html" %}
{% endblock card_content %}

View file

@ -5,14 +5,12 @@
{% translate "Profile" %}
{% endblock page_title %}
{% endblock html_title %}
{% block content %}
<section class="section">
<div class="card">
{% block card_header %}
<div class="card-header">
<h4 class="card-title">{% translate "Account" %}</h4>
</div>
<div class="card-content">
<div class="card-body">
{% endblock %}
{% block card_content %}
<p class="card-text">
{% blocktranslate trimmed %}
You are logged in with your VSHN user account. You will be able to change your password and other settings here in the future.
@ -36,8 +34,4 @@
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>
{% endblock content %}