hatBanner
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

212 lines
7.2 KiB

5 years ago
5 years ago
5 years ago
  1. <html>
  2. <head>
  3. <meta charset="ISO-8859-1">
  4. <style>
  5. /* CREDITS TO DESKTOPOGRAPHY FOR IMAGE USED */
  6. @import url(https://fonts.googleapis.com/css?family=Josefin+Slab:400,700);
  7. * {
  8. margin:0;
  9. padding:0;
  10. list-style:none;
  11. text-decoration:none;
  12. box-sizing:border-box;
  13. font-family: "Courier New", Courier, monospace;
  14. }
  15. html, body{
  16. width:100%;
  17. height:100%;
  18. display: flex;
  19. }
  20. body {
  21. padding:40px;
  22. background: black;
  23. overflow: hidden;
  24. }
  25. .wrapper {
  26. transform-style: preserve-3d;
  27. margin: 0 auto;
  28. width:250px;
  29. height:400px;
  30. top: 0;left: 0;right: 0;bottom: 0;
  31. margin: auto;
  32. }
  33. .wrapper:after {
  34. top: 100%;
  35. left: 0;
  36. z-index: -1;
  37. display: block;
  38. content: '';
  39. height: 22px;
  40. width: 100%;
  41. }
  42. .bloc {
  43. display: flex;
  44. justify-content: center;
  45. }
  46. .content {
  47. filter: blur(1px);
  48. -webkit-filter: blur(1px);
  49. transform: translateZ(80px) scale(1);
  50. -webkit-transform: translateZ(80px) scale(1);
  51. height: 370px;
  52. width: 460px;
  53. margin:auto;
  54. top: 0px;
  55. right: 0px;
  56. bottom: 0px;
  57. left: 0px;
  58. padding:20px;
  59. padding-top:0px;
  60. color: black;
  61. z-index: 3;
  62. }
  63. pre span {
  64. transform-style: preserve-3d;
  65. white-space: pre;
  66. }
  67. </style>
  68. <script src="https://code.jquery.com/jquery-1.11.3.js"></script>
  69. <script>
  70. function rn(min, max){
  71. return Math.floor(Math.random() * (max - min + 1) + min);
  72. }
  73. var r = rn(0,255),
  74. g = rn(0,255),
  75. b = rn(0,255),
  76. letters,
  77. countLetter,
  78. thisLetter = 0;
  79. function colorizer(){
  80. var time = 1;
  81. /* r = rn(0,255),
  82. g = rn(0,255),
  83. b = rn(0,255),*/
  84. if (r < 256){
  85. r++;
  86. }else{
  87. if (g < 256){
  88. g++;
  89. }else{
  90. if (b < 256){
  91. b++;
  92. }else{
  93. r = rn(0,255),
  94. g = rn(0,255),
  95. b = rn(0,255);
  96. }
  97. }
  98. }
  99. now = $(letters[thisLetter]).html();
  100. $(letters[thisLetter]).html("|")
  101. $(letters[thisLetter]).css({color: "rgb("+r+","+g+","+b+")"})
  102. if (now != " "){
  103. time = 50;
  104. //now = "█";
  105. }
  106. setTimeout(() => {
  107. $(letters[thisLetter]).html(now)
  108. if (thisLetter == countLetter){
  109. thisLetter = 0;
  110. }else{
  111. thisLetter++;
  112. }
  113. colorizer();
  114. }, time);
  115. }
  116. $(document).ready(function() {
  117. !(function ($doc, $win) {
  118. text = ""
  119. +" `/+- -+/` "
  120. +" dMMMNy:` `:yNMMMd "
  121. +" /MMMMMMMMmddmMMMMMMMM/ "
  122. +" `NMMMMMMMMMMMMMMMMMMMMN. "
  123. +" yMMMMMMMMMMMMMMMMMMMMMMh "
  124. +" :MMMMMMMMMMMMMMMMMMMMMMMM/ "
  125. +" yddddddddddddddddddddddddy "
  126. +" -///::::////::::////:::////: "
  127. +" .MMMMMMMMMMMMMMMMMMMMMMMMMMMM: "
  128. +":++++++dMMMMMMMMMMMMMMMMMMMMMMMMMMMMm++++++:"
  129. +".------------------------------------------."
  130. +" "
  131. +" yhys+/:-.`` ``.-:/+syhy "
  132. +" dMNyhdmNMMMMMMMMMMMMMMNmdhyNMd "
  133. +" dMMy `/yNMMmyymMMNy/` yMMd "
  134. +" -dMMdymMMds/. ./sdMMmydMMd- "
  135. +" ./++/- -/++/. "
  136. var line = 1;
  137. text.split("").map(function(letter, index) {
  138. $("pre").append("<span id='span_"+line+"_"+index % 44+"' class='line_"+line+" col_"+index % 44+"'>"+letter+"</span>");
  139. if(index % 44 == 0 && index != 0){
  140. $("pre").append("<br>");
  141. line++;
  142. }
  143. });
  144. letters = $("pre span");
  145. countLetter = letters.length;
  146. colorizer();
  147. var screenWidth = $win.screen.width / 2,
  148. screenHeight = $win.screen.height / 2,
  149. $elems = $doc.getElementsByClassName("elem"),
  150. validPropertyPrefix = '',
  151. otherProperty = 'perspective(1000px)',
  152. elemStyle = $elems[0].style;
  153. if(typeof elemStyle.webkitTransform == 'string') {
  154. validPropertyPrefix = 'webkitTransform';
  155. } else if (typeof elemStyle.MozTransform == 'string') {
  156. validPropertyPrefix = 'MozTransform';
  157. }
  158. $doc.addEventListener('mousemove', function (e) {
  159. var centroX = e.clientX - screenWidth,
  160. centroY = screenHeight - (e.clientY + 13),
  161. degX = centroX * 0.1,
  162. degY = centroY * 0.2,
  163. $elem
  164. for (var i = 0; i < $elems.length; i++) {
  165. $elem = $elems[i];
  166. $elem.style[validPropertyPrefix] = otherProperty + 'rotateY('+ degX +'deg) rotateX('+ degY +'deg)';
  167. };
  168. });
  169. })(document, window);
  170. });
  171. </script>
  172. </head>
  173. <body>
  174. <div class="wrapper elem" style="transform: perspective(600px) rotateY(0deg) rotateX(0deg);">
  175. <div class="bloc">
  176. <div class="content">
  177. <pre></pre>
  178. </div>
  179. </div>
  180. </div>
  181. </body>
  182. </html>