Team:KAIST-Korea/Test Count

From 2011.igem.org

(Difference between revisions)
 
(82 intermediate revisions not shown)
Line 1: Line 1:
-
<html xmlns="http://www.w3.org/1999/xhtml" >
+
{{:Team:KAIST-Korea/header}}
-
<head>
+
-
<title>
+
-
</title>
+
-
<style type="text/css"> input { width:30px; text-align:center } </style>
+
 
-
    <script type="text/javascript">
+
<HTML>
-
        var arrMonth = new Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");
+
<HEAD>
-
        var arrDate = new Array(2011, 11, 8); //목표 날짜를 입력하세요
+
 
-
        var arrTime = new Array(0, 0, 0);
+
<SCRIPT LANGUAGE="JavaScript">
-
       
+
function getTime()  
-
        function Dday_countdown() {
+
{
-
            var now = new Date();
+
      now = new Date();
-
            var nYear = now.getYear();
+
      dday = new Date("Jul 15 2011 00:00:00");
-
            var nMonth = now.getMonth();
+
      days = (dday - now) / 1000 / 60 / 60 / 24;
-
            var nDay = now.getDate();
+
      daysRound = Math.floor(days);
-
            var nHour = now.getHours();
+
      hours = (dday - now) / 1000 / 60 / 60 - (24 * daysRound);
-
            var nMin = now.getMinutes();
+
      hoursRound = Math.floor(hours);
-
            var nSec = now.getSeconds();
+
      minutes = (dday - now) / 1000 /60 - (24 * 60 * daysRound) - (60 * hoursRound);
-
            var stmp = String(now.getMilliseconds());
+
      minutesRound = Math.floor(minutes);
-
            var nmSec = (stmp.length == 1 ? "00" + stmp : stmp.length == 2 ? "0" + stmp : stmp);
+
      seconds = (dday - now) / 1000 - (24 * 60 * 60 * daysRound) - (60 * 60 * hoursRound) - (60 * minutesRound);
-
            var strnow = arrMonth[nMonth] + " " + nDay + ", " + nYear + " " + nHour + ":" + nMin + ":" + nSec;
+
      secondsRound = Math.round(seconds);
-
            var strfuture = arrMonth[arrDate[1] - 1] + " " + (arrDate[2] + 1) + ", " + arrDate[0] + " " + arrTime[0] + ":" + arrTime[1] + ":" + arrTime[2];
+
 
-
           
+
      document.timeForm.input1.value = "D - "+daysRound + "     " + hoursRound + ":" + minutesRound + ":" + secondsRound;
-
            var d_date = Date.parse(strfuture) - Date.parse(strnow);
+
      newtime = window.setTimeout("getTime();", 1000);
-
   
+
 
-
            d_day = Math.floor(d_date / 86400000);
+
 
-
            stmp = String(Math.floor((d_date % 86400000) / 3600000));
+
 
-
            d_hour = stmp.length == 1 ? "0" + stmp : stmp;
+
}
-
            stmp = String(Math.floor(((d_date % 86400000) % 3600000) / 60000));
+
 
-
            d_min = stmp.length == 1 ? "0" + stmp : stmp;
+
</script>
-
            stmp = String(Math.floor((((d_date % 86400000) % 3600000) % 60000) / 1000));
+
 
-
            d_sec = stmp.length == 1 ? "0" + stmp : stmp;
+
<style type="text/css">
-
+
 
-
            var sDate = arrDate[0] + "" + arrDate[1] + "월" + arrDate[2] + "일 까지 ";
+
 
-
           
+
div {
-
            var oTimeCnt = document.getElementById("Timecount");
+
font-family:"Arial",Sans-serif; color:white;
-
            if (d_day == 0) oTimeCnt.innerHTML = " D-Day 입니다.";
+
}
-
            else if (d_day <= -1) oTimeCnt.innerHTML = Math.abs(d_day) + ":" + (String(Math.abs(d_hour)).length == 1 ? "0" + Math.abs(d_hour) : Math.abs(d_hour)) + ":" + (String(Math.abs(d_min)).length == 1 ? "0" + Math.abs(d_min) : Math.abs(d_min)) + ":" + (String(Math.abs(d_sec)).length == 1 ? "0" + Math.abs(d_sec) : Math.abs(d_sec)) + ":" + nmSec + "지났습니다.";
+
.widget {
-
            else oTimeCnt.innerHTML = d_day + "일" + d_hour + "시" + d_min + "분" + d_sec + "초 남았습니다.";
+
width:250px;
-
+
margin:10px;
-
            setTimeout("Dday_countdown()", 10);
+
border-right-style:solid;
-
        }
+
border-width:1px;
-
        window.onload = Dday_countdown;
+
border-color:white;
-
    </script>
+
}
-
</head>
+
p:hover {color:#E6E6E6;} /* mouse over link */
-
<body>
+
p:active {color:#FFFFFF;}  /* selected link */
-
<div style=" width:400px; text-align:center; font-size:15px; font-family:@맑은 고딕" id="Timecount"></div>
+
 
-
</body>
+
 
-
</html>
+
#OpenCountdown{
 +
        position: relative;
 +
        font-family:arial, helvetica,sans-serif;
 +
        font-size:20pt;
 +
        font-color:white;
 +
        left:350px;
 +
        top:50px;
 +
}
 +
 
 +
</style>
 +
 
 +
</HEAD>
 +
 
 +
 
 +
<BODY onLoad="getTime()">
 +
 
 +
 
 +
 
 +
<form name=timeForm>
 +
<input type=text name=input1 border-style="none" style="border-bottom: 0px solid; border-left: 0px solid;border-right: 0px solid;border-top: 0px solid; font:35pt arial, helvetica,sans-serif; color:white; background-color:black; position:relative; left:380px; top:200px">
 +
</form>
 +
 
 +
 
 +
<div id="OpenCountdown">
 +
<p>
 +
2011 KAIST iGEM Teaser Site Open
 +
</p>
 +
</div>
 +
 
 +
 
 +
 
 +
<div id="main_closing" position:relative; left:300px; top:300px; width:200px;>
 +
<img src="https://static.igem.org/mediawiki/2011/3/39/%EA%B7%B8%EB%A6%BC2.png">
 +
</div>
 +
 
 +
 
 +
 
 +
<!--FACEBOOK APPLICATION-->
 +
<div class="widget">
 +
<iframe src="http://www.facebook.com/plugins/like.php?app_id=115152055242776&amp;href=http%3A%2F%2F2011.igem.org%2FTeam%3AKAIST-Korea&amp;send=false&amp;layout=standard&amp;width=300&amp;show_faces=false&amp;action=like&amp;colorscheme=dark&amp;font=arial&amp;height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:225px; height:40px;" allowTransparency="true"></iframe></iframe>
 +
 
 +
<br /><br />
 +
 
 +
<!--Twitter APPLICATION-->
 +
<script src="http://widgets.twimg.com/j/2/widget.js"></script>
 +
<script>
 +
new TWTR.Widget({
 +
  version: 2,
 +
  type: 'profile',
 +
  rpp: 4,
 +
  interval: 6000,
 +
  width: 225,
 +
  height: 300,
 +
  theme: {
 +
    shell: {
 +
      background: '#606060',
 +
      color: '#ffffff'
 +
    },
 +
    tweets: {
 +
      background: '#ffffff',
 +
      color: '#000000',
 +
      links: '#0040ff'
 +
    }
 +
  },
 +
  features: {
 +
    scrollbar: false,
 +
    loop: false,
 +
    live: false,
 +
    hashtags: true,
 +
    timestamp: true,
 +
    avatars: false,
 +
    behavior: 'all'
 +
  }
 +
}).render().setUser('iGEM_KAIST').start();
 +
</script>
 +
</div>
 +
 
 +
 
 +
 
 +
<div class="abstract">
 +
<forum></forum>
 +
</div>
 +
 
 +
 
 +
 
 +
 
 +
</BODY>
 +
 
 +
 
 +
 
 +
</HTML>

Latest revision as of 11:05, 8 July 2011


2011 KAIST iGEM Teaser Site Open