Facebook
From msktheory, 4 Years ago, written in HTML5.
Embed
Download Paste or View Raw
Hits: 197
  1.  
  2.   // made by msktheory
  3.   // jsfiddle/msktheory
  4.   // insta/skeppov
  5.  
  6.   //--------------------------------------------
  7.    
  8.   // welcome back code stealers! today is a new update..
  9.     // -Instagram thing in the top corner..
  10.     // -cool rainbow graident background suggested by braiden (sorry if i spelt your name wrong)
  11.     // -a little bug fixes..
  12.     // name change from slurpee to "Chroma"
  13.    
  14.    
  15.   // thats all!
  16.  
  17.   //--------------------------------------------
  18.    
  19.   // feel free to share this
  20.  
  21.  
  22.   <meta charset="utf-8" />
  23.  
  24.   <title>
  25.     Chroma (Timer)
  26.   </title>
  27.  
  28.   <!-- add icon link -->
  29.   <link rel="icon" href="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Rainbow-gradient-fully-saturated-diagonal.svg/1024px-Rainbow-gradient-fully-saturated-diagonal.svg.png" type="image/x-icon">
  30.  
  31.  
  32. </head>
  33.  
  34. <link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
  35.  
  36. <a href="https://www.instagram.com/skeppov" class="fa fa-instagram"></a>
  37. </body>
  38.  
  39. <body onLoad="initClock()">
  40.   <div id="timedate" style="text-align: center;">
  41.  
  42.     <br><br>
  43.  
  44.     <a style="font-weight:bold"></a>
  45.     <a id="mon" style="font-weight:bold">Chroma</a>
  46.     <a id="d" style="font-weight:bold">1</a>,
  47.     <a id="y" style="font-weight:bold">1</a><br />
  48.     <a id="h">12</a>:
  49.     <a id="m">00</a>:
  50.     <a id="s">00</a>:
  51.     <a id="mi">000</a>
  52.   </div>
  53.  
  54.  
  55.   <style>
  56.      
  57.       body{
  58. background-color: #333;
  59.  
  60. }
  61. .fa {
  62.   padding: 20px;
  63.   font-size: 30px;
  64.   width: 30px;
  65.   text-align: center;
  66.   text-decoration: none;
  67.   margin: 5px 2px;
  68.   border-radius: 50%;
  69. }
  70.  
  71. .fa:hover {
  72.     color: #dedede;
  73. }
  74.  
  75. .fa {
  76. border:solid;
  77. border-width:0px;
  78. border-color:white;
  79. background: transparent;
  80. color: white;
  81. }
  82.  
  83.  
  84.  
  85.  
  86.      
  87. html,
  88. body {
  89.   width: 100%;
  90.   height: 100%;
  91.   margin: 0;
  92.   padding: 0;
  93. }
  94.  
  95. body {
  96.   background: linear-gradient(270deg, #ff0000, #ff4a00, #ffdc00, #dfff00, #63ff00, #00ff73, #00ffb7, #00cbff, #0066ff, #000cff, #4e00ff, #b400ff, #ff00e5, #ff008b, #ff0048);
  97.   background-size: 3200% 3200%;
  98.  
  99.   animation: AnimationName 21s ease infinite;
  100. }
  101.  
  102. @keyframes AnimationName {
  103.   0% {
  104.     background-position: 0% 50%
  105.   }
  106.  
  107.   50% {
  108.     background-position: 100% 50%
  109.   }
  110.  
  111.   100% {
  112.     background-position: 0% 50%
  113.   }
  114. }
  115.  
  116.  
  117.  
  118.     div.eventlogger {
  119.       font: small-caps lighter 43px/150% "Segoe UI", Frutiger, "Frutiger Linotype", "Dejavu Sans", "Helvetica Neue", Arial, sans-serif;
  120.       text-align: left;
  121.       width: 50%;
  122.       text-align: center;
  123.       margin: 50px auto;
  124.       color: #fff;
  125.       padding: 10px;
  126.       font-size: small;
  127.     }
  128.  
  129.     #timedate {
  130.       font: small-caps lighter 43px/150% "Segoe UI", Frutiger, "Frutiger Linotype", "Dejavu Sans", "Helvetica Neue", Arial, sans-serif;
  131.       text-align: left;
  132.       width: 50%;
  133.       text-align: center;
  134.       margin: 50px auto;
  135.       color: #fff;
  136.       padding: 10px;
  137.     }
  138.  
  139.   </style>
  140.  
  141.   <script>
  142.     // START CLOCK SCRIPT
  143.  
  144.     Number.prototype.pad = function(n) {
  145.       for (var r = this.toString(); r.length < n; r = 0 + r);
  146.      return r;
  147.    };
  148.  
  149.    function updateClock() {
  150.      var now = new Date();
  151.      var milli = now.getMilliseconds()
  152.        var sec = now.getSeconds()
  153.        var min = now.getMinutes()
  154.        var hou = now.getHours();
  155. if (hou > 12) {
  156.     hou -= 12;
  157. } else if (hou === 0) {
  158.    hou = 12;
  159. }
  160.         var mo = now.getMonth()
  161.         var dy = now.getDate()
  162.         var yr = now.getFullYear();
  163.       var months = ["January", "February", "March", "April", "May", "June", "July", "August", "Spooktober", "October", "November", "December"];
  164.       var tags = ["mon", "d", "y", "h", "m", "s", "mi"],
  165.         corr = [months[mo], dy, yr, hou.pad(2), min.pad(2), sec.pad(2), milli];
  166.       for (var i = 0; i < tags.length; i++)
  167.        document.getElementById(tags[i]).firstChild.nodeValue = corr[i];
  168.    }
  169.  
  170.    function initClock() {
  171.      updateClock();
  172.      window.setInterval("updateClock()", 1);
  173.    }
  174.    // END CLOCK SCRIPT
  175.  
  176.  </script>
  177.    
  178.     <script>
  179.    </script>
  180.