Commit ab04bb6f authored by Tobias Schmidt's avatar Tobias Schmidt

Add support for subsections

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