<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <title> WebSSH </title>
    <link href="static/img/favicon.png" rel="icon" type="image/png">
    <link href="static/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
    <link href="static/css/xterm.min.css" rel="stylesheet" type="text/css"/>
    <link href="static/css/fullscreen.min.css" rel="stylesheet" type="text/css"/>
    <style>
      .row {
        margin-top: 15px;
        margin-bottom: 10px;
      }

      .container {
        margin-top: 20px;
      }

      .btn {
        margin-top: 15px;
      }

      .btn-danger {
        margin-left: 5px;
      }
      {% if font.family %}
      @font-face {
        font-family: '{{ font.family }}';
        src: url('{{ font.url }}');
      }

      body {
        font-family: '{{ font.family }}';
      }
      {% end %}
    </style>
  </head>
  <body>
    <div id="waiter" style="display: none"> Connecting ... </div>

    <div class="container form-container" style="display: none">
      <form id="connect" action="" method="post" enctype="multipart/form-data"{% if debug %} novalidate{% end %}>
        <div class="row">
          <div class="col-sm-6">
            <label for="Username">Username</label>
            <input class="form-control" type="text" id="username" name="username" value="" required>
          </div>
          <div class="col-sm-6">
            <label for="Password">Password</label>
            <input class="form-control" type="password" id="password" name="password" value="">
          </div>
        </div>
        <input type="hidden" name="port" value="8022">
        <input type="hidden" name="hostname" value="shell">
        <input type="hidden" id="term" name="term" value="xterm-256color">
        {% module xsrf_form_html() %}
        <button type="submit" class="btn btn-primary">Connect</button>
        <button type="reset" class="btn btn-danger">Reset</button>
      </form>
    </div>

    <div class="container">
      <div id="status" style="color: red;"></div>
      <div id="terminal"></div>
    </div>

    <script src="static/js/jquery.min.js"></script>
    <script src="static/js/popper.min.js"></script>
    <script src="static/js/bootstrap.min.js"></script>
    <script src="static/js/xterm.min.js"></script>
    <script src="static/js/xterm-addon-fit.min.js"></script>
    <script src="static/js/main.js"></script>
  </body>
</html>
