Commit ab04bb6f authored by Tobias Schmidt's avatar Tobias Schmidt

Add support for subsections

parent cc9e98ac
......@@ -281,7 +281,7 @@ footer {
text-decoration: none;
}
.side-nav ul.active li.active {
.side-nav li.current {
border-left: 3px solid #e6522c;
margin-left: -2px;
font-weight: bold;
......@@ -291,6 +291,10 @@ footer {
border-left: 1px solid #e9eff2;
}
.side-nav li li li a {
padding: 5px 15px 5px 40px;
}
.doc-content {
font-size: 16px;
}
......
......@@ -12,14 +12,18 @@ def nav(root_item, buffer='', layer=0)
end
if nav_active?(root_item)
buffer << "<li class=\"active\">"
buffer << "<li class=\"active #{"current" unless children.any?}\">"
else
buffer << "<li>"
end
title = nav_title_of(root_item)
if layer == 0
buffer << "<span class=\"nav-header\"><i class=\"fa fa-#{root_item[:nav_icon]}\"></i> <span>#{title}</span></span>"
if children.any?
if layer == 0
buffer << "<span class=\"nav-header\"><i class=\"fa fa-#{root_item[:nav_icon]}\"></i> <span>#{title}</span></span>"
else
buffer << "<span class=\"nav-subheader\">#{title}</span>"
end
else
buffer << link_to(title, root_item.path)
end
......
......@@ -15,7 +15,7 @@ $(document).ready(function() {
}
};
$('.nav-header span').each(function() {
$('.nav-header span,.nav-subheader').each(function() {
var link = $('<a href="#">').text($(this).text()).click(navToggle);
$(this).replaceWith(link);
});
......
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