<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title>PyPillar</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='plugins/fontawesome-free/css/all.min.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/adminlte.min.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/custom.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/fonts.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='plugins/codemirror/codemirror.css') }}">
    <link rel="shortcut icon" type="image/ico" href="{{ url_for('static', filename='img/favicon.ico') }}"/>
    <script src="{{ url_for('static', filename='plugins/jquery/jquery.min.js') }}"></script>
    <script src="{{ url_for('static', filename='plugins/bootstrap/js/bootstrap.bundle.min.js') }}"></script>
    <script src="{{ url_for('static', filename='js/adminlte.min.js') }}"></script>
    <script src="{{ url_for('static', filename='plugins/codemirror/codemirror.js') }}"></script>
    <script src="{{ url_for('static', filename='plugins/codemirror/python.js') }}"></script>
  </head>
  <body class="hold-transition sidebar-mini">
    <div class="wrapper">
      <nav class="main-header navbar navbar-expand navbar-white navbar-light">
        <ul class="navbar-nav">
          <li class="nav-item">
            <a class="nav-link" data-widget="pushmenu" href="#"><i class="fas fa-bars"></i></a>
          </li>
          <li class="nav-item d-none d-sm-inline-block">
            <a href="{{ url_for('projects') }}" class="nav-link">Projects</a>
          </li>
        </ul>
      </nav>
      <aside class="main-sidebar sidebar-light-primary elevation-4">
        <a href="/" class="brand-link" style="text-align:center;">
          <span class="brand-text"><i class="fas fa-landmark"></i> PyPillar</span>
        </a>
        <div class="sidebar">
          <nav class="mt-2">
            <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
              <li class="nav-item has-treeview menu-open">
                <a href="#" class="nav-link">
                  <i class="nav-icon fas fa-tachometer-alt"></i>
                  <p>Administration <i class="right fas fa-angle-left"></i>
                  </p>
                </a>
                <ul class="nav nav-treeview" style="display: block;">
                  <li class="nav-item">
                    <a href="{{ url_for('create_project') }}" class="nav-link"><i class="fas fa-hamsa nav-icon"></i><p>Create Project</p></a>
                  </li>
                </ul>
              </li>
            </ul>
          </nav>
        </div>
      </aside>
      <div class="content-wrapper">
        <div class="content-header">
          <div class="container-fluid">
            <div class="row mb-2">
              <div class="col-sm-6">
                <h1 class="m-0 text-dark">Welcome to PyPillar</h1>
              </div>
            </div>
          </div>
        </div>
        <div class="content">
          <div class="container-fluid">
            {% with messages = get_flashed_messages(category_filter=["error"]) %}
            {% if messages %}
            <div class="row">
            <div class="col-md-12">
                <div class="alert alert-danger alert-dismissible">
                    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                    <h5><i class="icon fas fa-ban"></i> Error!</h5>
                    <ul>
                        {% for msg in messages %}
                        <li>{{ msg }}</li>
                        {% endfor %}
                    </ul>

                </div>
            </div>
            </div>
            {% endif %}
            {% endwith %}
            {% with messages = get_flashed_messages(category_filter=["success"]) %}
            {% if messages %}
            <div class="row">
            <div class="col-md-12">
                <div class="alert alert-info alert-dismissible">
                    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                    <h5><i class="icon fas fa-check"></i> Success!</h5>
                    <ul>
                        {% for msg in messages %}
                        <li>{{ msg }}</li>
                        {% endfor %}
                    </ul>
                </div>
            </div>
            </div>
            {% endif %}
            {% endwith %}
            {% block content %}{% endblock %}
          </div>
        </div>
      </div>
      <footer class="main-footer">
        <div class="float-right d-none d-sm-inline">Version: {{ version }}</div>
        Community Edition
      </footer>
    </div>
  </body>
</html>