diff options
author | Job van der Voort <job@gitlab.com> | 2014-06-14 11:18:00 +0200 |
---|---|---|
committer | Job van der Voort <job@gitlab.com> | 2014-06-14 11:18:00 +0200 |
commit | d718209b47022abe8a28a7267cd40569bd7ec06a (patch) | |
tree | 51a49d4875685676ca59bb4045eb8c398d409c19 | |
parent | 8b6dd9d4a802eeba5fa4f7e10d738a2af5e87d98 (diff) | |
download | gitlab-ce-d718209b47022abe8a28a7267cd40569bd7ec06a.tar.gz |
responsive sidebar on dashboard
-rw-r--r-- | app/assets/javascripts/sidebar.js.coffee | 6 | ||||
-rw-r--r-- | app/assets/stylesheets/generic/sidebar.scss | 6 | ||||
-rw-r--r-- | app/views/dashboard/show.html.haml | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/app/assets/javascripts/sidebar.js.coffee b/app/assets/javascripts/sidebar.js.coffee index 71e29d9ce00..13b3c8a18b1 100644 --- a/app/assets/javascripts/sidebar.js.coffee +++ b/app/assets/javascripts/sidebar.js.coffee @@ -1,11 +1,12 @@ responsive_resize = -> current_width = $(window).width() if current_width < 985 - $('.side').addClass("ui right wide sidebar") + $('.responsive-side').addClass("ui right wide sidebar") else - $('.side').removeClass("ui right wide sidebar") + $('.responsive-side').removeClass("ui right wide sidebar") $ -> + # Depending on window size, set the sidebar offscreen. responsive_resize() $('.ui.sidebar') @@ -22,6 +23,7 @@ $ -> container.sidebar "hide" if not container.is(e.target) and container.has(e.target).length is 0 return +# On resize, check if sidebar should be offscreen. $(window).resize -> responsive_resize() return diff --git a/app/assets/stylesheets/generic/sidebar.scss b/app/assets/stylesheets/generic/sidebar.scss index 46f829b67bf..eab80ee72bb 100644 --- a/app/assets/stylesheets/generic/sidebar.scss +++ b/app/assets/stylesheets/generic/sidebar.scss @@ -7,12 +7,11 @@ } .sidebar-expand-button { - background: #fff; + background: #f9f9f9; color: #555; - padding: 10px 15px; + padding: 9px 12px 6px 14px; border: 1px solid #E1E1E1; border-right: 0; - border-radius: 3px; position: fixed; top: 108px; right: 0px; @@ -22,7 +21,6 @@ -moz-transition: all 0.4s; -webkit-transition: all 0.4s; - &:hover { background: #ddd; color: #333; diff --git a/app/views/dashboard/show.html.haml b/app/views/dashboard/show.html.haml index cf6119672d7..9fd32cdc69e 100644 --- a/app/views/dashboard/show.html.haml +++ b/app/views/dashboard/show.html.haml @@ -2,7 +2,7 @@ .dashboard.row .activities.col-md-8 = render 'activities' - .side.col-md-4 + .side.col-md-4.responsive-side = render 'sidebar' .sidebar-expand-button.hidden-lg.hidden-md |