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

View file

@ -32,6 +32,17 @@
{% include "includes/message.html" %} {% include "includes/message.html" %}
{% endfor %} {% endfor %}
{% block content %} {% 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 %} {% endblock content %}
</div> </div>
<footer> <footer>

View file

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

View file

@ -5,14 +5,12 @@
{% translate "Profile" %} {% translate "Profile" %}
{% endblock page_title %} {% endblock page_title %}
{% endblock html_title %} {% endblock html_title %}
{% block content %} {% block card_header %}
<section class="section">
<div class="card">
<div class="card-header"> <div class="card-header">
<h4 class="card-title">{% translate "Account" %}</h4> <h4 class="card-title">{% translate "Account" %}</h4>
</div> </div>
<div class="card-content"> {% endblock %}
<div class="card-body"> {% block card_content %}
<p class="card-text"> <p class="card-text">
{% blocktranslate trimmed %} {% 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. 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> </tbody>
</table> </table>
</div> </div>
</div>
</div>
</div>
</section>
{% endblock content %} {% endblock content %}