<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <meta name="description" content="The Islet Regulome Browser">
    <meta name="author" content="Loris Mularoni">
    <link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='images/favicon32b.ico') }} ">
    <title>The Islet Regulome Browser</title>
    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    <!-- Optional theme -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
    <!-- Latest compiled and minified JavaScript -->
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
    <!--link rel=stylesheet type="text/css" href="{{ url_for('static', filename='css/style.css') }}" -->
    <link href="{{ url_for('static', filename='css/ie10-viewport-bug-workaround.css') }}" rel="stylesheet">
    <!-- Custom styles for this template -->
    <link href="{{ url_for('static', filename='css/theme.css') }}" rel="stylesheet">
    <link href="{{ url_for('static', filename='css/regulome.css') }}" rel="stylesheet">
    <script type="text/javaScript" src="{{ url_for('static', filename='brython/brython.js') }}"></script>
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
        <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->

    <style type=text/css>
        #home_main:hover {
            content: url("{{ url_for('static', filename='images/regulome_logo_hover.png') }}");
            height: 45px;
        }
        #loader {
            position: fixed;
            left: 0px;
            top: 0px;
            width: 100%;
            height: 100%;
            z-index: 9999;
            background: url("{{ url_for('static', filename='images/spin.gif') }}") 50% 50% no-repeat rgba(219,219,239,0.4);
        }
    </style>

    <script type="text/javascript">
        $(window).load(function() {
	        $("#loader").fadeOut("slow");
            $('#form_base').submit(function() {
                $("#loader").show();
                return true;
            });
        })
    </script>
</head>
{% if deploy_mode == 'production' %}
<body onload="brython(0)" role="document">
{% else %}
<body onload="brython(1)" role="document">
{% endif %}

    <script type="text/python" src="{{ url_for('static', filename='python/utils.py') }}"></script>

    <!-- Fixed navbar -->
    <nav class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                    <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-logo" href="#"><img id="home_main" src="{{ url_for('static', filename='images/regulome_logo.png') }}" alt="Islet Regulome"></a>
            </div>
            <div id="navbar" class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    <li id="/home"><a id="home" href="#"><span class="glyphicon glyphicon-home"></span>&nbsp; Home</a></li>
                    <li id="/data"><a id="data" href="#"><span class="glyphicon glyphicon-hdd"></span>&nbsp; Data Source</a></li>
                    <li id="/credits"><a id="credits" href="#"><span class="glyphicon glyphicon-user"></span>&nbsp; Credits</a></li>
                    <li id="/contact"><a id="contact" href="#"><span class="glyphicon glyphicon-envelope"></span>&nbsp; Contact</a></li>
                    <li id="/info"><a id="info" href="#"><span class="glyphicon glyphicon-info-sign"></span>&nbsp; Info</a></li>
                </ul>
            </div> <!--/.nav-collapse -->
        </div> <!-- END container -->
    </nav>  <!-- END Fixed navbar -->

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

        <!-- warnings -->
        {% set message_class = "messages_hide" %}
        {% with messages = get_flashed_messages() %}
            {% if messages %}
                {% set message_class = "messages_show" %}
            {% endif %}
        <div id="message_div" class="row {{ message_class }}">
            <div id="message_div_container" class="col-md-12">
                <div class="alert alert-danger alert-dismissible" role="alert">
                    <!-- The button use to have data-dismiss="alert" -->
                    <button type="button" id="message_div_button" class="close" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    {% if messages %}
                        {% for message in messages %}
                            <strong>Warning! </strong><span id="alert_message">{{ message }}</span>
                        {% endfor %}
                    {% else %}
                        <strong>Warning! </strong><span id="alert_message">This is an alert.</span>
                    {% endif %}
                </div>
            </div>
        </div>
        {% endwith %}


        {% block body %}{% endblock %}

    </div> <!-- end of contentwrapper -->
</body>
</html>