Commit 10912fb4 by Scott

SnowFlat: fix issues with user menu

Prevent long handle stretching user menu (adds ellipsis).
Remove handle when avatar is present, but keep handle when no avatar.
parent 5ab474cd
......@@ -711,6 +711,8 @@ blockquote p {
display: block;
cursor: pointer;
min-width: 60px;
min-height: 55px;
max-width: 80px;
padding: 2px;
background-color: #34495e;
text-align: center;
......@@ -742,6 +744,8 @@ blockquote p {
.qam-account-handle {
font-size: 12px;
line-height: 1.8;
overflow: hidden;
text-overflow: ellipsis;
}
.qam-account-items .qa-form-tall-button-login {
......
......@@ -45,7 +45,7 @@ class qa_html_theme extends qa_html_theme_base
private $welcome_widget_class = 'wet-asphalt';
private $ask_search_box_class = 'turquoise';
// Size of the user avatar in the navigation bar
private $nav_bar_avatar_size = 32;
private $nav_bar_avatar_size = 52;
/**
* Adding aditional meta for responsive design
......@@ -570,20 +570,23 @@ class qa_html_theme extends qa_html_theme_base
);
}
$auth_icon = strip_tags($tobar_avatar, '<img>');
$avatar = strip_tags($tobar_avatar, '<img>');
if (!empty($avatar))
$handle = '';
}
else {
// display login icon and label
$handle = $this->content['navigation']['user']['login']['label'];
$toggleClass = 'qam-logged-out';
$auth_icon = '<i class="icon-key qam-auth-key"></i>';
$avatar = '<i class="icon-key qam-auth-key"></i>';
}
// finally output avatar with div tag
$handleBlock = empty($handle) ? '' : '<div class="qam-account-handle">' . qa_html($handle) . '</div>';
$this->output(
'<div id="qam-account-toggle" class="' . $toggleClass . '">',
$auth_icon,
'<div class="qam-account-handle">' . qa_html($handle) . '</div>',
$avatar,
$handleBlock,
'</div>'
);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment