<!DOCTYPE html>
<html>
  <head>
    <meta name="viewport" content="width-device-width, initial-scale=1.0">

    {% include 'js.html' %}
    {% include 'style.html' %}
    {% block head %}
    {% endblock %}

    {% set proj = md['title'] or 'Browse ASE Database' %}

    <title>{% block title %}{% endblock %}</title>

</head>

<body {% block BodySettings %}{% endblock %}>

    {% if projects|length != 0 %}
    <div class="container" style="padding: 0px;">
        <div class="row">
            <div class="col-xs-7">
            </div>

            <div class="col-xs-5">

                <nav class="navbar navbar-default">
                    <div class="container-fluid">

                        <ul class="nav navbar-nav navbar-right">
                        {% if home %}
                            <li>
                                <a href="{{ home }}">CMR</a>
                            </li>

                            <li>
                                <a href="{{ home }}{{ project }}/{{ project }}.html">More information</a>
                            </li>
                        {% endif %}

                            <li class="dropdown">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                                    {{proj}} <span class="caret"></span>
                                </a>

                                <ul class="dropdown-menu">
                                {% for proj_iter in projects %}
                                    <li>
                                    <a href="/?project={{ proj_iter[0] }}">{{proj_iter[1]}}</a>
                                    </li>
                                {% endfor %}
                                </ul>
                            </li>
                        </ul>

                    </div>
                </nav>
            </div>
      </div>
      <!--end of row-->
    </div> <!--end of container-->
    {% endif %}

    {% block content %}
    {% endblock %}

</body>
</html>