From 62745e89fa08450ff007ee70e1500a8d2ba793ec Mon Sep 17 00:00:00 2001 From: Skia Date: Sat, 20 Aug 2016 13:57:27 +0200 Subject: [PATCH] User profile template fix --- core/static/core/style.css | 25 +++++++++----- core/templates/core/macros.jinja | 33 ++++++++++-------- core/templates/core/user_detail.jinja | 50 +++++++++++++++------------ 3 files changed, 62 insertions(+), 46 deletions(-) diff --git a/core/static/core/style.css b/core/static/core/style.css index 3537a882..6a43701c 100644 --- a/core/static/core/style.css +++ b/core/static/core/style.css @@ -110,7 +110,7 @@ p, pre { ul, ol { margin-top: 1em; margin-bottom: 1em; - list-style-type: disc; + list-style-type: disc; margin-left: 25px; } @@ -182,21 +182,28 @@ tbody>tr:hover { overflow: auto; } #user_profile h4 { border-bottom: 1px solid grey; max-width: 60%; } +#user_profile #left_column { + max-width: 59%; +} +#user_profile #right_column { + max-width: 40%; + float: right; + font-style: italic; +} #user_profile #pictures { - max-width: 250px; - max-height: 300px; - float: right; - font-style: italic; + max-width: 250px; + max-height: 300px; + margin: 0px auto; } #user_profile #nickname { - font-style: italic; + font-style: italic; } #user_profile #pictures img { - max-width: 96%; - max-height: 96%; + max-width: 96%; + max-height: 96%; } #user_profile .promo_pict { - height: 45px; + height: 45px; } .mini_profile_link { display: block; diff --git a/core/templates/core/macros.jinja b/core/templates/core/macros.jinja index 87d39c2f..ac930514 100644 --- a/core/templates/core/macros.jinja +++ b/core/templates/core/macros.jinja @@ -10,21 +10,26 @@ {% macro user_mini_profile(user) %}
-
- {% if user.profile_pict %} - {% trans %}Profile{% endtrans %} + +
+
+ {% if user.profile_pict %} + {% trans %}Profile{% endtrans %} + {% endif %} +
+
+
+

{{ user.get_full_name() }}

+ {% if user.nick_name %} +

« {{ user.nick_name }} »

+ {% endif %} + {% if user.date_of_birth %} +

{% trans %}Born: {% endtrans %}{{ user.date_of_birth|date("d/m/Y") }} ({{ user.get_age() }})

+ {% endif %} + {% if user.promo %} +

Promo {{ user.promo }} + {% trans %}Promo: {% endtrans %}{{ user.promo }}

{% endif %}
-

{{ user.get_full_name() }}

- {% if user.nick_name %} -

« {{ user.nick_name }} »

- {% endif %} - {% if user.date_of_birth %} -

{% trans %}Born: {% endtrans %}{{ user.date_of_birth|date("d/m/Y") }} ({{ user.get_age() }})

- {% endif %} - {% if user.promo %} -

Promo {{ user.promo }} - {% trans %}Promo: {% endtrans %}{{ user.promo }}

- {% endif %}
{%- endmacro %} diff --git a/core/templates/core/user_detail.jinja b/core/templates/core/user_detail.jinja index 839c94ac..50e17853 100644 --- a/core/templates/core/user_detail.jinja +++ b/core/templates/core/user_detail.jinja @@ -8,30 +8,34 @@
-
- {% if profile.profile_pict %} - {% trans %}Profile{% endtrans %} - {% endif %} -

{{ profile.quote }}

+
+
+ {% if profile.profile_pict %} + {% trans %}Profile{% endtrans %} + {% endif %} +
+

{{ profile.quote }}

+
+
+

{{ profile.get_full_name() }}

+ {% if profile.nick_name %} +

« {{ profile.nick_name }} »

+ {% endif %} + {% if profile.date_of_birth %} +

{% trans %}Born: {% endtrans %}{{ profile.date_of_birth|date("d/m/Y") }}

+ {% endif %} + {% if profile.department != "NA" %} +

{{ profile.department }}{{ profile.semester }} + {% endif %} + {% if profile.dpt_option %} +
{% trans %}Option: {% endtrans %}{{ profile.dpt_option }} + {% endif %} +

+ {% if profile.promo %} +

Promo {{ profile.promo }} + {% trans %}Promo: {% endtrans %}{{ profile.promo }}

+ {% endif %}
-

{{ profile.get_full_name() }}

- {% if profile.nick_name %} -

« {{ profile.nick_name }} »

- {% endif %} - {% if profile.date_of_birth %} -

{% trans %}Born: {% endtrans %}{{ profile.date_of_birth|date("d/m/Y") }}

- {% endif %} - {% if profile.department != "NA" %} -

{{ profile.department }}{{ profile.semester }} - {% endif %} - {% if profile.dpt_option %} -
{% trans %}Option: {% endtrans %}{{ profile.dpt_option }} - {% endif %} -

- {% if profile.promo %} -

Promo {{ profile.promo }} - {% trans %}Promo: {% endtrans %}{{ profile.promo }}

- {% endif %}