GitLab steht aufgrund wichtiger Wartungsarbeiten am Montag, den 8. März, zwischen 17:00 und 19:00 Uhr nicht zur Verfügung.

Fix toggle of sidebar

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 1e7c4a25
......@@ -4,6 +4,7 @@ $(document).on("click", '.toggle-nav-collapse', (e) ->
expanded = 'page-sidebar-expanded'
$('.page-with-sidebar').toggleClass("#{collapsed} #{expanded}")
$('header').toggleClass("header-collapsed header-expanded")
$('.toggle-nav-collapse i').toggleClass("fa-angle-right fa-angle-left")
$.cookie("collapsed_nav", $('.page-with-sidebar').hasClass(collapsed), { path: '/' })
)
......@@ -36,12 +36,6 @@ header {
}
.app_logo {
@media (max-width: $screen-md-max) {
width: 52px;
h3 {
display: none;
}
}
border-bottom: 1px solid transparent;
margin-bottom: -1px;
......@@ -229,3 +223,26 @@ header {
right: 35px !important;
}
}
@media (max-width: $screen-md-max) {
.header-collapsed, .header-expanded {
width: 52px;
h3 {
display: none;
}
}
}
@media(min-width: $screen-md-max) {
.header-collapsed {
width: 52px;
h3 {
display: none;
}
}
.header-expanded {
}
}
......@@ -314,12 +314,4 @@ def path_to_key(key, admin = false)
profile_key_path(key)
end
end
def nav_sidebar_class
if nav_menu_collapsed?
"page-sidebar-collapsed"
else
"page-sidebar-expanded"
end
end
end
......@@ -2,4 +2,20 @@ module NavHelper
def nav_menu_collapsed?
cookies[:collapsed_nav] == 'true'
end
def nav_sidebar_class
if nav_menu_collapsed?
"page-sidebar-collapsed"
else
"page-sidebar-expanded"
end
end
def nav_header_class
if nav_menu_collapsed?
"header-collapsed"
else
"header-expanded"
end
end
end
%header.navbar.navbar-fixed-top.navbar-gitlab
%header.navbar.navbar-fixed-top.navbar-gitlab{ class: nav_header_class }
.navbar-inner
.container
%div.app_logo
......
%header.navbar.navbar-fixed-top.navbar-gitlab
%header.navbar.navbar-fixed-top.navbar-gitlab{ class: nav_header_class }
.navbar-inner
.container
%div.app_logo
= link_to explore_root_path, class: "home" do
= brand_header_logo
%h3 GitLab
%h1.title= title
%button.navbar-toggle{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", type: "button"}
......
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