{% load navsy_tags static %}
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8"/>
        <meta content="ie=edge" http-equiv="x-ua-compatible"/>
        <meta content="width=device-width, initial-scale=1.0" name="viewport"/>
        {% navsy_title base="django-navsy - Navigation system for lazy devs." html=True %}
        {% navsy_languages_alternate_href %}
        <link rel="stylesheet" href="{% static 'navsy/css/default.css' %}" />
    </head>
    <body>

        <h1 class="h2"><a href="{% url 'admin:app_list' 'navsy' %}">django-navsy</a></h1>
        <p>Navigation system for lazy devs. [<a class="github" href="http://github.com/fabiocaccamo/django-navsy" target="_blank">GitHub</a>]</p>

        <div class="languages-wrapper">
            <h2 class="h5">Languages:</h2>
            {% navsy_languages_menu label="name" select=True %}
            {% navsy_languages_menu label="code" select=True %}
            {% navsy_languages_menu label="name" %}
            {% navsy_languages_menu label="short_name" %}
            {% navsy_languages_menu label="code" %}
            {% navsy_languages_menu label="code" languages="en it" %}
        </div>

        <div class="breadcrumbs-wrapper">
            <h2 class="h5">Breadcrumbs:</h2>
            {% navsy_breadcrumbs %}
        </div>

        <div class="pages-wrapper">
            <h2 class="h5"><a href="{% url 'admin:navsy_page_changelist' %}">Pages</a>:</h2>
            {% navsy_menu select=True label="name" %}
            {% navsy_menu select=True label="path" %}
            {% navsy_menu select=True label="tree" %}
            {% navsy_menu select=True label="tree-small" %}
            {% navsy_menu select=True levels=1 %}
            {% navsy_menu %}
        </div>

        <div class="routes-wrapper">
            <h2 class="h5"><a href="{% url 'admin:navsy_route_changelist' %}">Routes</a>:</h2>
            <div class="navsy-routes">
                <ul>
                    {% navsy_routes as routes %}
                    {% for route_data in routes %}
                    {% with route_data.object as route %}
                    <li class="{% navsy_is route 'active' %}"><p class="route">{{ route.url }}{% if route.redirect_url %} <span class="redirect"><span class="arrow">&rarr;</span> {{ route.redirect_url }}</span>{% endif %}{% if route == navsy_route and navsy_route_kwargs %} <code>{{ navsy_route_kwargs }}</code><code>{{ navsy_route_args }}</code>{% endif %}</p></li>
                    {% endwith %}
                    {% endfor %}
                </ul>
            </div>
        </div>

        <div class="routes-wrapper">
            <h2 class="h5"><a href="{% url 'admin:navsy_route_changelist' %}">Reverse</a>:</h2>
            <div class="navsy-routes">
                <ul>
                    {% navsy_routes as routes %}
                    {% for route_data in routes %}
                    {% with route_data.object as route %}
                    {% navsy_url route.view_name page="1" date_year="2017" date_month="04" date_day="03" slug="obj-slug" file_name="django-navsy" file_ext="zip" version_major="1" version_minor="0" as reversed_url %}
                    {% if route.view_name %}
                    <li><p class="route">{{ route.view_name }} <span class="arrow">&rarr;</span> <a href="{{ reversed_url }}">{{ reversed_url }}</a></p></li>
                    {% endif %}
                    {% endwith %}
                    {% endfor %}
                </ul>
            </div>
        </div>

        <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>

    </body>
</html>

