index.html 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Hard Drive Unlocking</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  6. <style>
  7. body {
  8. text-align: center;
  9. font-family: sans;
  10. background-color: #f2c8ee;
  11. padding-top: 15px;
  12. }
  13. fieldset {
  14. margin: 10px auto 30px;
  15. padding: 30px;
  16. width: 50%;
  17. background-color: #fff;
  18. border: 0;
  19. border-radius: 15px;
  20. }
  21. legend {
  22. background-color: #fff;
  23. padding: 5px 17px;
  24. font-weight: bold;
  25. border-radius: 5px;
  26. text-shadow: 1px 1px rgba(0,0,0,.3);
  27. font-variant: small-caps;
  28. }
  29. input {
  30. border: 1px solid #6f1465;
  31. padding: 5px;
  32. font-size: 1em;
  33. color: #c70fb3;
  34. text-align: center;
  35. background-color: #fcf2fb;
  36. border-radius: 5px;
  37. }
  38. input[type=submit] {
  39. padding: 10px 20px;
  40. font-weight: bold;
  41. background-color: #fff;
  42. border-width: 0;
  43. font-size: 20px;
  44. }
  45. input[type=submit]:hover {
  46. background-color: #6f1465;
  47. color: #fff;
  48. cursor: pointer;
  49. }
  50. #error {
  51. color: #ca0000;
  52. font-weight: bold;
  53. }
  54. label span {
  55. cursor: pointer;
  56. }
  57. .loader {
  58. content: "";
  59. display: none;
  60. width: 0;
  61. height: 0;
  62. border: solid 25px;
  63. border-radius: 5em;
  64. border-color: #ff619c #8f9cff #f6ff60 #67ff00 ;
  65. animation: spin 1s linear infinite;
  66. }
  67. @keyframes spin {
  68. 0% {
  69. transform: rotate(0deg);
  70. }
  71. 100% {
  72. transform: rotate(360deg);
  73. }
  74. }
  75. @keyframes fade {
  76. 0% {
  77. opacity: 0;
  78. }
  79. 100% {
  80. opacity: 1;
  81. }
  82. }
  83. </style>
  84. <script>
  85. var errorColors = [ 'ff619c', 'ffc160', 'f6ff60', '67ff00', '57f6fc', '8f9cff', 'fc57ee' ];
  86. var errorColorsIndex = 0;
  87. function showPassword(chk) {
  88. var pwd = document.getElementById('passphrase');
  89. pwd.type = chk.checked ? 'text' : 'password';
  90. }
  91. function focusText() {
  92. var pwd = document.getElementById('passphrase');
  93. pwd.focus();
  94. }
  95. function beautifulError() {
  96. setInterval(function () {
  97. var error = document.getElementById('error');
  98. error.style.color = '#' + errorColors[errorColorsIndex];
  99. errorColorsIndex = (errorColorsIndex + 1) % errorColors.length;
  100. }, 100);
  101. }
  102. function showLoader() {
  103. document.getElementById('unlock').style.display = 'none';
  104. document.getElementById('loader').style.display = 'inline-block';
  105. }
  106. </script>
  107. </head>
  108. <body onload="beautifulError(); focusText()">
  109. <img src="unicorn.gif" alt="Beautiful Unicorn">
  110. <form method="post" onsubmit="showLoader()" action="/cgi-bin/post.sh">
  111. <fieldset>
  112. <legend>Hard Drive Locked</legend>
  113. <!-- TPL:ERROR
  114. <p id="error">
  115. Wrong passphrase. Try again, Dude!
  116. </p>
  117. TPL:ERROR -->
  118. <p>
  119. <label for="passphrase">
  120. Enter your passphrase to unlock the hard drive:
  121. </label>
  122. </p>
  123. <input type="password" name="passphrase" id="passphrase" />
  124. <p>
  125. <label>
  126. <input type="checkbox" onclick="showPassword(this)" />
  127. <span>Show passphrase</span>
  128. </label>
  129. </p>
  130. </fieldset>
  131. <input type="submit" id="unlock" value="Unlock" onclick="showLoader()" />
  132. <div class="loader" id="loader"></div>
  133. </form>
  134. </body>
  135. </html>