<!doctype html>
<html>
    <head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=yes">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    {% if is_app_root_defined(config.APPLICATION_ROOT) %}
        <script type="text/javascript">
            window.resourceBaseUrl = '{{config.APPLICATION_ROOT}}';
        </script>
    {% endif %}
	<link rel="shortcut icon" href="{{ url_for('static', filename='images/favicon.png') }}">
    <title>{{ main_title if main_title else "D-Tale" }} Code Snippet</title>
    <script type="text/javascript" src="{{ url_for('static', filename='dist/base_styles_bundle.js') }}"></script>
    {#
        Despite the fact we reload these again later on, in order for the header to rendered correctly
        before the rest of the page is built we need to load them here as well.
    #}
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/main.css') }}" />
    </head>
    <body>
        {% if github_fork %}
        <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/github_fork.css') }}" />
        <span id="forkongithub">
            <a href="https://github.com/man-group/dtale">Fork me on GitHub</a>
        </span>
        {% endif %}
        <header class="app-header">
            <span
                class="{{ '' if main_title_font else 'title-font '}}title-font-base"
                style="{{'font-family: ' + main_title_font if main_title_font else ''}}">
                {{ main_title if main_title else "D-TALE" }}
            </span>
            <span style="font-size: 16px" class="pl-5 mt-4" id="code-title">Code Snippet</span>
            <nav class="app-header__nav--secondary">
                <ul class="nav-menus">
                    {% if grid_links|length > 0 %}
                    <li>
                        <div class="dropdown">
                            <span class="dropbtn nav-link dropdown-toggle">
                                {{back_to_data}}
                            </span>
                            <div class="dropdown-content">
                                {% for id, label in grid_links %}
                                    <a href="{{id}}" class="dropdown-item data-grid-link">
                                        <span class="ml-3">{{label}}</span>
                                    </a>
                                {% endfor %}
                            </div>
                        </div>
                    </li>
                    {% endif %}
                </ul>
            </nav>
        </header>
        <div class="container-fluid code-popup">
            <div id="popup-content" />
        </div>
        <script type="text/javascript" src="{{ url_for('static', filename='dist/polyfills_bundle.js') }}"></script>
        <script type="text/javascript" src="{{ url_for('static', filename='dist/dtale_bundle.js') }}"></script>
        {#
          In order to get styles to load correctly, we need to reload these files.
          In CSS, the last style declared takes precedence.
        #}
        <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/main.css') }}" />
    </body>
</html>