From d1fca48f7ae8471c3ef4b32974a9b9c78f2ba98f Mon Sep 17 00:00:00 2001 From: Julien Constant Date: Sat, 4 Mar 2023 15:12:11 +0100 Subject: [PATCH] fix alignments & spacing issue --- core/static/user/user_edit.scss | 15 +++++++---- core/static/user/user_stats.scss | 8 ++++++ core/templates/core/user_edit.jinja | 2 +- core/templates/core/user_stats.jinja | 38 +++++++++++++++------------- 4 files changed, 40 insertions(+), 23 deletions(-) diff --git a/core/static/user/user_edit.scss b/core/static/user/user_edit.scss index cbe6c59e..9f91796a 100644 --- a/core/static/user/user_edit.scss +++ b/core/static/user/user_edit.scss @@ -1,9 +1,17 @@ + +@media (max-width: 750px) { + .title { + text-align: center; + } +} + .profile { &-visible { display: flex; justify-content: center; align-items: center; gap: 5px; + padding-top: 10px; >input[type="checkbox"] { cursor: pointer; @@ -39,6 +47,7 @@ @media (max-width: 750px) { max-width: 100%; + padding: 10px 10px 0; } &-display { @@ -86,16 +95,12 @@ } &-fields { - padding: 20px 0; + padding: 10px 10px 0; display: flex; flex-direction: row; flex-wrap: wrap; gap: 10px; justify-content: center; - - @media (max-width: 750px) { - gap: 20px; - } } &-field { diff --git a/core/static/user/user_stats.scss b/core/static/user/user_stats.scss index 362c5153..62edec5c 100644 --- a/core/static/user/user_stats.scss +++ b/core/static/user/user_stats.scss @@ -1,3 +1,10 @@ +.container { + padding: 10px; + display: flex; + flex-direction: column; + gap: 10px; +} + .row { display: flex; flex-direction: row; @@ -8,6 +15,7 @@ gap: 30px; @media (max-width: 535px) { + gap: 20px; >div, >div>.flexed { diff --git a/core/templates/core/user_edit.jinja b/core/templates/core/user_edit.jinja index e4e0bae5..a1819c26 100644 --- a/core/templates/core/user_edit.jinja +++ b/core/templates/core/user_edit.jinja @@ -10,7 +10,7 @@ {%- endblock -%} {%- block content -%} -

{%- trans -%}Edit user profile{%- endtrans -%}

+

{%- trans -%}Edit user profile{%- endtrans -%}

{%- csrf_token -%} diff --git a/core/templates/core/user_stats.jinja b/core/templates/core/user_stats.jinja index 14a4244c..aadb5d01 100644 --- a/core/templates/core/user_stats.jinja +++ b/core/templates/core/user_stats.jinja @@ -10,6 +10,7 @@ {% endblock %} {% block content %} +
{% if profile.permanencies %}
@@ -35,21 +36,24 @@
-

{% trans %}Product top 10{% endtrans %}

- - - - - - - - - {% for p in top_product %} - - - - - {% endfor %} - -
{% trans %}Product{% endtrans %}{% trans %}Quantity{% endtrans %}
{{ p['product__name'] }}{{ p['product_sum'] }}
+
+

{% trans %}Product top 10{% endtrans %}

+ + + + + + + + + {% for p in top_product %} + + + + + {% endfor %} + +
{% trans %}Product{% endtrans %}{% trans %}Quantity{% endtrans %}
{{ p['product__name'] }}{{ p['product_sum'] }}
+
+
{% endblock %} \ No newline at end of file