User profile template fix

This commit is contained in:
Skia 2016-08-20 13:57:27 +02:00
parent 84efcd87e7
commit 62745e89fa
3 changed files with 62 additions and 46 deletions

View File

@ -110,7 +110,7 @@ p, pre {
ul, ol { ul, ol {
margin-top: 1em; margin-top: 1em;
margin-bottom: 1em; margin-bottom: 1em;
list-style-type: disc; list-style-type: disc;
margin-left: 25px; margin-left: 25px;
} }
@ -182,21 +182,28 @@ tbody>tr:hover {
overflow: auto; overflow: auto;
} }
#user_profile h4 { border-bottom: 1px solid grey; max-width: 60%; } #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 { #user_profile #pictures {
max-width: 250px; max-width: 250px;
max-height: 300px; max-height: 300px;
float: right; margin: 0px auto;
font-style: italic;
} }
#user_profile #nickname { #user_profile #nickname {
font-style: italic; font-style: italic;
} }
#user_profile #pictures img { #user_profile #pictures img {
max-width: 96%; max-width: 96%;
max-height: 96%; max-height: 96%;
} }
#user_profile .promo_pict { #user_profile .promo_pict {
height: 45px; height: 45px;
} }
.mini_profile_link { .mini_profile_link {
display: block; display: block;

View File

@ -10,21 +10,26 @@
{% macro user_mini_profile(user) %} {% macro user_mini_profile(user) %}
<div id="user_profile"> <div id="user_profile">
<div id="pictures">
{% if user.profile_pict %} <div id="right_column">
<img src="{{ user.profile_pict.get_download_url() }}" alt="{% trans %}Profile{% endtrans %}" /> <div id="pictures">
{% if user.profile_pict %}
<img src="{{ user.profile_pict.get_download_url() }}" alt="{% trans %}Profile{% endtrans %}" />
{% endif %}
</div>
</div>
<div id="left_column">
<p>{{ user.get_full_name() }}</p>
{% if user.nick_name %}
<p id="nickname">&laquo; {{ user.nick_name }} &raquo;</p>
{% endif %}
{% if user.date_of_birth %}
<p>{% trans %}Born: {% endtrans %}{{ user.date_of_birth|date("d/m/Y") }} ({{ user.get_age() }})</p>
{% endif %}
{% if user.promo %}
<p><img src="{{ static('core/img/promo_%02d.png' % user.promo) }}" alt="Promo {{ user.promo }}" class="promo_pict" />
{% trans %}Promo: {% endtrans %}{{ user.promo }}</p>
{% endif %} {% endif %}
</div> </div>
<p>{{ user.get_full_name() }}</p>
{% if user.nick_name %}
<p id="nickname">&laquo; {{ user.nick_name }} &raquo;</p>
{% endif %}
{% if user.date_of_birth %}
<p>{% trans %}Born: {% endtrans %}{{ user.date_of_birth|date("d/m/Y") }} ({{ user.get_age() }})</p>
{% endif %}
{% if user.promo %}
<p><img src="{{ static('core/img/promo_%02d.png' % user.promo) }}" alt="Promo {{ user.promo }}" class="promo_pict" />
{% trans %}Promo: {% endtrans %}{{ user.promo }}</p>
{% endif %}
</div> </div>
{%- endmacro %} {%- endmacro %}

View File

@ -8,30 +8,34 @@
<div id="user_profile_container"> <div id="user_profile_container">
<div id="user_profile"> <div id="user_profile">
<div id="pictures"> <div id="right_column">
{% if profile.profile_pict %} <div id="pictures">
<img src="{{ profile.profile_pict.get_download_url() }}" alt="{% trans %}Profile{% endtrans %}" /> {% if profile.profile_pict %}
{% endif %} <img src="{{ profile.profile_pict.get_download_url() }}" alt="{% trans %}Profile{% endtrans %}" />
<p><em>{{ profile.quote }}</em></p> {% endif %}
</div>
<p id="quote"><em>{{ profile.quote }}</em></p>
</div>
<div id="left_column">
<h4>{{ profile.get_full_name() }}</h4>
{% if profile.nick_name %}
<p id="nickname">&laquo; {{ profile.nick_name }} &raquo;</p>
{% endif %}
{% if profile.date_of_birth %}
<p>{% trans %}Born: {% endtrans %}{{ profile.date_of_birth|date("d/m/Y") }}</p>
{% endif %}
{% if profile.department != "NA" %}
<p>{{ profile.department }}{{ profile.semester }}
{% endif %}
{% if profile.dpt_option %}
<br>{% trans %}Option: {% endtrans %}{{ profile.dpt_option }}
{% endif %}
</p>
{% if profile.promo %}
<p><img src="{{ static('core/img/promo_%02d.png' % profile.promo) }}" alt="Promo {{ profile.promo }}" class="promo_pict" />
{% trans %}Promo: {% endtrans %}{{ profile.promo }}</p>
{% endif %}
</div> </div>
<h4>{{ profile.get_full_name() }}</h4>
{% if profile.nick_name %}
<p id="nickname">&laquo; {{ profile.nick_name }} &raquo;</p>
{% endif %}
{% if profile.date_of_birth %}
<p>{% trans %}Born: {% endtrans %}{{ profile.date_of_birth|date("d/m/Y") }}</p>
{% endif %}
{% if profile.department != "NA" %}
<p>{{ profile.department }}{{ profile.semester }}
{% endif %}
{% if profile.dpt_option %}
<br>{% trans %}Option: {% endtrans %}{{ profile.dpt_option }}
{% endif %}
</p>
{% if profile.promo %}
<p><img src="{{ static('core/img/promo_%02d.png' % profile.promo) }}" alt="Promo {{ profile.promo }}" class="promo_pict" />
{% trans %}Promo: {% endtrans %}{{ profile.promo }}</p>
{% endif %}
</div> </div>
</div> </div>