Commit 48f4f76c authored by Mike Greiling's avatar Mike Greiling

add active states to sidebar nav

parent a167897b
...@@ -59,14 +59,21 @@ ...@@ -59,14 +59,21 @@
} }
} }
.active > a {
color: $black;
}
ul.wiki-pages, ul.wiki-pages,
ul.wiki-pages li { ul.wiki-pages li {
list-style: none; list-style: none;
display: block;
padding: 0; padding: 0;
margin: 0; margin: 0;
} }
ul.wiki-pages li {
margin: 5px 0 10px;
}
.wiki-sidebar-header { .wiki-sidebar-header {
padding: 0 $gl-padding $gl-padding; padding: 0 $gl-padding $gl-padding;
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
%a.gutter-toggle.pull-right.visible-xs-block.visible-sm-block.js-sidebar-wiki-toggle{ href: "#" } %a.gutter-toggle.pull-right.visible-xs-block.visible-sm-block.js-sidebar-wiki-toggle{ href: "#" }
= icon('angle-double-right') = icon('angle-double-right')
= link_to namespace_project_wikis_git_access_path(@project.namespace, @project) do - git_access_url = namespace_project_wikis_git_access_path(@project.namespace, @project)
= link_to git_access_url, class: active_nav_link?(path: 'wikis#git_access') ? 'active' : '' do
= succeed ' ' do = succeed ' ' do
= icon('cloud-download') = icon('cloud-download')
Clone repository Clone repository
...@@ -11,9 +12,10 @@ ...@@ -11,9 +12,10 @@
.blocks-container .blocks-container
.block.block-first .block.block-first
%ul.wiki-pages %ul.wiki-pages
%li %li{ class: params[:id] == 'home' ? 'active' : '' }
= link_to 'Home', namespace_project_wiki_path(@project.namespace, @project, :home) = link_to 'Home', namespace_project_wiki_path(@project.namespace, @project, :home)
%li
%li{ class: active_nav_link?(path: 'wikis#pages') ? 'active' : '' }
= link_to 'Pages', namespace_project_wikis_pages_path(@project.namespace, @project) = link_to 'Pages', namespace_project_wikis_pages_path(@project.namespace, @project)
= render 'projects/wikis/new' = render 'projects/wikis/new'
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