Commit 16b1d3a3 authored by Annabel Dunstone's avatar Annabel Dunstone

Fix mobile dropdown bug

parent c37006fa
...@@ -209,6 +209,15 @@ ...@@ -209,6 +209,15 @@
float: right; float: right;
padding: 7px 0 0; padding: 7px 0 0;
@media (max-width: $screen-xs-min) {
float: none;
padding: 0 9px;
.dropdown-new {
width: 100%;
}
}
i { i {
color: $layout-link-gray; color: $layout-link-gray;
} }
...@@ -225,6 +234,10 @@ ...@@ -225,6 +234,10 @@
.dropdown { .dropdown {
margin-left: 7px; margin-left: 7px;
@media (max-width: $screen-xs-min) {
margin-left: 0;
}
} }
} }
...@@ -260,4 +273,10 @@ ...@@ -260,4 +273,10 @@
.page-with-layout-nav { .page-with-layout-nav {
margin-top: 50px; margin-top: 50px;
&.controls-dropdown-visible {
@media (max-width: $screen-xs-min) {
margin-top: 96px;
}
}
} }
...@@ -43,4 +43,12 @@ module NavHelper ...@@ -43,4 +43,12 @@ module NavHelper
class_name += " with-horizontal-nav" if defined?(nav) && nav class_name += " with-horizontal-nav" if defined?(nav) && nav
class_name class_name
end end
def layout_nav_class
"page-with-layout-nav" if defined?(nav) && nav
end
def layout_dropdown_class
"controls-dropdown-visible" if current_user
end
end end
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
.layout-nav .layout-nav
.container-fluid .container-fluid
= render "layouts/nav/#{nav}" = render "layouts/nav/#{nav}"
.content-wrapper{ class: ('page-with-layout-nav' if defined?(nav) && nav) } .content-wrapper{ class: "#{layout_nav_class} #{layout_dropdown_class}" }
= render "layouts/broadcast" = render "layouts/broadcast"
= render "layouts/flash" = render "layouts/flash"
= yield :flash_message = yield :flash_message
......
- if current_user - if current_user
- if access = @group.users.find_by(id: current_user.id) - if access = @group.users.find_by(id: current_user.id)
.controls .controls
%span.dropdown.group-settings-dropdown .dropdown.group-settings-dropdown
%a.dropdown-new.btn.btn-default#group-settings-button{href: '#', 'data-toggle' => 'dropdown'} %a.dropdown-new.btn.btn-default#group-settings-button{href: '#', 'data-toggle' => 'dropdown'}
= icon('cog') = icon('cog')
= icon('caret-down') = icon('caret-down')
......
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