index.html 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>{{option_a}} vs {{option_b}}!</title>
  6. <base href="/index.html">
  7. <meta name = "viewport" content = "width=device-width, initial-scale = 1.0">
  8. <meta name="keywords" content="docker-compose, docker, stack">
  9. <meta name="author" content="Tutum dev team">
  10. <link rel='stylesheet' href="{{ url_for('static',filename='stylesheets/style.css') }}" />
  11. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
  12. </head>
  13. <body>
  14. <div id="content-container">
  15. <div id="content-container-center">
  16. <h3>{{option_a}} vs {{option_b}}!</h3>
  17. <form id="choice" name='form' method="POST" action="/">
  18. <button id="a" type="submit" name="vote" class="a" value="a">{{option_a}}</button>
  19. <button id="b" type="submit" name="vote" class="b" value="b">{{option_b}}</button>
  20. </form>
  21. <div id="tip">
  22. (Tip: you can change your vote)
  23. </div>
  24. <div id="hostname">
  25. Processed by container ID {{hostname}}
  26. </div>
  27. </div>
  28. </div>
  29. <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
  30. <script src="//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.js"></script>
  31. {% if vote %}
  32. <script>
  33. var vote = "{{vote}}";
  34. if(vote == "a"){
  35. $(".a").prop('disabled', true);
  36. $(".a").html('{{option_a}} <i class="fa fa-check-circle"></i>');
  37. $(".b").css('opacity','0.5');
  38. }
  39. if(vote == "b"){
  40. $(".b").prop('disabled', true);
  41. $(".b").html('{{option_b}} <i class="fa fa-check-circle"></i>');
  42. $(".a").css('opacity','0.5');
  43. }
  44. </script>
  45. {% endif %}
  46. </body>
  47. </html>