| |
| {% set not_doc_page_titles = ['Home', 'Quick Start', 'About', 'Talks', 'Download', 'Community', 'Events'] %} |
| |
| {% macro active_nav(page, title, classes) %} |
| class="{% if (page and page.title == title) or (title == 'Home' and meta and meta.sub_page) %}active {% endif %}{{ classes }}" |
| {% endmacro %} |
| |
| {% macro docs_are_active(page) %} |
| class="{% if (not page or not page.title in not_doc_page_titles) and (not meta or not meta.sub_page) %}active{% endif %}" |
| {% endmacro %} |
| |
| <nav id="navbar" class="navbar navbar-inverse affix-top" data-spy="affix" data-offset-top="150" role="navigation"> |
| <div class="container"> |
| <!-- Collapsed navigation --> |
| <div class="navbar-header"> |
| <!-- Expander button --> |
| <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> |
| <span class="sr-only">Toggle navigation</span> |
| <span class="icon-bar"></span> |
| <span class="icon-bar"></span> |
| <span class="icon-bar"></span> |
| </button> |
| |
| </div> |
| |
| <!-- Expanded navigation --> |
| <div class="navbar-collapse collapse"> |
| <!-- Main navigation --> |
| <ul class="nav navbar-nav navbar-right"> |
| <li {{ active_nav(current_page, 'Home') }}> |
| <a href="/"><i class="fa fa-home" style="font-size: larger;"></i></a> |
| </li> |
| <li {{ active_nav(current_page, 'Quick Start', "important") }}> |
| <a href="/quick-start/">Quick Start</a> |
| </li> |
| <li {{ active_nav(current_page, 'About') }}> |
| <a href="/about/">About</a> |
| </li> |
| <li {{ active_nav(current_page, 'Talks') }}> |
| <a href="/talks/">Talks</a> |
| </li> |
| <li {{ docs_are_active(current_page) }}> |
| <a href="/documentation/">Documentation</a> |
| </li> |
| <li {{ active_nav(current_page, 'Download') }}> |
| <a href="/download/">Download</a> |
| </li> |
| <li {{ active_nav(current_page, 'Community') }}> |
| <a href="/community/">Community</a> |
| </li> |
| <li {{ active_nav(current_page, 'Events') }}> |
| <a href="/events/">Events</a> |
| </li> |
| </ul> |
| |
| </div> |
| </div> |
| </nav> |