<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    {% if title %}
    <title>{{ title }} - SSO Portal</title>
    {% else %}
    <title>SSO Portal</title>
    {% endif %}
    <meta name="description" content="otpme-sso">
    <meta name="author" content="the2nd">
    <link rel="stylesheet" href="{{ url_for('static', filename='otpme.css', _external=True, _scheme='https') }}">
    <link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
  </head>

  <body>
    <nav class="navbar">
      <b>SSO Portal</b>
      <a href="/index">Home</a>
      {% if g.user.is_authenticated %}
        <span class="spacer"></span>
        <a href="{{ url_for('settings', _external=True, _scheme='https') }}">Settings</a>
        <a href="{{ url_for('logout', _external=True, _scheme='https') }}">Logout</a>
      {% endif %}
    </nav>

    {% with messages = get_flashed_messages() %}
      {% if messages %}
        <ul class="flash-messages">
        {% for message in messages %}
            <li>{{ message }}</li>
        {% endfor %}
        </ul>
      {% endif %}
    {% endwith %}

    {% block content %}{% endblock %}
  </body>
</html>
