Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2014
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.26 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <style>
  5. /*I just made this background and wanted to save it here*/
  6. body {
  7. background: #988185;
  8. background-image: linear-gradient(40deg, rgba(70, 57, 59, 0.05), rgba(128, 0, 21, 0.05)), linear-gradient(135deg, #796366 0%, #796366 10%, #8c7377 11%, #8c7377 40%, #a38f92 41%, #a38f92 50%, #796366 51%, #796366 60%, #8c7377 61%, #8c7377 90%, #a38f92 91%);
  9. background-size: 7px 7px, 4px 4px;
  10. }
  11.  
  12. button {
  13. outline: none;
  14. font-family: 'helvetica neue' sans-serif;
  15. font-size: 2em;
  16. color: white;
  17. text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.7), 1px 1px 1px rgba(255, 255, 255, 0.3);
  18. display: block;
  19. margin: 2em auto;
  20. padding: 23px 37px 25px 35px;
  21. cursor: pointer;
  22. background-color: #2e050c;
  23. background-image: linear-gradient(273deg, #eb4763 30%, #e6193c 40%);
  24. border: none;
  25. border-radius: 16px;
  26. box-shadow: inset 0px 0px 1px 1px rgba(138, 15, 36, 0.9), inset 0px 0px 2px 3px rgba(230, 25, 60, 0.9), inset 1px 1px 1px 4px rgba(255, 255, 255, 0.8), inset 0px 0px 2px 7px rgba(235, 71, 99, 0.8), inset 0px 0px 4px 10px rgba(230, 25, 60, 0.9), 8px 10px 2px 6px rgba(92, 10, 24, 0.55), 0px 0px 3px 2px rgba(184, 20, 48, 0.9), 0px 0px 2px 6px rgba(230, 25, 60, 0.9), -1px -1px 1px 6px rgba(255, 255, 255, 0.9), 0px 0px 2px 11px rgba(230, 25, 60, 0.9), 0px 0px 1px 12px rgba(184, 20, 48, 0.9), 1px 3px 14px 14px rgba(0, 0, 0, 0.4);
  27. }
  28.  
  29. button:active {
  30. color: #d9d9d9;
  31. padding: 26px 34px 22px 38px;
  32. background-image: linear-gradient(273deg, #e6193c 50%, #e8304f 60%);
  33. box-shadow: inset 3px 4px 3px 2px rgba(92, 10, 24, 0.55), inset 0px 0px 1px 1px rgba(138, 15, 36, 0.9), inset -1px -1px 2px 3px rgba(230, 25, 60, 0.9), inset -2px -2px 1px 3px rgba(255, 255, 255, 0.8), inset 0px 0px 2px 7px rgba(235, 71, 99, 0.8), inset 0px 0px 3px 10px rgba(230, 25, 60, 0.9), 0px 0px 3px 2px rgba(184, 20, 48, 0.9), 0px 0px 2px 6px rgba(230, 25, 60, 0.9), -1px -1px 1px 6px rgba(255, 255, 255, 0.9), 0px 0px 2px 11px rgba(230, 25, 60, 0.9), 0px 0px 1px 12px rgba(184, 20, 48, 0.9), 1px 3px 14px 14px rgba(0, 0, 0, 0.4);
  34. }
  35.  
  36. </style>
  37. </head>
  38. <body>
  39. <form action="http://nufriends-swaar.appspot.com/setevent" method="post">
  40. <input style="display: none;" name="id" value="1" />
  41. <input style="display: none;" type="submit" value="Submit" />
  42. </form>
  43.  
  44. <button id="walkie-talkie"> LAUNCH !!!! </button>
  45.  
  46. <script>
  47. var walkieTalkieButton = document.getElementById('walkie-talkie');
  48.  
  49. walkieTalkieButton.addEventListener('mousedown', buttonDown, false);
  50. walkieTalkieButton.addEventListener('mouseup', buttonUp, false);
  51.  
  52. function buttonDown() {
  53. console.log("Virker dette? :)")
  54. walkieTalkieButton.classList.add('down-state');
  55. submitForm();
  56.  
  57. }
  58.  
  59. function buttonUp() {
  60. document.getElementById("walkie-talkie").innerHTML = "Did it work?";
  61. walkieTalkieButton.classList.remove('down-state');
  62. }
  63.  
  64. function submitForm() {
  65. var http = new XMLHttpRequest();
  66. http.open("POST", "http://nufriends-swaar.appspot.com/setevent", true);
  67. http.setRequestHeader("Content-type","application/x-www-form-urlencoded");
  68. var params = "id=" + 1;
  69. http.send(params);
  70. http.onload = function() {
  71. alert(http.responseText);
  72. }
  73. }
  74. </script>
  75. </body>
  76. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement