{% load i18n %}
{% load staticfiles %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="viewport" content="width=device-width,
                                     initial-scale=1.0,
                                     maximum-scale=1.0,
                                     user-scalable=no">
    <title>{% block title %}{% endblock %}</title>
    <link href="{% static "css/base.css" %}" rel="stylesheet" >
    <link href="{% static "css/pdf.css" %}" rel="stylesheet" >
    <link href="{% static "css/bootstrap.min.css" %}" rel="stylesheet" >
    <script type='text/javascript' src='{% static "js/jquery-3.4.1.min.js" %}'></script>
    <script type='text/javascript' src='{% static "js/bootstrap.bundle.js" %}'></script>
    <script type='text/javascript' src='{% static "js/bootstrap.min.js" %}'></script>
</head>

<body>
<header>
    <nav class="navbar navbar-light" style="background-color: #e3f2fd;">
         <ul class="nav">
            <li class="nav-item">
                <a class="nav-link active" href="{% url 'index_view' %}">{% trans "HomePage" %}</a>
            </li>
             {% get_current_language as LANGUAGE_CODE %}
             {% get_available_languages as LANGUAGES %}
             {% get_language_info_list for LANGUAGES as languages %}
             <li class="nav-item dropdown">
                 <a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                     {% trans "Languages" %}
                 </a>
                 <div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
                     {% for language in languages %}
                     <a class="dropdown-item" href="/{{ language.code }}/">{{ language.name_local }}</a>
                     {% endfor %}
<!--                     <a class="dropdown-item" href="#">{% trans "English" %}</a>-->
                     <a class="dropdown-item" href="#">{% trans "Japanese" %}</a>
                 </div>
             </li>
         </ul>
        <li class="nav-item dropdown form-inline my-2 my-lg-0">
            <a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink1" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                {% trans "User Operations" %}
            </a>
            <div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink1">
                {% if haslogged == None %}
                    <a class="dropdown-item" href="{% url "user:login" %}">{% trans "Login" %}</a>
                {% endif %}
                <a class="dropdown-item" href="{% url "user:register" %}">{% trans "New User?" %}</a>
                <a class="dropdown-item" href="{% url "user:profile_view" %}">{% trans "Profile" %}</a>
                {% if haslogged != None %}
                    <a class="dropdown-item" href="{% url "user:logout" %}">{% trans "Log Out" %}</a>
                {% endif %}
            </div>
        </li>
    </nav>
    <ul class="nav nav-pills">
        <li class="nav-item">
            <a class="nav-link disable">{% trans "Short Cuts:" %}</a>
        </li>
        <li class="nav-item">
            <a class="nav-link" href="#" onClick="javascript:history.back(-1);">{% trans "Back" %}</a>
        </li>
        <li class="nav-item">
            <a class="nav-link" href="{% url "cart:cart_detail" %}">{% trans "cart" %}</a>
        </li>
        <li class="nav-item">
            <a class="nav-link" href="{% url "order:order_list" %}">{% trans "Order" %}</a>
        </li>
        <li class="nav-item">
            <a class="nav-link" href="{% url "cart:cart_detail" %}">{% trans "Favorites" %}</a>
        </li>
    </ul>
</header>