40 lines
1.4 KiB
HTML
40 lines
1.4 KiB
HTML
<div class="navbar navbar-default">
|
|
<div class="container">
|
|
<div class="navbar-header">
|
|
<button type="button" class="navbar-toggle" data-toggle="collapse"
|
|
data-target=".navbar-responsive-collapse">
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
</button>
|
|
<a class="navbar-brand" href="index">{{ brand_html or "<i class='icon-home'></i>"}}</a>
|
|
</div>
|
|
<div class="collapse navbar-collapse navbar-responsive-collapse">
|
|
<ul class="nav navbar-nav">
|
|
{%- for page in top_bar_items -%}
|
|
{% if not page.parent_label -%}
|
|
<li data-label="{{ page.label }}" {% if page.child_items %} class="dropdown"{% endif %}>
|
|
<a href="{{ page.url or '#' }}" {% if page.child_items %} class="dropdown-toggle" onclick="return false;" data-toggle="dropdown"{% endif %} {{ page.target or ''}}>
|
|
{{ page.label }}
|
|
{%- if page.child_items -%}
|
|
<b class="caret"></b>
|
|
</a>
|
|
<ul class="dropdown-menu">
|
|
{%- for child in page.child_items -%}
|
|
<li data-label="{{ child.label }}">
|
|
<a {% if child.indent %} style="padding-left: {{(int(child.indent)+1)*15 }}px"{% endif %} href="{{ child.url }}" {{ child.target or '' }}>{{ child.label }}</a>
|
|
</li>
|
|
{%- endfor -%}
|
|
</ul>
|
|
{%- else -%}
|
|
</a>
|
|
{%- endif -%}
|
|
</li>
|
|
{%- endif -%}
|
|
{%- endfor %}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>$('.dropdown-toggle').dropdown()</script>
|