more compact/readable html output for the menu section
[unfold.git] / views / templates / widget-topmenu.html
1 {# <a id='menu_logo' href="/"><img class="logo" src="{{ STATIC_URL }}img/myslice-logo.png" alt="MySlice" /></a> #}
2 {% insert_str prelude "js/bootstrap.js" %}
3 {% insert_str prelude "css/bootstrap.css" %}
4 {% insert_str prelude "css/topmenu.css" %}
5 {% insert_str prelude "js/logout.js" %}
6 <div class="navbar navbar-fixed-top">
7   <div class="navbar-inner">
8     <div class="container-fluid">
9       <a class="brand" href="/"><img src="{{ STATIC_URL }}img/myslice-logo.png" height="30" alt="MySlice logo" /></a>
10       <div class="nav-collapse topmenu">
11         <ul class="nav nav-pills" id='menu_ul'> {% for d in topmenu_items %} {% if d.is_active %}
12           <li class='active'> <a href="{{ d.href }}"> {{ d.label }} </a> </li> {% else %}
13           <li class='other'> <a href="{{ d.href }}"> {{ d.label }} </a> </li> {% endif %} {% endfor %}
14         </ul> {# logout.js will attach a click function on that button, which then retrieves the 'username' attribute #}
15         <span class="navbar-text pull-right"> {% if username %} Logged in as {{ username }}
16         <button id='logout' class='btn btn-danger' username='{{ username }}'>Logout</a> {% else %}Not logged in{% endif %}</span>
17       </div><!--nav-collapse-->
18     </div><!--container-fluid-->
19   </div><!--navbar-inner-->
20 </div><!--topmenu-->