Advertisement
Guest User

Untitled

a guest
Jan 21st, 2020
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.34 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  6. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  7. <meta name="twitter:site" content="@Esri Chile">
  8. <meta name="twitter:creator" content="@Esri Chile">
  9. <meta name="twitter:title" content="Mapa del día del Amor">
  10. <meta name="twitter:description" content="Mapa del día del Amor">
  11. <script>var HeartsBackground = {
  12. heartHeight: 60,
  13. heartWidth: 64,
  14. hearts: [],
  15. heartImage: 'https://img.pngio.com/instagram-heart-png-clipart-background-png-play-heart-png-820_613.png',
  16. maxHearts: 8,
  17. minScale: 0.4,
  18. draw: function() {
  19. this.setCanvasSize();
  20. this.ctx.clearRect(0, 0, this.w, this.h);
  21. for (var i = 0; i < this.hearts.length; i++) {
  22. var heart = this.hearts[i];
  23. heart.image = new Image();
  24. heart.image.style.height = heart.height;
  25. heart.image.src = this.heartImage;
  26. this.ctx.globalAlpha = heart.opacity;
  27. this.ctx.drawImage (heart.image, heart.x, heart.y, heart.width, heart.height);
  28. }
  29. this.move();
  30. },
  31. move: function() {
  32. for(var b = 0; b < this.hearts.length; b++) {
  33. var heart = this.hearts[b];
  34. heart.y += heart.ys;
  35. if(heart.y > this.h) {
  36. heart.x = Math.random() * this.w;
  37. heart.y = -1 * this.heartHeight;
  38. }
  39. }
  40. },
  41. setCanvasSize: function() {
  42. this.canvas.width = window.innerWidth;
  43. this.canvas.height = window.innerHeight;
  44. this.w = this.canvas.width;
  45. this.h = this.canvas.height;
  46. },
  47. initialize: function() {
  48. this.canvas = $('#canvas')[0];
  49.  
  50. if(!this.canvas.getContext)
  51. return;
  52.  
  53. this.setCanvasSize();
  54. this.ctx = this.canvas.getContext('2d');
  55.  
  56. for(var a = 0; a < this.maxHearts; a++) {
  57. var scale = (Math.random() * (1 - this.minScale)) + this.minScale;
  58. this.hearts.push({
  59. x: Math.random() * this.w,
  60. y: Math.random() * this.h,
  61. ys: Math.random() + 1,
  62. height: scale * this.heartHeight,
  63. width: scale * this.heartWidth,
  64. opacity: scale
  65. });
  66. }
  67.  
  68. setInterval($.proxy(this.draw, this), 30);
  69. }
  70. };
  71.  
  72. $(document).ready(function(){
  73. HeartsBackground.initialize();
  74. });</script>
  75. <title>Feliz día de San Valentín</title>
  76.  
  77. <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
  78. <link rel="stylesheet" type="text/css" href="style.css">
  79.  
  80. <style>
  81. .button {
  82. display: inline-block;
  83. padding: 15px 25px;
  84. font-size: 20px;
  85. cursor: pointer;
  86. text-align: center;
  87. text-decoration: none;
  88. outline: none;
  89. color: #fff;
  90. background-color: #4CAF50;
  91. border: none;
  92. border-radius: 15px;
  93. box-shadow: 0 9px #999;
  94. }
  95.  
  96. .button1 {
  97. background-color: Transparent;
  98. color: white;
  99. border: 2px solid #ffff;
  100. }
  101.  
  102. .button1:hover {
  103. background-color: #ffff;
  104. color: black;
  105. }
  106.  
  107. .button2 {
  108. background-color: white;
  109. color: black;
  110. border: 2px solid #008CBA;
  111. }
  112.  
  113. .button2:hover {
  114. background-color: #008CBA;
  115. color: white;
  116. }
  117.  
  118. .button3 {
  119. background-color: white;
  120. color: black;
  121. border: 2px solid #f44336;
  122. }
  123.  
  124. .button3:hover {
  125. background-color: #f44336;
  126. color: white;
  127. }
  128.  
  129. .button4 {
  130. background-color: white;
  131. color: black;
  132. border: 2px solid #e7e7e7;
  133. }
  134.  
  135. .button4:hover {background-color: #e7e7e7;}
  136.  
  137. .button5 {
  138. background-color: white;
  139. color: black;
  140. border: 2px solid #555555;
  141. }
  142.  
  143. .button5:hover {
  144. background-color: #555555;
  145. color: white;
  146. }
  147. a {
  148. color: white;
  149. }
  150.  
  151. a:hover {
  152. color: black;
  153. }
  154. </style>
  155. </head>
  156. <body>
  157. <canvas id="canvas"></canvas>
  158. <header>
  159.  
  160. <div class="container d-flex flex-column justify-content-center align-items-center">
  161. <div>
  162. <h1 class="text-white text-uppercase text-center">¡Feliz día de San Valentín!</h1>
  163. <h4 class="text-white text-center">Envía un presente virtual a la persona especial<br> que quieras saludar este 14 de Febrero</h4>
  164. <hr>
  165. </div>
  166.  
  167. <div>
  168. <a href="https://survey123.arcgis.com/share/02b6241ccf414993929cf0a8d5db39c7" target="_blank"><button class="button button1">Envía tu regalo</button></a>
  169. <a href="http://esriscl.maps.arcgis.com/apps/webappviewer/index.html?id=723530fd219448e4b5fcb7ed8b714eea" target="_blank"><button class="button button1">Revisa el mapa de presentes</button></a>
  170. </div>
  171. <br>
  172. <br>
  173. <div class="social-icons">
  174. <ul>
  175. <li><a href="http://www.facebook.com/sharer.php?u=http://sanvalentin.esri.cl" class="facebook" target="_blank"><img src="http://usuarios.cl/sanvalentin/images/facebook.png" alt="facebook"> </a></li>
  176. <li><a href="http://twitter.com/share?url=http://sanvalentin.esri.cl&amp;text=Envia+un+presente+en+el+dia+de+san+valentin @ESRIchile" class="twitter" target="_blank"><img src="http://usuarios.cl/sanvalentin/images/twitter.png" alt="twitter"></a> </li>
  177. <li><a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://sanvalentin.esri.cl" class="linkedin" target="_blank"><img src="http://usuarios.cl/sanvalentin/images/linkedin.png" alt="linkedin"></a> </li>
  178.  
  179. </ul>
  180. </div>
  181. </div>
  182.  
  183. </header>
  184. </body>
  185. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement