From 1a99f4096e4a85fe52040f7ed1d8adc5f1ef9325 Mon Sep 17 00:00:00 2001 From: imperosol Date: Sun, 30 Nov 2025 18:24:44 +0100 Subject: [PATCH] make matmatronch form more readable --- core/static/core/forms.scss | 9 +++++++++ core/static/user/user_edit.scss | 9 --------- core/templates/core/user_edit.jinja | 4 ++-- matmat/templates/matmat/search_form.jinja | 8 ++++++-- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/core/static/core/forms.scss b/core/static/core/forms.scss index e1793a69..be876c9b 100644 --- a/core/static/core/forms.scss +++ b/core/static/core/forms.scss @@ -143,6 +143,15 @@ form { line-height: 1; white-space: nowrap; + .fields-centered { + padding: 10px 10px 0; + display: flex; + flex-direction: row; + flex-wrap: wrap; + gap: var(--nf-input-size) 10px; + justify-content: center; + } + .helptext { margin-top: .25rem; margin-bottom: .25rem; diff --git a/core/static/user/user_edit.scss b/core/static/user/user_edit.scss index 5b20fcee..20995da6 100644 --- a/core/static/user/user_edit.scss +++ b/core/static/user/user_edit.scss @@ -114,15 +114,6 @@ } } - &-fields { - padding: 10px 10px 0; - display: flex; - flex-direction: row; - flex-wrap: wrap; - gap: var(--nf-input-size) 10px; - justify-content: center; - } - &-field { display: flex; flex-wrap: wrap; diff --git a/core/templates/core/user_edit.jinja b/core/templates/core/user_edit.jinja index 2f069da7..46603562 100644 --- a/core/templates/core/user_edit.jinja +++ b/core/templates/core/user_edit.jinja @@ -114,7 +114,7 @@ {# All fields #} -
+
{%- for field in form -%} {%- if field.name in ["quote","profile_pict","avatar_pict","scrub_pict","is_viewable","forum_signature"] -%} {%- continue -%} @@ -133,7 +133,7 @@
{# Textareas #} -
+
{%- for field in [form.quote, form.forum_signature] -%}
{{ field.label_tag() }} diff --git a/matmat/templates/matmat/search_form.jinja b/matmat/templates/matmat/search_form.jinja index da997c8d..8964749f 100644 --- a/matmat/templates/matmat/search_form.jinja +++ b/matmat/templates/matmat/search_form.jinja @@ -26,7 +26,11 @@ {% endif %}

{% trans %}Search user{% endtrans %}

- {{ form }} - +
+ {{ form }} +
+
+ +
{% endblock %}