<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <title>Success</title>
  <link rel="icon" href="/logo/favicon.ico" type="image/png">

  <!-- CSS Libraries -->
  <link href="https://cdn.jsdelivr.net/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet"/>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/fontawesome/4.1.0/css/font-awesome.min.css" />
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/jquery.bootstrapvalidator/0.5.0/css/bootstrapValidator.min.css"/>

  <!-- JS Libraries -->
  <script src="https://cdn.jsdelivr.net/jquery/1.11.1/jquery.min.js"></script>
  <script src="https://cdn.jsdelivr.net/bootstrap/3.2.0/js/bootstrap.min.js"></script>
  <script src="https://cdn.jsdelivr.net/jquery.bootstrapvalidator/0.5.0/js/bootstrapValidator.min.js"></script>

  <style>
    h1 {
      text-align: left;
      font-size: 18px;
    }

    .button {
      border: none;
      color: white;
      padding: 16px 32px;
      text-align: center;
      text-decoration: none;
      display: inline-block;
      font-size: 16px;
      margin: 4px 2px;
      transition-duration: 0.4s;
      cursor: pointer;
    }

    .button1 {
      background-color: white;
      color: black;
      border: 2px solid #4CAF50;
    }

    .button1:hover {
      background-color: #4CAF50;
      color: white;
    }

    .button2 {
      background-color: white;
      color: black;
      border: 2px solid #008CBA;
    }

    .button2:hover {
      background-color: #008CBA;
      color: white;
    }
  </style>

  <script>
    function loaded() {
      setTimeout(() => window.close(), 1000);
    }
  </script>
</head>

<body>
  <div class="container">
    <div class="row">
      <div class="col-lg-12">
        <h1>Success</h1>
        <img src="/logo/logo.png" alt="logo" style="float:right;width:150px;height:50px;">
        <p>Successfully submitted new titles to feed.</p>
      </div>
    </div>

    <hr>

    <!-- Optimised loop for displaying titles -->
    {% for item in textdisplay %}
      <p dir="rtl">{{ item }}</p>
    {% endfor %}

    <p>
      <a href="/login">
        <button class="button button2">Return to login</button>
      </a>
    </p>
  </div>
</body>
</html>
