<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>FlexGet</title>

    <link rel="stylesheet" href="{{ url_for('static', filename='css/menu.css') }}" type="text/css" media="screen"/>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/layout.css') }}" type="text/css" media="screen"/>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/forms.css') }}" type="text/css" media="screen"/>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/ui-lightness/jquery-ui-1.8.6.custom.css') }}" type="text/css" media="screen"/>

    {# keep scripts after css to avoid flash of unstyled layout #}
    <script type="text/javascript" src="{{ url_for('static', filename='js/jquery-1.4.3.min.js') }}"></script>
    
    {% block head %}
        {# UI plugin templates can insert content here #}
    {% endblock %}
</head>

<body>

<div id="layout">

<div id="container">

    <div id="header">
    {% block header %}&nbsp;{% endblock %}
    </div>

    <ul id="navbar">
        {% for item in menu -%}
            <li>
                <a href="{{ item.href }}" {%- if item.current is defined %} class="current" {% endif -%}>
                    {{ item.caption }}
                </a>
            </li>
      {% endfor %}
    </ul>

    <div id="content-container">

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

        <div id="main">

          <!-- flash messages -->
          {% with messages = get_flashed_messages(with_categories=true) %}
            {% if messages %}
              <div id="flash">
              <ul id="flashes">
              {% for category, message in messages %}
                <li class="{{ category }}">{{ message }}</li>
              {% endfor %}
              </ul>
              </div>
            {% endif %}
          {% endwith %}

          {% block main %}
          <p>
            <b>Error:</b> Main content not set!
          </p>
          {% endblock %}
        </div>

    </div>

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

</div>

</div>

{# javascripts should be positioned at the bottom of the html since they block other requests #}
<script type="text/javascript" src="{{ url_for('static', filename='js/flexget.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/jquery.blockUI.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/jquery.tools.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/jquery-ui-1.8.6.custom.min.js') }}"></script>

</body>
</html>
