Advertisement
Guest User

newpage

a guest
Sep 13th, 2015
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 3.20 KB | None | 0 0
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4.     <link href='https://fonts.googleapis.com/css?family=Roboto:400,100' rel='stylesheet' type='text/css'>
  5.     <link href="newpage.css" rel="stylesheet">
  6.     <title>sup nerd </title>
  7. </head>
  8.  
  9. <body>
  10.     <!--
  11.     <a href=""><p class="button"></p></a>
  12.     -->
  13.     <h1>It's <span id="hour">???</span>:<span id="minute">???</span>:<span id="second">???</span></h1>
  14.     <h2><span id="weekDay">???</span>, <span id="month">???</span> <span id="monthDay">???</span></h2>
  15.     <br>
  16.     <br>
  17.     <br>
  18.  
  19.     <!-- google search bar -->
  20.     <form method="get" action="https://www.google.com/search">
  21.     <input type="text" name="q" size="31" value="" id="googlebar" autocomplete="off">
  22.     </form>
  23.  
  24.    
  25.     <br>
  26.     <a href="https://mail.google.com/"><p class="button">gmail</p></a>
  27.     <a href="https://drive.google.com/drive/u/0/recent  "><p class="button">drive</p></a>
  28.     <a href="https://www.google.com/maps"><p class="button">maps</p></a>
  29.     <a href="https://translate.google.com/"><p class="button">translate</p></a>
  30.     <br>
  31.     <a href="https://www.facebook.com/?_rdr=p"><p class="button">facebook</p></a>
  32.     <a href="http://reddit.com"><p class="button">reddit</p></a>
  33.     <a href="https://www.tumblr.com/dashboard"><p class="button">tumblr</p></a>
  34.     <a href="http://boards.4chan.org/wg/catalog"><p class="button">/wg/</p></a>
  35.     <br>
  36.     <a href="https://courseworks.columbia.edu/welcome/"><p class="button">courseworks</p></a>
  37.     <a href="https://docs.google.com/document/d/17atqL3vV1lwy5dVU53o61DpjsOfKQZCC40weG338Y5w/edit"><p class="button">fiction journal</p></a>
  38.     <a href="http://mylabs.px.pearsoned.com/Pegasus/frmLogin.aspx?s=3"><p class="button">spanish</p></a>
  39.     <a href="https://ssol.columbia.edu/"><p class="button">ssol</p></a>
  40.  
  41.     <!--SCRIPT -->
  42.     <script>
  43.  
  44.         function clock() {
  45.             var date = new Date()
  46.             var weekDay = date.getDay();
  47.             var month = date.getMonth()+1
  48.             var monthDay = date.getDate()
  49.             var hour = date.getHours()
  50.             var minute = date.getMinutes()
  51.             var second = date.getSeconds()
  52.             var pm
  53.  
  54.             var weekDays = [
  55.                 "Sunday",
  56.                 "Monday",
  57.                 "Tuesday",
  58.                 "Wednesday",
  59.                 "Thursday",
  60.                 "Friday",
  61.                 "Saturday",
  62.             ]
  63.  
  64.             var months = [
  65.                 "January",
  66.                 "February",
  67.                 "March",
  68.                 "April",
  69.                 "May",
  70.                 "June",
  71.                 "July",
  72.                 "August",
  73.                 "September",
  74.                 "October",
  75.                 "November",
  76.                 "December",
  77.             ]
  78.  
  79.             function makeTimeStampReadable() {
  80.                 //hour:minute:second
  81.                 if (hour > 12) {
  82.                     hour -= 12
  83.                     pm = "PM"
  84.                 } else {
  85.                     pm = "AM"
  86.                 }
  87.                 if (minute < 10) {
  88.                     minute = "0" + minute
  89.                 }
  90.                 if (second < 10) {
  91.                     second = "0" + second
  92.                 }
  93.  
  94.                 second = second + " " + pm
  95.  
  96.                 weekDay = weekDays[weekDay]
  97.                 month = months[month - 1]
  98.  
  99.  
  100.             }
  101.  
  102.             function updateTime() {
  103.                 document.getElementById("hour").innerHTML = hour
  104.                 document.getElementById("minute").innerHTML = minute
  105.                 document.getElementById("second").innerHTML = second
  106.  
  107.                 document.getElementById("weekDay").innerHTML = weekDay
  108.                 document.getElementById("month").innerHTML = month;
  109.                 document.getElementById("monthDay").innerHTML = monthDay;
  110.             }
  111.  
  112.             makeTimeStampReadable()
  113.             updateTime()
  114.  
  115.  
  116.         }
  117.  
  118.         setInterval(function(){ clock(); }, 1000);
  119.  
  120.     </script>
  121. </body>
  122. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement