{% load static %}
{% load django_ledger %}
{% load cache %}
{% load i18n %}
{% now "Y" as current_year %}

<nav class="navbar is-light" role="navigation" aria-label="main navigation">
    <div class="container">
        <div class="navbar-brand">
            <a class="navbar-item" href="{% url 'django_ledger:home' %}">
                <img src="{% static 'django_ledger/logo/django-ledger-logo_1.png' %}" height="28">
            </a>
            <a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false"
               data-target="djl-navbar-menu">
                <span aria-hidden="true"></span>
                <span aria-hidden="true"></span>
                <span aria-hidden="true"></span>
            </a>
        </div>

        <div id="djl-navbar-menu" class="navbar-menu">
            {% navigation_menu 'mobile' %}
            <div class="navbar-end">
                {% if tx_digest_context.IO_RESULT.ce_from_date %}
                    <div class="navbar-item">CE FROM: {{ tx_digest_context.IO_RESULT.ce_from_date | date }}</div>
                {% endif %}
                {% if tx_digest_context.IO_RESULT.ce_to_date %}
                    <div class="navbar-item">CE TO: {{ tx_digest_context.IO_RESULT.ce_to_date | date }}</div>
                {% endif %}
                <div class="navbar-item">
                    <form action="{% url 'django_ledger:logout' %}" method="POST">
                        {% csrf_token %}
                        <button
                            id="djl-el=logout-button-nav"
                            class="button is-small is-danger is-outlined"
                            type="submit">
                            {% trans 'Logout' %}
                        </button>
                    </form>
                </div>
                <div class="navbar-item">{% feedback_button %}</div>
                <div class="navbar-item">v{% current_version %}</div>
            </div>
        </div>
    </div>

</nav>