File: nav.html

package info (click to toggle)
mkdocs-bootstrap 0.2.0%2Bdfsg-0.1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 140 kB
  • sloc: python: 19; makefile: 5
file content (81 lines) | stat: -rw-r--r-- 3,553 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<div class="navbar navbar-default navbar-fixed-top" 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>

            {%- block site_name %}
            <a class="navbar-brand" href="{{ nav.homepage.url }}">{{ config.site_name }}</a>
            {%- endblock %}
        </div>

        <!-- Expanded navigation -->
        <div class="navbar-collapse collapse">
            {%- block site_nav %}
            <!-- Main navigation -->
            <ul class="nav navbar-nav">
            {% for nav_item in nav %}
            {% if nav_item.children %}
                <li class="dropdown{% if nav_item.active %} active{% endif %}">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ nav_item.title }} <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                    {% for nav_item in nav_item.children %}
                        <li {% if nav_item.active %}class="active"{% endif %}>
                            <a href="{{ nav_item.url }}">{{ nav_item.title }}</a>
                        </li>
                    {% endfor %}
                    </ul>
                </li>
            {% else %}
                <li {% if nav_item.active %}class="active"{% endif %}>
                    <a href="{{ nav_item.url }}">{{ nav_item.title }}</a>
                </li>
            {% endif %}
            {% endfor %}
            </ul>
            {%- endblock %}

            <!-- Search, Navigation and Repo links -->
            <ul class="nav navbar-nav navbar-right">
                {%- block search_button %} {%- endblock %}

                {%- block next_prev %}
                {%- if page and (page.next_page or page.previous_page) %}
                    <li {% if not page.previous_page %}class="disabled"{% endif %}>
                        <a rel="next" {% if page.previous_page %}href="{{ page.previous_page.url }}"{% endif %}>
                            <i class="fa fa-arrow-left"></i> Previous
                        </a>
                    </li>
                    <li {% if not page.next_page %}class="disabled"{% endif %}>
                        <a rel="prev" {% if page.next_page %}href="{{ page.next_page.url }}"{% endif %}>
                            Next <i class="fa fa-arrow-right"></i>
                        </a>
                    </li>
                {%- endif %}
                {%- endblock %}

                {%- block repo %}
                {% if config.repo_url %}
                <li>
                    <a href="{{ config.repo_url }}">
                        {% if config.repo_name == 'GitHub' %}
                            <i class="fa fa-github"></i>
                        {% elif config.repo_name == 'Bitbucket' %}
                            <i class="fa fa-bitbucket"></i>
                        {% endif %}
                        {{ config.repo_name }}
                    </a>
                </li>
                {% endif %}
                {%- endblock %}
            </ul>
        </div>
    </div>
</div>