<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="">
  <meta name="author" content="">
  <link rel='shortcut icon' href='{{ hubleto.env().assetsUrl }}/images/logo-hubleto.png'>
  <title>Hubleto</title>

  <link rel="stylesheet" type="text/css" href="{{ hubleto.env().assetsCompiledUrl }}/css/main.css">
  <link rel="stylesheet" type="text/css" href="{{ hubleto.env().assetsUrl }}/css/fontawesome-6.6.css">
  <link rel="stylesheet" type="text/css" href="{{ hubleto.env().assetsUrl }}/css/font-gabarito.css">
</head>

<body>

  <div id="sign-in-screen">
    {% block languages %}
      <div class="languages">
        <a href="?set-language=en" class="btn btn-white"><span class="icon"><img src="{{ hubleto.env().assetsUrl }}/images/flags/en.jpg" style="max-height:1em;max-width:1em;" /></span></a>
        <a href="?set-language=de" class="btn btn-white"><span class="icon"><img src="{{ hubleto.env().assetsUrl }}/images/flags/de.jpg" style="max-height:1em;max-width:1em;" /></span></a>
        <a href="?set-language=sk" class="btn btn-white"><span class="icon"><img src="{{ hubleto.env().assetsUrl }}/images/flags/sk.jpg" style="max-height:1em;max-width:1em;" /></span></a>
        <a href="?set-language=cs" class="btn btn-white"><span class="icon"><img src="{{ hubleto.env().assetsUrl }}/images/flags/cs.jpg" style="max-height:1em;max-width:1em;" /></span></a>
        <a href="?set-language=ro" class="btn btn-white"><span class="icon"><img src="{{ hubleto.env().assetsUrl }}/images/flags/ro.jpg" style="max-height:1em;max-width:1em;" /></span></a>
      </div>
    {% endblock %}
    <div class="inner">
      <div class="logo">
        <img src="{{ hubleto.env().assetsUrl }}/images/logo-hubleto-text-horizontal.png" style="max-height:4em;margin-bottom:1em; width: auto;" />
      </div>
      <div class="form">
        <form class="content" id="login_form" action="" method="POST">
          <input type="hidden" name="set-language" id="set-language" value="{{ app.getLanguage() }}">
          <input type="hidden" name="authUser" id="authUser" value="1">

          <div class="text-2xl text-primary text-center pt-8 pb-4">{{ config.accountFullName }}</div>

          {% block status %}
            {% if viewParams.status %}
              <div class="alert alert-danger">Email or password invalid. Try again.</div>
            {% endif %}
          {% endblock %}

          {% block inputs %}
            <input
              type="text" name="login" value="{{ viewParams.login }}" placeholder="{{ translate("Your email") }}" autofocus
              onkeypress='if (event.keyCode == 13) { document.getElementById("login_form").submit(); }'
            />

            <input
              type="password" name="password" placeholder="{{ translate("Password") }}"
              onkeypress='if (event.keyCode == 13) { document.getElementById("login_form").submit(); }'
            />

            <div class="flex justify-between my-2">
              <div class="flex gap-2">
                <input type="checkbox" id="session-persist" name="session-persist" value="1" checked>
                <label for="session-persist">{{ translate("Keep signed in") }}</label>
              </div>
            </div>
          {% endblock %}

          <div class="gap-2 flex justify-between items-center mt-8">
            <div>
              {% block button %}
                <button type="submit" class="btn btn-large">
                  <span class="icon"><i class="fas fa-arrow-right"></i></span>
                  <span class="text">{{ translate("Sign in") }}</span>
                </button>
              {% endblock %}
            </div>
            <div>
              {% block links %}
                <a class="btn btn-transparent" href="{{ config.projectUrl }}/forgot-password">
                  <span class="icon"><i class="fas fa-life-ring"></i></span>
                  <span class="text">{{ translate("Forgot password?") }}</span>
                </a>
              {% endblock %}
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
  <div class="text-xs text-gray-400 text-right" style="position:fixed;right:0;bottom:0;padding:0.5em">
    Release<br/>
    [{{ app.release.getVersion() }}] {{ app.release.getCodename() }}
  </div>
</body>
</html>
