{% load static %}
{% load humanize %}

<!DOCTYPE html>
<html lang="ja">
<head>
    <meta charset="UTF-8">
    <meta name="robots" content="none" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="format-detection" content="telephone=no">
    <title>{% block head_title %}{% endblock %}</title>
    <link rel="shortcut icon" href="{% static 'vacancy/images/favicon.ico' %}">
    <link rel="stylesheet" href="{% static 'lib/bootstrap/css/bootstrap.min.css' %}">
    <link rel="stylesheet" href="{% static 'vacancy/css/style.css' %}">
    <script type="text/javascript" src="{% static 'lib/jquery/jquery-3.4.1.min.js' %}"></script>
    <script type="text/javascript" src="{% static 'lib/bootstrap/js/bootstrap.min.js' %}"></script>
    <script type="text/javascript" src="{% static 'lib/popper/popper.min.js' %}"></script>
    <script type="text/javascript" src="{% static 'lib/vue/vue.min.js' %}"></script>
    <script type="text/javascript" src="{% static 'lib/axios/axios.min.js' %}"></script>
    {% block head %}{% endblock %}
</head>
<body>
    <div id="container">
        <div id="header" class="no-printing">
            <div class="row d-flex align-items-end">
                <div class="col col-4">
                    <div class="system_logo">
                        <a href="/menu/"><img src="{% static 'vacancy/images/logo.png' %}" alt="Logo"></a>
                    </div>
                </div>
                <div class="col col-8">
                    <div class="user_info text-right">
                        <p>ユーザ: {{ user.display_name | default_if_none:'' }}</p>
                    </div>
                </div>
            </div>
            {% block header %}{% endblock %}
        </div>

        <div id="navigation_bar">
            <nav class="navbar navbar-expand-md navbar-dark bg-dark">
                <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarMenu" aria-controls="navbarMenu" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>
                <div class="collapse navbar-collapse" id="navbarMenu">
                    <ul class="navbar-nav mr-auto mt-2 mt-lg-0">
                    <li class="nav-item">
                        <a class="nav-link" href="/menu/">TOP</a>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navMaster" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">空室情報</a>
                        <div class="dropdown-menu" aria-labelledby="navMaster">
                            <a class="dropdown-item" href="{% url 'menu_vacancy_list' %}">居住用空室一覧</a>
                            <a class="dropdown-item" href="{% url 'building_non_residential_building_list' %}">非居住用空室一覧</a>
                            <a class="dropdown-item" href="{% url 'building_search_name_building_list' %}">物件名検索</a>
                            <a class="dropdown-item" href="{% url 'garage_garage_list' %}">月極駐車場一覧</a>
                        </div>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="{% url 'documents_index' %}">書類一覧</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="/logout/">ログアウト</a>
                    </li>
                    </ul>
                </div>
            </nav>
        </div>

        <div class="row">
            <div class="col col-12 text-center">
                <h1 class="h1_title">{% block h1_title %}{% endblock %}</h1>
            </div>
        </div>

        {% if messages %}
        <div id="messages">
            <ul>
            {% for message in messages %}
                <li {% if message.tags %}class="{{ message.tags }}"{% endif %}>{{ message }}</li>
            {% endfor %}
            </ul>
        </div>
        {% endif %}

        <div id="contents">
            {% block contents %}{% endblock %}
        </div>

        <div id="footer">
            {% block footer %}{% endblock %}
        </div>
    </div>
    <footer class="no-printing">
        <img src="{% static 'vacancy/images/logo.png' %}" alt="logo">
        <p>Vasyworks</p>
    </footer>
</body>
</html>