diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-06-16 12:34:21 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-06-16 12:34:21 +0000 |
commit | 9af2bc8907ed8904a66fdab8346d89cb1c77dd32 (patch) | |
tree | 57f8173111196da21fd0fa46bb663dbb45509bb6 | |
parent | 63969337a9d9276ea67d31018e809a87c31c0945 (diff) | |
parent | d8209aebdc6e082412161f75d0c6c8e5d1093f6f (diff) | |
download | gitlab-ce-9af2bc8907ed8904a66fdab8346d89cb1c77dd32.tar.gz |
Merge branch 'header_layout_issue' into 'master'
Fix layout issue in header title truncation.
@douwe Thanks for reviewing this fix for the issue mentioned in https://dev.gitlab.org/gitlab/gitlabhq/issues/2314#note_48539.
**BEFORE**

**AFTER**

See merge request !1867
-rw-r--r-- | app/assets/stylesheets/generic/header.scss | 19 | ||||
-rw-r--r-- | app/assets/stylesheets/generic/mobile.scss | 3 | ||||
-rw-r--r-- | app/views/layouts/header/_default.html.haml | 5 | ||||
-rw-r--r-- | app/views/layouts/header/_public.html.haml | 4 |
4 files changed, 14 insertions, 17 deletions
diff --git a/app/assets/stylesheets/generic/header.scss b/app/assets/stylesheets/generic/header.scss index 5e8701830e7..8f17232592e 100644 --- a/app/assets/stylesheets/generic/header.scss +++ b/app/assets/stylesheets/generic/header.scss @@ -98,16 +98,16 @@ header { height: $header-height; .title { - position: relative; - float: left; margin: 0; - margin-left: 35px; + padding: 0 15px 0 35px; + overflow: hidden; font-size: 18px; line-height: $header-height; font-weight: bold; color: #444; - - @include str-truncated(37%); + text-overflow: ellipsis; + vertical-align: top; + white-space: nowrap; a { color: #444; @@ -116,6 +116,10 @@ header { } } } + + .navbar-collapse { + float: right; + } } .search { @@ -167,10 +171,6 @@ header { } @media (max-width: $screen-md-max) { - header .container .title { - max-width: 43%; - } - .header-collapsed, .header-expanded { @include collapsed-header; } @@ -190,7 +190,6 @@ header { font-size: 18px; .title { - max-width: 70%; } .navbar-nav { diff --git a/app/assets/stylesheets/generic/mobile.scss b/app/assets/stylesheets/generic/mobile.scss index f04c8eef904..a49775daf8b 100644 --- a/app/assets/stylesheets/generic/mobile.scss +++ b/app/assets/stylesheets/generic/mobile.scss @@ -61,8 +61,7 @@ } .container .title { - margin-left: 15px !important; - max-width: 70% !important; + padding-left: 15px !important; } .issue-info, .merge-request-info { diff --git a/app/views/layouts/header/_default.html.haml b/app/views/layouts/header/_default.html.haml index 8b4510d6516..4ec50f35890 100644 --- a/app/views/layouts/header/_default.html.haml +++ b/app/views/layouts/header/_default.html.haml @@ -5,9 +5,6 @@ = brand_header_logo %h3 GitLab .header-content - %h1.title - = title - %button.navbar-toggle %span.sr-only Toggle navigation = icon('bars') @@ -43,4 +40,6 @@ = link_to destroy_user_session_path, class: 'logout', method: :delete, title: 'Sign out', data: {toggle: 'tooltip', placement: 'bottom'} do = icon('sign-out') + %h1.title= title + = render 'shared/outdated_browser' diff --git a/app/views/layouts/header/_public.html.haml b/app/views/layouts/header/_public.html.haml index 6a031722aaa..2c5884a5b6d 100644 --- a/app/views/layouts/header/_public.html.haml +++ b/app/views/layouts/header/_public.html.haml @@ -5,10 +5,10 @@ = brand_header_logo %h3 GitLab .header-content - %h1.title= title - - unless current_controller?('sessions') .pull-right = link_to "Sign in", new_session_path(:user, redirect_to_referer: 'yes'), class: 'btn btn-sign-in btn-success btn-sm' + %h1.title= title + = render 'shared/outdated_browser' |