connected-web / product-monitor

A HTML/JavaScript template for monitoring a product by encouraging product developers to gather all the information about the status of a product, including live monitoring, statistics, endpoints, and test results into one place.
8 stars 3 forks source link

Support multi-level navigation based on folder structure #49

Open Markavian opened 8 years ago

Markavian commented 8 years ago

Support multi-level navigation based on folder structure.

For example this file/folder structure:

- config/content/
  - index.content.html
  - news.content.html
  - monitors/
    - health.content.html
    - video.content.html
    - weekly-users.content.html 
    - monthly-users.content.html 

Might produce:

var navigation = [{
    linkText: "Index",
    href: "/",
    divider: true
}, {
    linkText: "News",
    href: "/content/news"
}, {
    linkText: "Monitors",
    items: [{
        linkText: "Health",
        href: "/content/monitors/health"
    },{
        linkText: "Video",
        href: "/content/monitors/video"
    },{
        linkText: "Weekly Users",
        href: "/content/monitors/weekly-users"
    },{
        linkText: "Monthly Users",
        href: "/content/monitors/monthly-users"
    }]
}]