<!doctype html>

<html lang="en">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <title>{% block title %} {{ title }} {% endblock %}</title>
  <meta name="description" content="{% block description %}{% endblock %}">
  <meta name="author" content="Kinbrio">

  <meta property="og:title" content="{% block title %} {{ title }} {% endblock %}">
  <meta property="og:type" content="website">
  <meta property="og:url" content="{% block canonical %}{% endblock %}">
  <meta property="og:description" content="{% block description %}{% endblock %}">
  <meta property="og:image" content="{% block image %}{% endblock %}">

  <link rel="icon" href="/fs/favicon.ico">
  <link rel="apple-touch-icon" href="/fs/apple-touch-icon.png">

  {% block head %}{% endblock %}
</head>

<body>
  <nav id="menu">
    <div class="row" style="justify-content: center;">
      {% if user.key.is_nil() -%}
      <div class="col-sm-6 col-md-3 col-lg-2 flex-center" style="justify-content: center; text-align: center">
        <a title="Landing page for Kinbrio" href="/">🏠 Home</a>
      </div>
      <div class="col-sm-6 col-md-3 col-lg-2 flex-center" style="justify-content: center; text-align: center">
        <a title="Login to Kinbrio using your matrix ID" href="/login">🔑 Login</a>
      </div>
      <div class="col-sm-6 col-md-3 col-lg-2 flex-center" style="justify-content: center; text-align: center">
        <a title="Register for Kinbrio using your matrix ID" href="/register">👑 Register</a>
      </div>
      {% else -%}
      <div class="col-sm-6 col-md-3 col-lg-2 flex-center" style="justify-content: center; text-align: center">
        <a title="Dashboard for projects, boards, contacts and organization wide notes and documentation" href="/dashboard">🏠 Dashboard</a>
      </div>
      <div class="col-sm-6 col-md-3 col-lg-2 flex-center" style="justify-content: center; text-align: center">
        <a title="Account related settings and actions" href="/account">⚙️ Account</a>
      </div>
      <div class="col-sm-6 col-md-3 col-lg-2 flex-center" style="justify-content: center; text-align: center">
        <a title="Organization related settings and actions" href="/organization/{{user.organization_key}}">🏢 Organization</a>
      </div>
      <div class="col-sm-6 col-md-3 col-lg-2 flex-center" style="justify-content: center; text-align: center">
        <label for="assistant">🤖 AI Assistant</label>
        <input class="checkbutton" name="ai-toggle" type="radio" id="assistant">
        <div class="backed assistant-window">
          <label for="minimize_assistant">🗕 Minimize</label>
          <input class="checkbutton" name="ai-toggle" type="radio" id="minimize_assistant">
          <iframe style="display:none;" height="800px"    width="400px" loading="lazy" src="http://localhost:3000"></iframe>
        </div>
      </div>
      {% endif -%}
      <div class="col-sm-6 col-md-3 col-lg-2 flex-center" style="justify-content: center; text-align: center">
        <a title="Documentation and tutorials on how to operate Kinbrio to it's fullest extent" target="_blank" href="/documentation">🗎 Documentation</a>
      </div>
    </div>
  </nav>
  <div id="content">
    {% block content %}{% endblock %}
  </div>
  <script async src="/fs/js/app.js"></script>
  <link rel="stylesheet" defer href="/fs/css/mini-default.min.css">
  <link rel="stylesheet" defer href="/fs/css/styles.css">
  <footer>
    <div class="row" style="justify-content: center;">
      <div class="col-sm-12 col-md-12 col-lg-12 flex-center" style="justify-content: center; text-align: center">
        <a title="Kinbrio Support. Come chat with us over matrix about questions and issues." target="_blank" href="https://matrix.to/#/#SanturceSoftware:matrix.org">
          💬 Chat with us</a>
      </div>

    </div>
    </footer>
</body>

</html>