feat(nav): complete Tier 1 hierarchical navigation
Add config option [nav] nested (defaults false), update base.html template with nested nav rendering, and add .nav-children CSS styling for indented section children. - Add NavConfig struct with nested: bool - Template renders item.children in .nav-children div - CSS: left border + indent for nested items
This commit is contained in:
@@ -121,6 +121,8 @@ pub struct ConfigContext {
|
||||
pub title: String,
|
||||
pub author: String,
|
||||
pub base_url: String,
|
||||
/// Whether to display nested navigation
|
||||
pub nested_nav: bool,
|
||||
}
|
||||
|
||||
impl From<&SiteConfig> for ConfigContext {
|
||||
@@ -129,6 +131,7 @@ impl From<&SiteConfig> for ConfigContext {
|
||||
title: config.title.clone(),
|
||||
author: config.author.clone(),
|
||||
base_url: config.base_url.clone(),
|
||||
nested_nav: config.nav.nested,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user