<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="nl" >
    <head>
        <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8"/>
        <meta name="author" content="Maarten van Gompel" />
        <title>FoLiA Linguistic Annotation Tool</title>
        <script type="text/javascript" src="/style/jquery-1.10.2.min.js"></script>
        <script type="text/javascript" src="/style/jquery-ui.min.js"></script>
        {% if namespace == "testflat" %}
            <link rel="StyleSheet" href="/style/qunit-1.15.0.css" type="text/css" />
            <script type="text/javascript" src="/style/qunit-1.15.0.js"></script>
            <script type="text/javascript" src="/style/testflat.js"></script>
        {% endif %}
        <link rel="StyleSheet" href="/style/flat.css" type="text/css" />
        <script type="text/javascript" src="/style/flat.js"></script> 
        {% block head %}
        {% endblock %}
        {% if mode %}
        <link rel="StyleSheet" href="/style/flat.{{ mode }}.css" type="text/css" />
        <script type="text/javascript" src="/style/flat.{{ mode }}.js"></script> 
        {% endif %}
        {% if docid %}
        <script type="text/javascript">
            configuration = {{ configuration_json|safe }};
            username = "{{ username|safe }}";
            namespace = "{{ namespace|safe }}";
            docid = "{{ docid|safe }}";
            modes = {{ modes_json|safe }};
            mode = "{{ mode }}";
            {% if docdeclarations %}
            initialdeclarationlist = {{ docdeclarations|safe }};
            {% endif %}
            {% if docannotations %}
            initialannotationlist = {{ docannotations|safe }};
            {% endif %}
            {% if setdefinitions %}
            setdefinitions = {{ setdefinitions|safe }};
            {% endif %}
            {% block js %}
            {% endblock js %}
        </script>
        {% endif %}
    </head>
    <body>
        <div id="topbar">
            <div class="left">
            <nav>
                {% if docid %}
                <ul>
                <li>Modes
                <ul>
                        {% for mode, modename in modes %}
                        <li><a href="/{{ mode }}/{{ namespace }}/{{ docid }}/">{{ modename }}</a></li>
                        {% endfor %}
                </ul>
                </li>
                {% block menu %}
                {% endblock %}
                </ul>
                {% endif %}
            </nav>
            </div>
            {% if docid %}
                <span class="title"><img src="/style/logo.svg" alt="FoLiA Linguistic Annotation Tool" /> {{ docid }}</span>
                {% else %}
                <span class="title"><img src="/style/logo.svg" alt="FoLiA Linguistic Annotation Tool" /> FoLiA Linguistic Annotation Tool</span>
            {% endif %}
            <div class="right">
            <ul>
            {% block topbar_right %}
            {% endblock %}
            {% if loggedin %}
            <li><a href="/">My Documents</a></li>
            <li><a href="/logout/">Log out {{ username }}</a></li>
            {% endif %}
            </ul>
            </div>
            <span style="clear: both"></span>
        </div>

        {% block dialogs %}
        {% endblock %}

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


        {% if namespace == "testflat" %}
        <div id="qunit"></div>
        <div id="qunit-fixture"></div>
        {% endif %}
        
        <div id="wait">
            <img src="/style/loader.gif" alt="processing" />
        </div>

        <div id="footer">
            <a href="http://proycon.github.io/folia"><strong>FoLiA Linguistic Annotation Tool</strong></a> ({{ version }}) - by Maarten van Gompel - Centre for Language and Speech Technology - Radboud University Nijmegen
        </div>
    </body>
</html>
