nav.css
(sidebar)
static sidebar
The sidebar is based on the same nav.js as the navbars.
The key difference of the sidebar is to:
- wrap the html inside a <ul> tag (instead of <nav>) and
- use <li> tags (instead of <a>) for the sidebar items.
The dropdown behavior is realized by adding
The class
Optionally you can add
HTML
|
JS OPTIONAL
CSS
dynamic sidebar
The content of this sidebar is generated from data. The data is an array of objects (=list of dictionaries), where each object represents a sidebar item. Each item has the key 'name' and optionally the key 'children', which again can be a list of items, creating a dropdown.
As this dynamics sidebar is no longer defined in html, assigning functions to the sidebar items works differently.
One function must provided as parameter to
As fourth parameter, you can provide an object with additional options.
In the below example, the function
DATA Munich
|
{{id-end}}