<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{{ title }}</title>
    {% block scripts %}
        <script src="{{ url_for('static', filename='js/jquery-3.2.1.min.js') }}" type="text/JavaScript"></script>
        <script src="{{ url_for('static', filename='js/popper.min.js') }}" type="text/JavaScript"></script>
        <script src="{{ url_for('static', filename='js/bootstrap.min.js') }}" type="text/JavaScript"></script>
        <script src="{{ url_for('static', filename='js/bootstrap-notify.min.js') }}" type="text/JavaScript"></script>
        <script src="{{ url_for('static', filename='js/jquery-ui.min.js') }}" type="text/JavaScript"></script>
        <script src="{{ url_for('static', filename='js/jquery.cookie-1.4.1.min.js') }}" type="text/JavaScript"></script>
        {% if debug %}
            <script src="{{ url_for('static', filename='js/dgenies.js') }}" type="text/JavaScript"></script>
            <script src="{{ url_for('static', filename='js/dgenies.prototypes.js') }}" type="text/JavaScript"></script>
        {% else %}
            <script src="{{ url_for('static', filename='js/dgenies.min.js') }}" type="text/JavaScript"></script>
        {% endif %}
    {% endblock %}
    <link rel="stylesheet" href="{{ url_for('static', filename='css/animate.css') }}" type="text/css">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/jquery-ui.min.css') }}" type="text/css">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}" type="text/css">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap-theme.min.css') }}" type="text/css">
    {% if debug %}
        <link rel="stylesheet" href="{{ url_for('static', filename='css/dgenies.css') }}" type="text/css">
    {% else %}
        <link rel="stylesheet" href="{{ url_for('static', filename='css/dgenies.min.css') }}" type="text/css">
    {% endif %}
    <link rel="shortcut icon" href="{{ url_for('static', filename='images/favicon.ico') }}">
</head>
<body role="document" onload="{% block onload %}dgenies.init({{ all_jobs}}, '{{ mode }}');{% endblock %}">
{% block body %}
    <div id="main-wrapper">
        <!-- Fixed navbar -->
        <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                            data-target=".navbar-collapse">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="/">D-GENIES</a>
                </div>
                <div class="navbar-collapse collapse">
                    <ul class="nav navbar-nav">
                        <li class="{% if(menu == 'index') %}active{% endif %}"><a href="/">About</a></li>
                        <li class="{% if(menu == 'run') %}active{% endif %}"><a href="/run">Run</a></li>
                        <li class="dropdown result {% if(menu == 'result') %}active{% endif %}">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">Results<span
                                    class="caret"></span></a>
                            <ul class="dropdown-menu" role="menu">
                            </ul>
                        </li>
                        {% if mode == "webserver" %}
                            <li class="{% if(menu == 'gallery') %}active{% endif %}"><a href="/gallery">Gallery</a></li>
                        {% endif %}
                        <li class="dropdown documentation {% if(menu == 'documentation') %}active{% endif %}">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">Documentation<span
                                    class="caret"></span></a>
                            <ul class="dropdown-menu" role="menu">
                                <li><a href="/documentation/run">Launch a job</a></li>
                                <li><a href="/documentation/result">Results</a></li>
                                <li><a href="/documentation/dotplot">Dot plot</a></li>
                                <li><a href="/documentation/formats">File formats</a></li>
                            </ul>
                        </li>
                        <li class="{% if(menu == 'install') %}active{% endif %}"><a href="/install">Install</a></li>
                        <li class="{% if(menu == 'contact') %}active{% endif %}"><a href="/contact">Contact</a></li>
                    </ul>
                </div><!--/.nav-collapse -->
            </div>
        </div>

        <div id="main-error">

        </div>

        <div class="container theme-showcase" id="body-container" role="main">

            {% block content %}
            {% endblock %}

            <footer>
                <hr>
                <div class="container" style="text-align: center;">
                    <p>Copyright © 2017, INRA | Designed by <a target="_blank" href="http://bioinfo.genotoul.fr/">GenoToul
                        Bioinfo platform</a>.</p>
                </div>
            </footer>

        </div> <!-- /container -->
    </div>
{% endblock %}

<script type="text/javascript">
            var supportsTemplateLiterals = false;
            try {
                eval("`foo`");
                supportsTemplateLiterals = true;
            }
            catch (e) {
            }
            if (!supportsTemplateLiterals) {
                $("#main-error").html("<span class='big'>Your browser is not supported!</span><br/>Please use a compatible browser like <a href=\"https://www.mozilla.org/firefox\">Firefox</a> or <a href=\"https://www.google.com/chrome/\">Google Chrome / Chromium</a>").show();
            }
        </script>
</body>
</html>