Fixed user card wrapping issues.

This commit is contained in:
flash 2018-08-16 04:02:27 +02:00
parent acf0dda67a
commit bcd56a23e7
4 changed files with 15 additions and 4 deletions

View file

@ -216,6 +216,10 @@
text-decoration: none; text-decoration: none;
display: block; display: block;
text-align: right; text-align: right;
text-overflow: ellipsis;
max-width: 150px;
overflow: hidden;
white-space: nowrap;
@media (min-width: @site-mobile-width) { @media (min-width: @site-mobile-width) {
&:hover { &:hover {

View file

@ -50,6 +50,9 @@
&__name { &__name {
font-size: 1.4em; font-size: 1.4em;
line-height: 1.4em; line-height: 1.4em;
text-overflow: ellipsis;
max-width: 220px;
overflow: hidden;
} }
&__info { &__info {
@ -64,6 +67,10 @@
color: inherit; color: inherit;
text-decoration: none; text-decoration: none;
flex: 0 0 auto; flex: 0 0 auto;
text-overflow: ellipsis;
max-width: 150px;
overflow: hidden;
white-space: nowrap;
&--active { &--active {
pointer-events: auto; pointer-events: auto;

View file

@ -55,7 +55,7 @@
style="{{ current_user.user_colour|html_colour({ style="{{ current_user.user_colour|html_colour({
'color': '%s', 'color': '%s',
'text-shadow': '0 0 5px %s', 'text-shadow': '0 0 5px %s',
}) }}"> }) }}" title="{{ current_user.username }}">
{{ current_user.username }} {{ current_user.username }}
</a> </a>
{% else %} {% else %}

View file

@ -1,7 +1,7 @@
{% macro user_card(user, profile_url, rank_url) %} {% macro user_card(user, profile_url, rank_url) %}
<div class="usercard"> <div class="usercard">
<a href="{{ profile_url|default('/profile.php?u=%d')|format(user.user_id) }}" <a href="{{ profile_url|default('/profile.php?u=%d')|format(user.user_id) }}"
class="usercard__background"></a> class="usercard__background" title="{{ user.username }}"></a>
<div class="usercard__container"> <div class="usercard__container">
<div class="avatar usercard__avatar" <div class="avatar usercard__avatar"
@ -19,7 +19,7 @@
<div class="usercard__info"> <div class="usercard__info">
{% if user.user_country is defined %} {% if user.user_country is defined %}
<div class="flag flag--{{ user.user_country|lower }} usercard__item usercard__item--country" title="{{ user.user_country|country_name }}"> <div class="flag flag--{{ user.user_country|lower }} usercard__item usercard__item--country usercard__item--active" title="{{ user.user_country|country_name }}">
{{ user.user_country }} {{ user.user_country }}
</div> </div>
{% endif %} {% endif %}
@ -29,7 +29,7 @@
</a>#} </a>#}
{% if user.user_title is defined %} {% if user.user_title is defined %}
<a class="usercard__item usercard__item--title{% if user.role_id is defined %} usercard__item--active{% endif %}"{% if user.role_id is defined %} href="{{ rank_url|default('/members.php?r=%d')|format(user.role_id) }}"{% endif %}> <a class="usercard__item usercard__item--title{% if user.role_id is defined %} usercard__item--active{% endif %}"{% if user.role_id is defined %} href="{{ rank_url|default('/members.php?r=%d')|format(user.role_id) }}"{% endif %} title="{{ user.user_title }}">
{{ user.user_title }} {{ user.user_title }}
</a> </a>
{% endif %} {% endif %}