<!doctype html>

<html lang="en">

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

  <title>One-Time Pad Generator</title>
  <meta name="description" content="One-Time Pad Generator">

  <link rel="stylesheet" href="./node_modules/font-awesome/css/font-awesome.css">
  <link rel="stylesheet" href="./node_modules/bulma/css/bulma.css">
  <style>
    pre {
      word-break: break-all;
      white-space: pre-wrap;
    }
  </style>

  <!--[if lt IE 9]>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.js"></script>
  <![endif]-->
</head>

<body>
  <div class="section">
    <div class="container">
      <div class="columns">

        <div class="column">
          <h2 class="title">
            Encrypt a Message
          </h2>
          <div class="field">
            <label class="label">
              Your Message
              <div class="control">
                <textarea id="input" class="textarea"></textarea>
              </div>
            </label>
          </div>
          <div class="control">
            <label class="label">
              One-Time Pad
            </label>
          </div>
          <div class="field has-addons is-small">
            <div class="control">
              <input class="input is-small" type="number" id="padLength" placeholder="Length">
            </div>
            <div class="control">
              <a class="button is-small" id="generatePad">
                <span>
                  Generate Pad
                </span>
                <span class="icon is-small">
                  <i class="fa fa-lock"></i>
                </span>
              </a>
            </div>
            <div class="control">
              <a class="button is-small is-danger" id="clearPad">
                <span>
                  Clear Pad
                </span>
                <span class="icon is-small">
                  <i class="fa fa-asterisk"></i>
                </span>
              </a>
            </div>
          </div>
          <div class="control">
            <textarea id="inputPad" class="textarea"></textarea>
            <div class="help is-danger" id="inputError"></div>
          </div>
          <div class="field">
            <div class="control">
              <a class="button" id="encryptInput">
                <span>
                  Encrypt
                </span>
                <span class="icon">
                  <i class="fa fa-lock"></i>
                </span>
              </a>
            </div>
          </div>

          <div class="columns">
            <div class="column">
              <label class="label">Encrypted Message</label>
              <div class="box">
                <pre id="encrypted"></pre>
              </div>
            </div>
          </div>
        </div>

        <div class="column">
          <h2 class="title">
            Decrypt a Message
          </h2>
          <div class="field">
            <label class="label">
               Their Message
              <div class="control">
                <textarea id="encryptedInput" class="textarea"></textarea>
              </div>
            </label>
          </div>
          <div class="field">
            <label class="label">
              One-Time Pad
              <div class="control">
                <textarea id="encryptedInputPad" class="textarea"></textarea>
              </div>
              <div class="help is-error" id="inputError"></div>
            </label>
          </div>
          <div class="field">
            <div class="control">
              <a class="button" id="decryptInput">
                <span>
                  Decrypt
                </span>
                <span class="icon">
                  <i class="fa fa-unlock"></i>
                </span>
              </a>
            </div>
          </div>

          <div class="columns">
            <div class="column">
              <label class="label">Decrypted Message</label>
              <div class="box">
                <pre id="decrypted"></pre>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  
  <script src="./index.js"></script>
</body>

</html>